7.11 Collections
The following section contains the functions which allow a program to manipulate, update, and query Legion collection objects.
int
JoinCollection(
LegionIdType CollectionIdType, char* CollectionName,
LegionIdType JoinerIdType, char *JoinerName);
Join an object into a collection
Parameters:
CollectionIDType = A flag indicating whether
CollectionName is a LOID or a context
name.
CollectionName = Either the LOID or the context path of
the collection object in question.
JoinerIDType = A flag indicating whether JoinerName is
a LOID or a context path.
JoinerName = Either a LOID or a context path for the
object being added to the collection.
Return Values:
0 on Failure
1 on Success
User Responsibility: None
int
JoinCollection_wData(
LegionIdType CollectionIdType, char* CollectionName,
LegionIdType JoinerIdType, char *JoinerName,
char **Attributes);
Join an object into a collection and give init data.
Parameters:
CollectionIDType = A flag indicating whether
CollectionName is a LOID or a context
name.
CollectionName = Either the LOID or the context path of
the collection object in question.
JoinerIDType = A flag indicating whether JoinerName is
a LOID or a context path.
JoinerName = Either a LOID or a context path for the
object being added to the collection.
Attributes = NULL terminated array of object
attributes.
Return Values:
0 on Failure
1 on Success
User Responsibility: None
int
LeaveCollection(
LegionIdType CollectionIdType, char* CollectionName,
LegionIdType LeaverIdType, char *LeaverName);
Indicate that an object is leaving a Collection.
Parameters:
CollectionIDType = A flag indicating whether
CollectionName is a LOID or a context
name.
CollectionName = Either the LOID or the context path of
the collection object in question.
LeaverIDType = A flag indicating whether LeaverName
is a LOID or a context path.
LeaverName = Either a LOID or a context path for the
object leaving the collection.
Return Values:
0 on Failure
1 on Success
User Responsibility: None
int
UpdateCollectionEntry(
LegionIdType CollectionIdType, char* CollectionName,
LegionIdType ConstituentIdType, char *ConstituentName,
char **Attributes);
Update a collection entry's data.
Parameters:
CollectionIDType = A flag indicating whether
CollectionName is a LOID or a context
name.
CollectionName = Either the LOID or the context path of
the collection object in question.
ConstituentIDType = A flag indicating whether
ConstituentName is a LOID or a
context path.
ConstituentName = Either a LOID or a context path for the
object whose collection data is being
updated.
Attributes = NULL terminated array of object
attributes.
Return Values:
0 on Failure
1 on Success
User Responsibility: None
CLegionCollectionData*
QueryCollection(
LegionIdType CollectionIdType, char *CollectionName,
char *QueryString);
Retrieve a list of queried information from the collection.
Parameters:
CollectionIDType = A flag indicating whether
CollectionName is a LOID or a context
name.
CollectionName = Either the LOID or the context path of
the collection object in question.
QueryString = A MESSIAHS-style query string
Return Values:
A NULL terminated list of CollectionData entries
Error Returns:
Returns NULL on failure
User Responsibility:
User is responsible for destroying the individual elements
returned, as well as for "free"ing up the array.
#ifdef_cplusplus
}
#endif
#endif
legion@Virginia.edu
http://legion.virginia.edu/
|