⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dvdatabase.h

📁 DataDraw is an ultra-fast persistent database for high performance programs written in C. It s so fa
💻 H
📖 第 1 页 / 共 5 页
字号:
/*----------------------------------------------------------------------------------------  Module header file for: dv module----------------------------------------------------------------------------------------*/#ifndef DVDATABASE_H#define DVDATABASE_H#if defined __cplusplusextern "C" {#endif#ifndef DD_UTIL_H#include "ddutil.h"#endif/* Class reference definitions */#if defined(DD_DEBUG)typedef struct _struct_dvRoot{char val;} *dvRoot;#define dvRootNull ((dvRoot)(UINT32_MAX))#define dvRoot2Index(Root) ((uint32)((Root) - (dvRoot)(0)))#define dvRoot2ValidIndex(Root) ((uint32)(dvValidRoot(Root) - (dvRoot)(0)))#define dvIndex2Root(xRoot) ((dvRoot)((xRoot) + (dvRoot)(0)))typedef struct _struct_dvModpath{char val;} *dvModpath;#define dvModpathNull ((dvModpath)(UINT32_MAX))#define dvModpath2Index(Modpath) ((uint32)((Modpath) - (dvModpath)(0)))#define dvModpath2ValidIndex(Modpath) ((uint32)(dvValidModpath(Modpath) - (dvModpath)(0)))#define dvIndex2Modpath(xModpath) ((dvModpath)((xModpath) + (dvModpath)(0)))typedef struct _struct_dvModule{char val;} *dvModule;#define dvModuleNull ((dvModule)(UINT32_MAX))#define dvModule2Index(Module) ((uint32)((Module) - (dvModule)(0)))#define dvModule2ValidIndex(Module) ((uint32)(dvValidModule(Module) - (dvModule)(0)))#define dvIndex2Module(xModule) ((dvModule)((xModule) + (dvModule)(0)))typedef struct _struct_dvLink{char val;} *dvLink;#define dvLinkNull ((dvLink)(UINT32_MAX))#define dvLink2Index(Link) ((uint32)((Link) - (dvLink)(0)))#define dvLink2ValidIndex(Link) ((uint32)(dvValidLink(Link) - (dvLink)(0)))#define dvIndex2Link(xLink) ((dvLink)((xLink) + (dvLink)(0)))typedef struct _struct_dvSchema{char val;} *dvSchema;#define dvSchemaNull ((dvSchema)(UINT32_MAX))#define dvSchema2Index(Schema) ((uint32)((Schema) - (dvSchema)(0)))#define dvSchema2ValidIndex(Schema) ((uint32)(dvValidSchema(Schema) - (dvSchema)(0)))#define dvIndex2Schema(xSchema) ((dvSchema)((xSchema) + (dvSchema)(0)))typedef struct _struct_dvEnum{char val;} *dvEnum;#define dvEnumNull ((dvEnum)(UINT32_MAX))#define dvEnum2Index(Enum) ((uint32)((Enum) - (dvEnum)(0)))#define dvEnum2ValidIndex(Enum) ((uint32)(dvValidEnum(Enum) - (dvEnum)(0)))#define dvIndex2Enum(xEnum) ((dvEnum)((xEnum) + (dvEnum)(0)))typedef struct _struct_dvEntry{char val;} *dvEntry;#define dvEntryNull ((dvEntry)(UINT32_MAX))#define dvEntry2Index(Entry) ((uint32)((Entry) - (dvEntry)(0)))#define dvEntry2ValidIndex(Entry) ((uint32)(dvValidEntry(Entry) - (dvEntry)(0)))#define dvIndex2Entry(xEntry) ((dvEntry)((xEntry) + (dvEntry)(0)))typedef struct _struct_dvTypedef{char val;} *dvTypedef;#define dvTypedefNull ((dvTypedef)(UINT32_MAX))#define dvTypedef2Index(Typedef) ((uint32)((Typedef) - (dvTypedef)(0)))#define dvTypedef2ValidIndex(Typedef) ((uint32)(dvValidTypedef(Typedef) - (dvTypedef)(0)))#define dvIndex2Typedef(xTypedef) ((dvTypedef)((xTypedef) + (dvTypedef)(0)))typedef struct _struct_dvClass{char val;} *dvClass;#define dvClassNull ((dvClass)(UINT32_MAX))#define dvClass2Index(Class) ((uint32)((Class) - (dvClass)(0)))#define dvClass2ValidIndex(Class) ((uint32)(dvValidClass(Class) - (dvClass)(0)))#define dvIndex2Class(xClass) ((dvClass)((xClass) + (dvClass)(0)))typedef struct _struct_dvProperty{char val;} *dvProperty;#define dvPropertyNull ((dvProperty)(UINT32_MAX))#define dvProperty2Index(Property) ((uint32)((Property) - (dvProperty)(0)))#define dvProperty2ValidIndex(Property) ((uint32)(dvValidProperty(Property) - (dvProperty)(0)))#define dvIndex2Property(xProperty) ((dvProperty)((xProperty) + (dvProperty)(0)))typedef struct _struct_dvRelationship{char val;} *dvRelationship;#define dvRelationshipNull ((dvRelationship)(UINT32_MAX))#define dvRelationship2Index(Relationship) ((uint32)((Relationship) - (dvRelationship)(0)))#define dvRelationship2ValidIndex(Relationship) ((uint32)(dvValidRelationship(Relationship) - (dvRelationship)(0)))#define dvIndex2Relationship(xRelationship) ((dvRelationship)((xRelationship) + (dvRelationship)(0)))typedef struct _struct_dvUnion{char val;} *dvUnion;#define dvUnionNull ((dvUnion)(UINT32_MAX))#define dvUnion2Index(Union) ((uint32)((Union) - (dvUnion)(0)))#define dvUnion2ValidIndex(Union) ((uint32)(dvValidUnion(Union) - (dvUnion)(0)))#define dvIndex2Union(xUnion) ((dvUnion)((xUnion) + (dvUnion)(0)))typedef struct _struct_dvCase{char val;} *dvCase;#define dvCaseNull ((dvCase)(UINT32_MAX))#define dvCase2Index(Case) ((uint32)((Case) - (dvCase)(0)))#define dvCase2ValidIndex(Case) ((uint32)(dvValidCase(Case) - (dvCase)(0)))#define dvIndex2Case(xCase) ((dvCase)((xCase) + (dvCase)(0)))#elsetypedef uint32 dvRoot;#define dvRootNull UINT32_MAX#define dvRoot2Index(Root) (Root)#define dvRoot2ValidIndex(Root) (dvValidRoot(Root))#define dvIndex2Root(xRoot) ((xRoot))typedef uint32 dvModpath;#define dvModpathNull UINT32_MAX#define dvModpath2Index(Modpath) (Modpath)#define dvModpath2ValidIndex(Modpath) (dvValidModpath(Modpath))#define dvIndex2Modpath(xModpath) ((xModpath))typedef uint32 dvModule;#define dvModuleNull UINT32_MAX#define dvModule2Index(Module) (Module)#define dvModule2ValidIndex(Module) (dvValidModule(Module))#define dvIndex2Module(xModule) ((xModule))typedef uint32 dvLink;#define dvLinkNull UINT32_MAX#define dvLink2Index(Link) (Link)#define dvLink2ValidIndex(Link) (dvValidLink(Link))#define dvIndex2Link(xLink) ((xLink))typedef uint32 dvSchema;#define dvSchemaNull UINT32_MAX#define dvSchema2Index(Schema) (Schema)#define dvSchema2ValidIndex(Schema) (dvValidSchema(Schema))#define dvIndex2Schema(xSchema) ((xSchema))typedef uint32 dvEnum;#define dvEnumNull UINT32_MAX#define dvEnum2Index(Enum) (Enum)#define dvEnum2ValidIndex(Enum) (dvValidEnum(Enum))#define dvIndex2Enum(xEnum) ((xEnum))typedef uint32 dvEntry;#define dvEntryNull UINT32_MAX#define dvEntry2Index(Entry) (Entry)#define dvEntry2ValidIndex(Entry) (dvValidEntry(Entry))#define dvIndex2Entry(xEntry) ((xEntry))typedef uint32 dvTypedef;#define dvTypedefNull UINT32_MAX#define dvTypedef2Index(Typedef) (Typedef)#define dvTypedef2ValidIndex(Typedef) (dvValidTypedef(Typedef))#define dvIndex2Typedef(xTypedef) ((xTypedef))typedef uint32 dvClass;#define dvClassNull UINT32_MAX#define dvClass2Index(Class) (Class)#define dvClass2ValidIndex(Class) (dvValidClass(Class))#define dvIndex2Class(xClass) ((xClass))typedef uint32 dvProperty;#define dvPropertyNull UINT32_MAX#define dvProperty2Index(Property) (Property)#define dvProperty2ValidIndex(Property) (dvValidProperty(Property))#define dvIndex2Property(xProperty) ((xProperty))typedef uint32 dvRelationship;#define dvRelationshipNull UINT32_MAX#define dvRelationship2Index(Relationship) (Relationship)#define dvRelationship2ValidIndex(Relationship) (dvValidRelationship(Relationship))#define dvIndex2Relationship(xRelationship) ((xRelationship))typedef uint32 dvUnion;#define dvUnionNull UINT32_MAX#define dvUnion2Index(Union) (Union)#define dvUnion2ValidIndex(Union) (dvValidUnion(Union))#define dvIndex2Union(xUnion) ((xUnion))typedef uint32 dvCase;#define dvCaseNull UINT32_MAX#define dvCase2Index(Case) (Case)#define dvCase2ValidIndex(Case) (dvValidCase(Case))#define dvIndex2Case(xCase) ((xCase))#endif/* RelationshipType enumerated type */typedef enum {    REL_LINKED_LIST = 0,    REL_DOUBLY_LINKED = 1,    REL_TAIL_LINKED = 2,    REL_POINTER = 3,    REL_ARRAY = 4,    REL_HASHED = 5} dvRelationshipType;/* PropertyType enumerated type */typedef enum {    PROP_INT = 0,    PROP_UINT = 1,    PROP_FLOAT = 2,    PROP_DOUBLE = 3,    PROP_BIT = 4,    PROP_BOOL = 5,    PROP_CHAR = 6,    PROP_ENUM = 7,    PROP_TYPEDEF = 8,    PROP_POINTER = 9,    PROP_SYM = 10,    PROP_UNBOUND = 11} dvPropertyType;/* MemoryStyle enumerated type */typedef enum {    MEM_CREATE_ONLY = 0,    MEM_FREE_LIST = 1} dvMemoryStyle;/* Validate macros */#if defined(DD_DEBUG)#define dvValidRoot(Root) (utLikely((uint32)((Root) - (dvRoot)0) < \    dvRootData.usedRoot)? (Root) : (utExit("Invalid Root"), (dvRoot)0))#define dvValidModpath(Modpath) (utLikely((uint32)((Modpath) - (dvModpath)0) < \    dvRootData.usedModpath)? (Modpath) : (utExit("Invalid Modpath"), (dvModpath)0))#define dvValidModule(Module) (utLikely((uint32)((Module) - (dvModule)0) < \    dvRootData.usedModule)? (Module) : (utExit("Invalid Module"), (dvModule)0))#define dvValidLink(Link) (utLikely((uint32)((Link) - (dvLink)0) < \    dvRootData.usedLink)? (Link) : (utExit("Invalid Link"), (dvLink)0))#define dvValidSchema(Schema) (utLikely((uint32)((Schema) - (dvSchema)0) < \    dvRootData.usedSchema)? (Schema) : (utExit("Invalid Schema"), (dvSchema)0))#define dvValidEnum(Enum) (utLikely((uint32)((Enum) - (dvEnum)0) < \    dvRootData.usedEnum)? (Enum) : (utExit("Invalid Enum"), (dvEnum)0))#define dvValidEntry(Entry) (utLikely((uint32)((Entry) - (dvEntry)0) < \    dvRootData.usedEntry)? (Entry) : (utExit("Invalid Entry"), (dvEntry)0))#define dvValidTypedef(Typedef) (utLikely((uint32)((Typedef) - (dvTypedef)0) < \    dvRootData.usedTypedef)? (Typedef) : (utExit("Invalid Typedef"), (dvTypedef)0))#define dvValidClass(Class) (utLikely((uint32)((Class) - (dvClass)0) < \    dvRootData.usedClass)? (Class) : (utExit("Invalid Class"), (dvClass)0))#define dvValidProperty(Property) (utLikely((uint32)((Property) - (dvProperty)0) < \    dvRootData.usedProperty)? (Property) : (utExit("Invalid Property"), (dvProperty)0))#define dvValidRelationship(Relationship) (utLikely((uint32)((Relationship) - (dvRelationship)0) < \    dvRootData.usedRelationship)? (Relationship) : (utExit("Invalid Relationship"), (dvRelationship)0))#define dvValidUnion(Union) (utLikely((uint32)((Union) - (dvUnion)0) < \    dvRootData.usedUnion)? (Union) : (utExit("Invalid Union"), (dvUnion)0))#define dvValidCase(Case) (utLikely((uint32)((Case) - (dvCase)0) < \    dvRootData.usedCase)? (Case) : (utExit("Invalid Case"), (dvCase)0))#else#define dvValidRoot(Root) (Root)#define dvValidModpath(Modpath) (Modpath)#define dvValidModule(Module) (Module)#define dvValidLink(Link) (Link)#define dvValidSchema(Schema) (Schema)#define dvValidEnum(Enum) (Enum)#define dvValidEntry(Entry) (Entry)#define dvValidTypedef(Typedef) (Typedef)#define dvValidClass(Class) (Class)#define dvValidProperty(Property) (Property)#define dvValidRelationship(Relationship) (Relationship)#define dvValidUnion(Union) (Union)#define dvValidCase(Case) (Case)#endif/*----------------------------------------------------------------------------------------  Fields for class Root.----------------------------------------------------------------------------------------*/

⌨️ 快捷键说明

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