Detailed Description

This class provides access to the active space database. The database can be querried to discover active entites that are available in the space.

Member Function Documentation

void GaiaSR::deleteEntityFromCache

(

char *

ucr

)

Removes an entity from the cache.

Parameters:

ucr

Entity's UCR.

void GaiaSR::emptyCache

(

)

Deletes all elements from the internal cache.

This method is automatically called by the "getEntities" and "getEntity" methods.

CachedEntries* GaiaSR::getCachedEntryFromUCR

(

char *

ucr

)

Returns a struct with a list of entities.

The struct has to members: count_ (with the number of returned entities, and entrie_, an array of pointers to the elements. Every element includes the name of the component, the ucr, and the object reference. A UCR can be associated to more than one entity when using alias. For example, ExecutionNodes register themselves as displays and execution nodes. Therefore, the same UCR has associated two different names: ExecutionNode and Display. The caller is responsible for deallocating the memory.

Parameters:

ucr

Entity's UCR.

Returns:

Pointer to CachedEntries if no problems are found. 0 otherwise.

Object* GaiaSR::getCachedObjectFromUCR

(

char *

ucr

)

Returns a reference to the specified object from the internal cache.

Parameters:

ucr

Entity's UCR.

Returns:

Pointer to the object if no problems are found. 0 otherwise.

int GaiaSR::getEntities

(

char ***

entities,

char *

query,

bool

retry = true

)

Returns a list of entities that match the specified query.

Parameters:

entities

Pointer to an array of strings. Entries are the UCRs of the entities that matched the query

query

CORBA Trader based query. Ex: Type=='Display' and Location=='2401'

retry

If the Space Repository returns an empty list and retry is true, the GaiaSR retries a number of times automatically. Useful if you just created a component and need to resolve it.

Returns:

>=0 if no problems are found. <0 otherwise.

Object* GaiaSR::getEntity

(

char *

ucr,

bool

retry = true

)

Returns an object reference to the entity identified by the provided UCR.

Parameters:

ucr

Entity UCR.

retry

If the Space Repository returns an empty list and retry is true, the GaiaSR retries a number of times automatically. Useful if you just created a component and need to resolve it.

Returns:

Pointer to the object if no problems are found. 0 otherwise.

char GaiaSR::init

(

char *

spaceName = 0,

char *

ior = 0

)

Initializes the wrapper.

Parameters:

spaceName

Name of the space we will interact with.If it is null, the method will try to use the "ior" parameter. If "ior" is also null, the wrapper will automatically connect to the local space.

ior

IOR of the space we will interact with. If it is null, the method will try to use the "location" parameter. If "location" is also null, the wrapper will automatically connect to the local space.

Returns:

>0 if no problems are found. <0 otherwise.

The documentation for this class was generated from the following file: