6.9 Class object
The following section contains a set of functions which interface directly with Class objects.
int
AddImplementation(LegionIdType CIdType, char *ClassName,
LegionIdType IIdType, char *ImplName, int Arch);
Adds a new implementation of a class binary to the given class.
Parameters:
CIdType = A flag indicating whether ClassName is a
LOID or a context path.
ClassName = The name of the class to add the
implementation to.
IIdType = A flag indicating whether ImplName is a
LOID or a context path.
ImplName = The name of an implementation object to
add.
Arch = The architecture for which the
implementation is valid.
Return Values:
1 on Success
0 on Failure
User Responsibility: None
int
DeleteInstance(LegionIdType CIdType, char *ClassName,
LegionIdType IIdType, char *InstanceNm);
Asks a class to delete one of its instances.
Parameters:
CIdType = A flag indicating whether ClassName is a
LOID or a context path.
ClassName = The name of the class to delete the
instance from.
IIdType = A flag indicating whether InstanceNm is a
LOID or a context path.
InstanceNm= The name of an object instance to delete.
Return Values:
1 on Success
0 on Failure
User Responsibility: None
int
ActivateInstance(LegionIdType CIdType, char *ClassName,
CInstancePlacementInfo CInfo);
Asks a class to activate one of its instances.
Parameters:
CIdType = A flag indicating whether ClassName is a
LOID or a context path.
ClassName = The name of the class to activate the
instance for.
CInfo = A CInstancePlacementInfo variable
indicating which instance to activate and
where.
Return Values:
1 on Success
0 on Failure
User Responsibility: None
int
DeactivateInstance(LegionIdType CIdType, char *ClassName,
LegionIdType OIdType, char *ObjName);
Asks a class to deactivate one of its instances.
Parameters:
CIdType = A flag indicating whether ClassName is a
LOID or a context path.
ClassName = The name of the class to deactivate the
instance for.
OIdType = A flag indicating whether ObjName is a
LOID or a context path.
ObjName = A LOID or context path indicating which
object to deactivate.
Return Values:
1 on Success
0 on Failure
User Responsibility: None
int
ForcedDeactivateInstance(
LegionIdType CIdType, char *ClassName,
LegionIdType OIdType, char *ObjName);
Asks a class to deactivate one of its instances. If the object is in the going-up state or in the going-down state, this call will fail.
Parameters:
CIdType = A flag indicating whether ClassName is a
LOID or a context path.
ClassName = The name of the class whose instance is to
be deactivated.
OIdType = A flag indicating whether ObjName is a
LOID or a context path.
ObjName = A LOID or context path indicating which
object to deactivate.
Return Values:
1 on Success
0 on Failure
User Responsibility:
None
CUVaL_InstanceRecord*
GetInstanceList(LegionIdType CIdType, char *ClassName);
Asks a class to return a list of all of the instances that it is currently managing.
Parameters:
CIdType = A flag indicating whether ClassName is a
LOID or a context path.
ClassName = The name of the class to retrieve the list
from.
Return Values:
A NULL terminated list of CUVaL_InstanceRecords where
each element in the array is the UVaL_InstanceRecord for
one of the objects that the class is managing.
Error Return:
NULL
User Responsibility:
The user is responsible for destroying each
CUVaL_InstanceRecord in the list, as well as
for "free"ing the list itself.
legion@Virginia.edu
http://legion.virginia.edu/
|