Eris::TypeInfo Class Reference

The representation of an Atlas type (i.e a class or operation definition). More...

#include <TypeInfo.h>

List of all members.

Public Member Functions

bool isA (TypeInfoPtr ti)
 Test whether this type inherits (directly or indirectly) from the specific class.
bool isBound () const
 Check the bound flag for this node; if false then recursivley check parents until an authorative is found.
bool hasUnresolvedChildren () const
 Test if there are child types of the type, which have not yet been retrieved from the server.
void resolveChildren ()
 Retrive all child types from the server.
bool operator== (const TypeInfo &x) const
 efficent comparisom of types (uses type ids if possible)
bool operator< (const TypeInfo &x) const
 efficent ordering of type (uses type ids if possible)
const std::string & getName () const
 the unique type name (matches the Atlas type)
const TypeInfoSet & getChildren () const
const TypeInfoSet & getParents () const

Protected Member Functions

 TypeInfo (const std::string &id, TypeService *)
 forward constructor, when data is not available
 TypeInfo (const Atlas::Objects::Root &atype, TypeService *)
 full constructor, if an INFO has been received
void validateBind ()
void processTypeData (const Atlas::Objects::Root &atype)
 process the INFO data

Protected Attributes

sigc::signal< void, TypeInfo * > Bound
 Emitted when the type is bound, i.e there is an unbroken graph of TypeInfo instances through every ancestor to the root object.

Friends

class TypeService
class TypeBoundRedispatch


Detailed Description

The representation of an Atlas type (i.e a class or operation definition).

This class supports efficent inheritance queries, and traversal of the type hierarchy. Atlas types have a unique ID, and types can be retrieved using this value. Where an Atlas::Objects instance, or an Atlas::Message::Element representing an Atlas object is being examine, it is much more efficent to use the 'getSafe' methods rather than extracting PARENTS[0] and calling findSafe. This is because the getSafe methods may take advantage of integer type codes stored in the object, which avoids a map lookup to locate the type.

Note that the core Atlas::Objects heirarchy (as defined in the protocols/atlas/spec section of CVS) is loaded from the 'atlas.xml' file at startup, and that other types are queried from the server. In general, Eris will automatically delay processing operations and entities until the necessary type data has become available, without intervention by the client. However, certain routines may throw the 'OperationBlocked' exception, which must be forward to the Connection instance for handling.


Member Function Documentation

bool Eris::TypeInfo::isA ( TypeInfoPtr  ti  ) 

Test whether this type inherits (directly or indirectly) from the specific class.

If this type is not bound, this may return false-negatives.

void Eris::TypeInfo::resolveChildren (  ) 

Retrive all child types from the server.

This will log an error and do nothing if no unresolved children exist.


Member Data Documentation

sigc::signal<void, TypeInfo*> Eris::TypeInfo::Bound [protected]

Emitted when the type is bound, i.e there is an unbroken graph of TypeInfo instances through every ancestor to the root object.


The documentation for this class was generated from the following files:
Generated on Tue Feb 12 04:39:14 2008 for Eris by  doxygen 1.5.4