📄 hvdemo.mco
字号:
/**************************************************************** * * * Copyright (c) 2001-2007 McObject LLC. All Right Reserved. * * * ****************************************************************/declare database hvddb;#define int1 signed<1>#define int2 signed<2>#define int4 signed<4>#define int8 signed<8>#define uint8 unsigned<8>#define uint4 unsigned<4>#define uint2 unsigned<2>#define uint1 unsigned<1>//declare auto_oid [10000]; class Obj { unsigned<4> index; string value; tree <index> index;}; struct Grad { double A, B; uint4 n_steps;};struct Vis{ float fValue; uint4 iRGB; Grad gradient;};struct StructType { uint4 struct_f_uint4=10000; uint2 struct_f_uint2=1000; uint1 struct_f_uint1=100; string struct_f_string; uint4 struct_a_uint4[5]; blob f_blob;};struct NestedType { char<10> nested_f_char10; StructType nested_f_struct; int1 nested_f_int1[10] = {101,102,103,104,105,106,107,108,109,110};};struct OIDstruct { char<25> id;};declare oid OIDstruct[10000];class Measurement{ uint8 f_uint8; uint4 f_uint4 = 2; uint2 f_uint2 = 3; uint1 f_uint1 = 4; int8 f_int8; int4 f_int4 = 6; int2 f_int2 = 7; int1 f_int1 = 8; float f_float = 9.1; double f_double= 10.2; time f_time = 11; date f_date = 12; char<20> f_char10; string f_string; uint8 a_uint8[5]; uint4 a_uint4[5] = {20,21,22,23}; uint2 a_uint2[5] = {25,26,27,29,29}; uint1 a_uint1[5] = {30,31,32,33,34}; int8 a_int8[5]; int4 a_int4[5] = {40,41,42,43,44}; int2 a_int2[5] = {45,46,47,48,49}; int1 a_int1[5] = {50,51,52,53,54}; float a_float[5] = {55.1, 56.1, 57.1, 58.1, 59.1}; double a_double[5] = {60.1, 61.1, 62.1, 63.1, 64.1}; time a_time[5] = {65,66,67,68,69}; date a_date[5] = {70,71,72,73,74}; char<20> a_char10[5]; string a_string[5]; vector <uint8> v_uint8; vector <uint4> v_uint4; vector <uint2> v_uint2; vector <uint1> v_uint1; vector <int8> v_int8; vector <int4> v_int4; vector <int2> v_int2; vector <int1> v_int1; vector <float> v_float; vector <double> v_double; vector <time> v_time; vector <date> v_date; vector <char<20>> v_char10; vector <string> v_string; StructType f_struct; optional StructType f_struct_opt; NestedType f_nested; StructType a_struct[5]; vector<StructType> v_struct; autoid[10000]; oid; ref f_ref; blob f_blob; tree <f_uint4> tree_by_f_uint4; hash <f_uint4> hash_by_f_uint4 [10000]; tree <f_uint4, f_uint2> tree_by_f_uint4_f_uint2; hash <f_uint4, f_uint2> hash_by_f_uint4_f_uint2 [10000]; tree <f_struct.struct_f_uint4> tree_by_struct_f_uint4; hash <f_struct.struct_f_uint4> hash_by_struct_f_uint4[10000]; tree <v_uint4> tree_by_v_uint4; hash <v_uint4> hash_by_v_uint4 [10000]; tree <v_struct.struct_f_uint4> tree_by_v_struct_uint4; hash <v_struct.struct_f_uint4> hash_by_v_struct_uint4 [10000]; list;};struct Dyn{ string s;};struct DynStruct{ string s;};struct FixedStruct{ uint4 u4; uint8 u8;};class AllTypes{ time time_in; uint1 u1; uint2 u2; uint4 u4; uint8 u8; vector<uint4> v_uint4; //int4 vint4[200]; /* integer array */ //FixedStruct fs[200]; //DynStruct ds[100]; //blob blo; autoid[2000]; list;};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -