The e4_VertexType enumeration defines the possible vertex value types in e4Graphs:
E4_VTNODE denotes that the vertex contains a node value, E4_VTINT means the vertex contains an integer value, E4_VTDOUBE denotes that the vertex contains a 64-bit floating point value, E4_VTSTRING means the vertex contains a NULL terminated string value, and E4_VTBINARY denotes that the vertex contains a binary uninterpreted value of arbitrary size. E4_VTUNKNOWN serves as an illegal value to returns when an invalid vertex is asked for its type.typedef enum e4_VertexType { E4_VTUNKNOWN = ..., E4_VTNODE, E4_VTINT, E4_VTDOUBLE, E4_VTSTRING, E4_VTBINARY } e4_VertexType;
The e4_RefKind enumeration defines constants that identify the various entities of an e4Graph storage. These constants are returned by the Kind() method of each entity. You can use these to identify the type of the entity if you only know the type as e4_RefCount, the base type for all entities.
The e4_InsertOrder enumeration defines the possible insertion orders of a vertex into a node:typedef enum e4_RefKind { E4_RKINVALID = ..., E4_RKSTORAGE, E4_RKMARKER, E4_RKNODE, E4_RKVERTEX } e4_RefKind;
E4_IOAT means the new vertex is inserted at the given rank. E4_IOFIRST and E4_IOLAST denote that the new vertex is inserted as the first or last vertex in a node, respectively. E4_IOBEFORE means the same as E4_IOAT. E4_IOAFTER means that the new vertex is inserted so that it becomes the vertex immediately following the vertex with the given rank. E4_IONONE serves an an illegal value.typedef enum e4_InsertOrder { E4_IONONE = ..., E4_IOAT, E4_IOFIRST, E4_IOLAST, E4_IOBEFORE, E4_IOAFTER } e4_InsertOrder;
The e4_VisitMethod enumeration defines the possible methods for a vertex visitor to visit its selection of vertices:
E4_VMSTORAGE means that this vertex visitor will visit all vertices in a given storage in some implementation dependent order. E4_VMNODE means that the vertices of a given node will be visited in rank order. E4_VMNODERANDOM means that the vertices of a given node will be visited in some implementation dependent order. E4_VMUNKNOWN serves as an illegal value.typedef enum e4_VisitMethod { E4_VMUNKNOWN = ..., E4_VMSTORAGE, E4_VMNODE, E4_VMNODERANDOM } e4_VisitMethod;
The following two enumerations define types used by e4_Storage::GetStatistic. The e4_Space enumeration defines the various allocation spaces within a storage. Entities are allocated from these spaces to represent stored values:
The e4_SpaceStat enumeration defines the various kind of statistics collected about allocation within the allocation spaces in a storage:typedef enum e4_Space { E4_SPMARKER = ..., E4_SPNODE, E4_SPVERTEX, E4_SPNAME, E4_SPSTRING, E4_SPINT, E4_SPDOUBLE, E4_SPBINARY } e4_Space;
The E4_SSUSED and E4_SSAVAIL statistics denote the number of slots used within a space, and the total number of slots available within that space, respectively. The E4_SSALLOC and E4_SSFREED statistics denote the number of slots used and freed, respectively, since the time the storage was opened in this process.typedef enum e4_SpaceStat { E4_SSUSED = ..., E4_SSAVAIL, E4_SSFREED, E4_SSALLOC } e4_SpaceStat;
Structures Defined by e4Graph
The e4_Binary structure is used to pass around a binary uninterpreted value together with its size, in bytes:
The e4_Value structure is used to pass values from e4Graph methods when the type of the value is not known ahead of time. Accordingly, the e4_Value structure contains both the actual value and its type, and potentially also its size if the size can vary:typedef struct e4_Binary { int nbytes; void *bytes; } e4_Binary;
Constants Defined by the e4_Tree Packagetypedef struct e4_Value { e_VertexType vertexType; e4_Node n; union { int i; double d; char *s; e4_Binary b; } u; } e4_Value;
The constant E4_FIELDNOTFOUND is returned when a requested field is not found or an invalid field is used in an e4Graph operation.
The constant E4_NODENOTFOUND is returned when a requested node is not found or an invalid node is used in an e4Graph operation.
The constant E4_MARKERNOTFOUND is returned when a requested marker is not found or an invalid marker is used in an e4Graph operation.
The constant E4_VERTEXNOTCREATED is returned when a vertex could not be created and the operation was supposed to return the rank of the new vertex.
The constant E4_ROOTINDEX is returned when the rank of a node in its parent is computed on a node which has no parents.
The constant E4_RANKNOTUSED should be passed by a caller of an e4Graph operation that takes a rank when the rank is meaningless and should not be used by that operation.
The following constants define bitfields that can be ORed together to define filtering masks for vertex visitors to select which vertices in their itinerary to visit and which ones to ignore. E4_VFNONE means that the visitor visits all vertices. ORing it with the other constants has no effect. E4_VFNAME means that only vertices whose name matches a given name should be visited. E4_VFTYPE denotes that only vertices whose type is the same as a given vertex type should be visited.
Storage drivers are selected by name when a storage is opened with an e4_Storage constructor. The constant string E4_METAKIT selects the Metakit storage driver that is included with the e4Graph package.
The constant E4_INVALIDUNIQUEID is used as the serial number stored in unique identifiers derived from e4_CommonUniqueID when the unique identifier is unassigned.
Global Variables Defined by the e4Graph Package
The global variable invalidStorage contains an invalid instance of e4_Storage. Use it to assign to a local variable of type e4_Storage to discard the reference to another storage it contains. Remember to assign invalidStorage to variables of type e4_Storage embedded within heap allocated structures before the structures are freed, to ensure correct reference management for the instances referenced from the embedded e4_Storage variables.
The global variable invalidMarker contains an invalid instance of e4_Marker. Use it to assign to a local variable of type e4_Marker to discard the reference to another marker it contains. Remember to assign invalidMarker to variables of type e4_Marker embedded within heap allocated structures before the structures are freed, to ensure correct reference management for the instances referenced from the embedded e4_Marker variables.
The global variable invalidNode contains an invalid instance of e4_Node. Use it to assign to a local variable of type e4_Node to discard the reference to another node it contains. Remember to assign invalidNode to variables of type e4_Node embedded within heap allocated structures before the structures are freed, to ensure correct reference management for the instances referenced from the embedded e4_Node variables.
The global variable invalidVertex
contains an invalid instance of e4_Vertex.
Use it to assign to a local variable of type e4_Vertex to discard the reference
to another vertex it contains. Remember to assign invalidVertex to variables
of type e4_Vertex embedded within heap allocated structure before the structures
are freed, to ensure correct reference management for the instances referenced
from the embedded e4_Vertex variables.