vectors.mco

来自「extremeDB s sample code,useful for you」· MCO 代码 · 共 43 行

MCO
43
字号
/************************************************************ *                                                          * * Copyright (c) 2001-2006 McObject LLC. All Right Reserved.* *                                                          * ************************************************************/#define int1                signed<1>#define int2                signed<2>#define int4                signed<4>#define uint4       unsigned<4>#define uint2       unsigned<2>#define uint1       unsigned<1>declare database    vectors;// This sample demonstrates vectors and indexes based on vectorsstruct Item{	uint4     id;	string    name;};class Box{	string  name;	uint4   volume;	vector< string >   owners;					  // history of the box owners	vector< uint4 >    repairYears;				  // history of the box repairs	vector< uint2 >    colors;					  // all outside colors	vector< char<5> >  zipcodes;				  // history of the box locations	vector< Item >     items;					  // things in the box	tree< owners, name >      I_owners;			  // owner and name of the box sorted	tree< repairYears  >      I_ryears;	tree< colors >            I_colors;	tree< zipcodes >          I_zipcodes;	tree< items.name, name >  I_items;			  // ordered by item name, box name};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?