1 #ifndef ERIS_TYPE_INFO_H 2 #define ERIS_TYPE_INFO_H 5 #include "TypeService.h" 6 #include <Atlas/Message/Element.h> 8 #include <sigc++/trackable.h> 31 class TypeInfo :
virtual public sigc::trackable
69 const std::string&
getName()
const;
100 const Atlas::Message::Element*
getAttribute(
const std::string& attributeName)
const;
114 void setAttribute(
const std::string& attributeName,
const Atlas::Message::Element& element);
120 const Atlas::Message::ListType&
getEntities()
const;
150 void onAttributeChanges(
const std::string& attributeName,
const Atlas::Message::Element& element);
164 void extractDefaultAttributes(
const Atlas::Objects::Root& atype);
169 TypeInfoSet m_children;
172 TypeInfoSet m_ancestors;
175 const std::string m_name;
176 std::string m_objType;
178 StringSet m_unresolvedChildren;
185 Atlas::Message::MapType m_attributes;
190 Atlas::Message::ListType m_entities;
sigc::signal< void > Bound
Emitted when the type is bound, i.e there is an unbroken graph of TypeInfo instances through every an...
Definition: TypeInfo.h:141
void processTypeData(const Atlas::Objects::Root &atype)
process the INFO data
Definition: TypeInfo.cpp:80
bool isA(TypeInfoPtr ti)
Test whether this type inherits (directly or indirectly) from the specific class. ...
Definition: TypeInfo.cpp:46
const TypeInfoSet & getChildren() const
Gets the currently resolved child TypeInfo instances.
Definition: TypeInfo.h:213
The representation of an Atlas type (i.e a class or operation definition).
Definition: TypeInfo.h:31
bool hasUnresolvedChildren() const
Test if there are child types of the type, which have not yet been retrieved from the server...
Definition: TypeInfo.cpp:60
bool operator<(const TypeInfo &x) const
efficent ordering of type (uses type ids if possible)
Definition: TypeInfo.cpp:161
TypeInfo(const std::string &id, TypeService *)
forward constructor, when data is not available
Definition: TypeInfo.cpp:23
const Atlas::Message::ListType & getEntities() const
Gets a list of entities, if the type is an Archetype.
Definition: TypeInfo.h:223
Definition: TypeBoundRedispatch.h:13
Every Eris class and type lives inside the Eris namespace; certain utility functions live in the Util...
Definition: Account.cpp:34
bool operator==(const TypeInfo &x) const
efficent comparisom of types (uses type ids if possible)
Definition: TypeInfo.cpp:153
const TypeInfoPtr & getParent() const
Gets the currently resolved parent TypeInfo instances.
Definition: TypeInfo.h:218
bool isBound() const
Check the bound flag for this node; if false then recursivley check parents until an authorative is f...
Definition: TypeInfo.h:199
const std::string & getName() const
the unique type name (matches the Atlas type)
Definition: TypeInfo.h:204
void onAttributeChanges(const std::string &attributeName, const Atlas::Message::Element &element)
Called before the AttributeChanges signal is emitted.
Definition: TypeInfo.cpp:282
void refresh()
Request update to the type info from the server.
Definition: TypeInfo.cpp:294
A service class querying and caching types.
Definition: TypeService.h:24
const Atlas::Message::MapType & getAttributes() const
Gets the default attributes for this entity type.
Definition: TypeInfo.h:194
const std::string & getObjType() const
the object type of this Type or Archetype
Definition: TypeInfo.h:209
sigc::signal< void, const std::string &, const Atlas::Message::Element & > AttributeChanges
Emitted before an attribute changes.
Definition: TypeInfo.h:106
const Atlas::Message::Element * getAttribute(const std::string &attributeName) const
Gets the value of the named attribute.
Definition: TypeInfo.cpp:251
void setAttribute(const std::string &attributeName, const Atlas::Message::Element &element)
Sets an attribute.
Definition: TypeInfo.cpp:270
void resolveChildren()
Retrive all child types from the server.
Definition: TypeInfo.cpp:65