Download The Distributed Graph Storage System: A User`s Manual for

Transcript
DgsAttr& CSDg,GrapkGetGAttr( DgsString& name, CSDgsComp* component );
dgs_bool CSDg,Graph,HasGAttr( DgsString& name, CSDgsComp* component );
CSDg,Graph,DeleteGAttr( DgsString& name, CSDgsComp* component );
int
ARGUMENTS:
name:
component:
the text name of the attribute
a pointer to the node or link that owns the attribute
COMMENT:
GetGAttr returns the value of a graph attribute and a null
value if the attribute does not exist. HasGAttr returns dgs_true if
the attribute exists and dgs_false if it does not exist. DeleteGAttr
deletes a graph attribute. GetGAttr and HasGAttr fail if the subgraph has not been opened. DeleteGAttr fails if the subgraph
has not been opened in DGS_WRITE mode.
The next functions are useful when the names of the attributes are not
known.
DgsString CSDg,GrapkFirstGAttrName( CSDgsComp* component );
DgsString CSDg,GrapkNextGAttrName( DgsString& lasLname, CSDgsComp* component );
CSDg,GrapkNumOfGAttrs( CSDgsComp* component);
int
ARGUMENTS:
component:
last ..name:
a pointer to a node or link that is a member of the subgraph
the name that was returned by the previous
invocation of NextGAttrName
CoMMENT:
NumOfGAttrs returns the number of graph attributes that the
component has in the context of this subgraph. FirstGA ttrName
and NextGAttrName can be used to read the names of the graph
attributes of a component one-by-one. These names could then
be used as input to other attribute functions such as GetGAttr.
NextGAttrName returns dgs..nullstr when there are no more attribute names to read. Before calling any of these functions, the
subgraph must have been successfully opened .
.55