1.5 Legion attributes

The following functions deal with the attribute database that all Legion objects support.

int
AddAttribute(LegionIdType IdType,
    char *ObjName,
    char *Attribute
);

Add an attribute to an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.
    ObjName = The context path Name or the LOID of the
      object to which the attribute is to be added.
    Attribute = The string representation of the attribute to
      add to the database. This is of the form
       attribute_signature(attribute_value).

Return Values:
    1 on Success
    0 on Failure

User Responsibility: None

int
AddAttributes(LegionIdType IdType,
    char *ObjName,
    char **Attribute
);

Add a list of attributes to an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.
    ObjName = The context path Name or the LOID of the
      object to add the attribute to.
    Attribute = A NULL terminated list of the string
      representations of the attributes to add to
      the database. These are of the form
    attribute_signature(attribute_value).

Return Values:
    1 on Success
    0 on Failure

User Responsibility: None

int
ReplaceAttribute(LegionIdType IdType,
    char *ObjName,
    char *OldAttribute,
    char *NewAttribute
);

Replace an attribute in an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.
    ObjName = The context path Name, or the LOID of the
      object to add the attribute to.
    OldAttribute = The string representation of the old
      attribute to replace in the database. This is
      of the form attribute_signature(attribute_value).
    NewAttribute = The string representation of the new
      attribute to put into the database. This is of
      the form attribute_signature(attribute_value).

Return Values:
    1 on Success
    0 on Failure

User Responsibility: None

int
ReplaceAttributeSig(LegionIdType IdType,
    char *ObjName,
    char *OldAttributeSig,
    char *NewAttribute
);

Replace an attribute in an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.
    ObjName = The context path Name or the LOID of the
      object to which the attribute will be added.
    OldAttributeSig = The string representation of the old
      attribute's attribute signature.
    NewAttribute = The string representation of the new
      attribute to put into the database. This is of
      the form attribute_signature(attribute_value).

Return Values:
    1 on Success
    0 on Failure

User Responsibility: None

int
ReplaceAttributes(LegionIdType IdType,
    char *ObjName,
    char **OldAttributes,
    char **NewAttributes
);

Replace a list of attributes in an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.
    ObjName = The context path Name or the LOID of the
      object to add the attribute to.
    OldAttributes= A NULL terminated list of the string
      representations of the old attributes to
      replace in the database. These are of the
      form attribute_signature(attribute_value).
    NewAttributes= A NULL terminated list of the string
      representations of the new attributes to put
      into the database. These are of the form attribute_signature(attribute_value).

Return Values:
    1 on Success
    0 on Failure

User Responsibility: None

int
ReplaceAttributeSigs(LegionIdType IdType,
    char *ObjName,
    char **OldAttributeSigs,
    char **NewAttributes
);

Replace a list of attributes in an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.
    ObjName = The context path Name or the LOID of the
      object to add the attribute to.
    OldAttributeSigs =A NULL terminated list of the string
      representations of the old attribute
      signatures to replace in the database.
    NewAttributes= A NULL terminated list of the string
      representations of the new attributes to put
    into the database. These are of the form attribute_signature(attribute_value).

Return Values:
    1 on Success
    0 on Failure

User Responsibility: None

int
RemoveAttribute(LegionIdType IdType,
    char *ObjName,
    char *Attribute
);

Remove an attribute in an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.
    ObjName = The context path Name or the LOID of the
      object to add the attribute to.
    Attribute = The string representation of the attribute to
      remove from the object's attribute database.

Return Values:
    1 on Success
    0 on Failure

User Responsibility: None

int
RemoveAttributeSig(LegionIdType IdType,
    char *ObjName,
    char *AttributeSig
);

Remove an attribute in an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.

ObjName = The context path Name or the LOID of the
      object to add the attribute to.

Attribute = The string representation of the signature
      of the attribute to remove from the object's
      attribute database.

Return Values:
    1 on Success
    0 on Failure

User Responsibility: None

int
RemoveAttributes(LegionIdType IdType,
    char *ObjName,
    char **Attributes
);

Remove a set of attributes from an object's attribute database.

Parameters:

IdType = Flag indicating whether parameter is a
      LOID or a context path name.

ObjName = The context path Name or the LOID of the
      object to add the attribute to.

Attributes = A NULL terminated list of the string
      representations of the attributes to remove
      from the object's attribute database.

Return Values:
    1 on Success
    0 on Failure

User Responsibility: None

int
RemoveAttributeSigs(LegionIdType IdType,
    char *ObjName,
    char **AttributeSigs
);

Remove a set of attributes from an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.

ObjName = The context path Name or the LOID of the
      object to add the attribute to.

AttributeSigs = A NULL terminated list of the string
      representations of the signatures of
      attributes to remove from the object's
      attribute database.

Return Values:
    1 on Success
    0 on Failure

User Responsibility: None

char*
RetrieveAttribute(LegionIdType IdType,
    char *ObjName,
    char *Attribute
);

Retrieve an attribute from an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.
    ObjName = The context path Name or the LOID of the
      object to add the attribute to.
    Attribute = The string representation of the attribute to
      retrieve from the object's attribute
      database.

Return Values:
    The string representation of the attribute retrieved.

Error Return:
    NULL

User Responsibility:
    The user is responsible for "free"ing the returned attribute.

char**
RetrieveAttributes(LegionIdType IdType,
    char *ObjName,     char **Attributes
);

Retrieve a set of attributes from an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.
    ObjName = The context path Name or the LOID of the
      object to add the attribute to.
    Attributes = A NULL terminated list of the string
      representations of the attributes to retrieve
      from the object's attribute database.

Return Values:
    A NULL terminated list of the string representations of the
    attributes retrieved.

Error Return:
    NULL

User Responsibility:
    The user is responsible for "free"ing each returned attribute
    in the list as well as for "free"ing the list itself.

char*
RetrieveAttributeSig(LegionIdType IdType,
    char *ObjName,
    char *AttributeSig
);

Retrieve an attribute from an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.
    ObjName = Either the context path Name, or the LOID
      of the object to add the attribute to.
    AttributeSig = The string representation of the signature
      of the attribute to retrieve from the object's
      attribute database.

Return Values:
    The string representation of the attribute retrieved.

Error Return:
    NULL

User Responsibility:
    The user is responsible for "free"ing the returned attribute.

char**
RetrieveAttributeSigs(LegionIdType IdType,
    char *ObjName,     char **AttributeSigs
);

Retrieve a list of attributes from an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.
    ObjName = The context path Name or the LOID of the
      object to add the attribute to.
    AttributeSigs = A NULL terminated list of the string
      representations of the signatures of
      attributes to retrieve from the object's
      attribute database.

Return Values:
    A NULL terminated list of the string representations of the
    attributes retrieved.

Error Return:
    NULL

User Responsibility:
    The user is responsible for "free"ing each returned attribute
    in the list as well as for "free"ing the list itself.

char**
RetrieveAllAttributes(LegionIdType IdType, char *ObjName);

Retrieve all of the attributes from an object's attribute database.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.
    ObjName = The context path Name or the LOID of the
      object to add the attribute to.

Return Values:
    A NULL terminated list of the string representations of the
    attributes retrieved.

Error Return:
    NULL

User Responsibility:
    The user is responsible for "free"ing each returned attribute
    in the list as well as for "free"ing the list itself.

The following function deals with the interfaces to Legion objects.

char**
GetInterface(LegionIdType, char *ObjName);

Retrieve all of the method signatures for a Legion object.

Parameters:
    IdType = Flag indicating whether parameter is a
      LOID or a context path name.
    ObjName = The context path Name or the LOID of the
      object to retrieve the interface for.

Return Values:
    A NULL terminated list of the string representations of the
    method's which are currently part of the indicated object's
    interface.

Error Return:
    NULL

User Responsibility:
    The user is responsible for "free"ing each returned signature
    in the list as well as for "free"ing the list itself.



Back to grid library table of contents
Next section