1.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 the
      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 the
      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 the
      LeaverName is a LOID or a contexpath.
   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 the
      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
);

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



Back to grid library table of contents
Next section