#include <GObject.h>
Inheritance diagram for GCS::GObject:


Public Member Functions | |
| GObject (GEnergy *energy, GForm *form, const GElementID &parent, const GElementID &ID, const GElementID &connection, GElementData *ElementData, const GWorldData *WorldData) | |
| virtual | ~GObject () |
| bool | hasEnergy () const |
| GEnergy * | getEnergy () |
| const GEnergy * | getEnergy () const |
| bool | hasForm () const |
| GForm * | getForm () |
| const GForm * | getForm () const |
| const GElementID & | getParent () const |
| const GElementID & | getID () const |
| const GElementID & | getConnection () const |
| bool | hasElementData () const |
| const GElementData * | getElementData () const |
| GElementData * | getElementData () |
| bool | hasWorldData () const |
| const GWorldData * | getWorldData () const |
| void | reparent (const GElementID &new_parent) |
| bool | isChild (const GElementID &) const |
| QList< GElementID > | getChildren () const |
Private Attributes | |
| GEnergy * | Energy |
| GForm * | Form |
| GElementID | Parent |
| const GElementID | ID |
| const GElementID | Connection |
| GElementData * | ElementData |
| const GWorldData * | WorldData |
See the detailed description of GObject::Connection for another central idea of the G system.
Parent-child-relation (an advice for agent design):
Since the world is built in a hierarchical structure every object can contain sub-elements so there should be only one element that is its own parent - the universe itself.
The energy difference between children and their parents also affect the energy distribution of the parent among its children. This means that if a child's energy is like the parent's energy the child is receiving (= is able to receive) more energy from the parent than children which have completely different kinds of energy because they are not responsive to the kind of energy given.
In other words: the parent distributes its own energy flow among its children according to the children's energy levels; the more the child's energy is like the parent's, the more energy the child can receive.
Move all inline methods into implementation files.
| GCS::GObject::GObject | ( | GEnergy * | energy, | |
| GForm * | form, | |||
| const GElementID & | parent, | |||
| const GElementID & | ID, | |||
| const GElementID & | connection, | |||
| GElementData * | ElementData, | |||
| const GWorldData * | WorldData | |||
| ) |
Constructor
| GCS::GObject::~GObject | ( | ) | [virtual] |
A virtual destructor allows cleaner subclassing.
| QList< GElementID > GCS::GObject::getChildren | ( | ) | const |
| const GElementID & GCS::GObject::getConnection | ( | ) | const |
| GElementData * GCS::GObject::getElementData | ( | ) |
| const GElementData * GCS::GObject::getElementData | ( | ) | const |
| const GEnergy * GCS::GObject::getEnergy | ( | ) | const |
| GEnergy * GCS::GObject::getEnergy | ( | ) |
| const GForm * GCS::GObject::getForm | ( | ) | const |
| GForm * GCS::GObject::getForm | ( | ) |
| const GElementID & GCS::GObject::getID | ( | ) | const |
| const GElementID & GCS::GObject::getParent | ( | ) | const |
| const GWorldData * GCS::GObject::getWorldData | ( | ) | const |
| bool GCS::GObject::hasElementData | ( | ) | const |
| bool GCS::GObject::hasEnergy | ( | ) | const |
| bool GCS::GObject::hasForm | ( | ) | const |
| bool GCS::GObject::hasWorldData | ( | ) | const |
| bool GCS::GObject::isChild | ( | const GElementID & | ) | const |
Checks if given element is registered as a child.
| void GCS::GObject::reparent | ( | const GElementID & | new_parent | ) |
Sets given element ID as new parent of this element.
const GElementID GCS::GObject::Connection [private] |
The element ID of the connected element. Connections also represent a central idea of the G system, since any thing can only "exist" if it is concerned with something. This idea can be applied to every setting. Also multiple elements are needed to represent a complex element that is concerned with multiple things. ... think about it ...
GElementData* GCS::GObject::ElementData [private] |
Can hold arbitrary additional element data. This can be seen as an element wide storage facility that is shared among all agents. All data stored here is also automatically transported through the network.
GEnergy* GCS::GObject::Energy [private] |
The object's energy.
GForm* GCS::GObject::Form [private] |
The object's form.
const GElementID GCS::GObject::ID [private] |
The element's ID.
GElementID GCS::GObject::Parent [private] |
The element's parent's ID.
const GWorldData* GCS::GObject::WorldData [private] |
This is an interface that can be used by agents to access data from other elements (read only). The implementation also depends on the GWE! It is not the GObject's responsibility to delete the WorldData object.
1.4.7