GWE::GInformationInterface Class Reference

Public interface to information and updates for elements. More...

#include <GInformationInterface.h>

Inheritance diagram for GWE::GInformationInterface:

Inheritance graph
[legend]
Collaboration diagram for GWE::GInformationInterface:

Collaboration graph
[legend]
List of all members.

Signals

void elementChanged (const GCS::GElementID &element)
void elementEnergyChanged (const GCS::GElementID &element, const GCS::GEnergy &changedEnergy)
void elementFormChanged (const GCS::GElementID &element, const GCS::GForm &changedForm)
void elementDataChanged (const GCS::GElementID &element, const QString &xmlpath)
void elementParentChanged (const GCS::GElementID &element, const GCS::GElementID &new_parent, const GCS::GElementID &old_parent, const GCS::GMatrix44 &transformation)
void elementAdded (const GCS::GElementID &element, const GCS::GElementID &parent)
void elementUpdated (const GCS::GElementID &element)
void elementRemoved (const GCS::GElementID &element)

Public Member Functions

 GInformationInterface (QObject *parent=0)
virtual ~GInformationInterface ()
virtual const GCS::GElementread (const GCS::GElementID &id) const
virtual GCS::GElementID getParent (const GCS::GElementID &child) const
virtual QList< GCS::GElementIDgetChildren (const GCS::GElementID &parent) const
virtual GCS::GElementID getConnection (const GCS::GElementID &element) const
virtual QString getElementOwner (const GCS::GElementID &element) const
virtual void setDataController (GDataController *data)

Protected Slots

virtual void collectParentChanged (const GCS::GElementID &, const GCS::GElementID &, const GCS::GMatrix44 &)
virtual void connectOpenedElement (const GCS::GElementID &)
virtual void collectEnergyChanged (const GCS::GEnergy &energy)
virtual void collectFormChanged (const GCS::GForm &form)
virtual void collectElementDataChanged (const QString &xmlpath)
virtual void collectElementAdded (const GCS::GElementID &)

Protected Attributes

GDataControllerData

Detailed Description

Public interface to information and updates for elements.

Author:
Raphael Langerhorst
Todo:
make signals functional


Constructor & Destructor Documentation

GWE::GInformationInterface::GInformationInterface ( QObject *  parent = 0  ) 

Constructor. You must set the data controller with setDataController() before using the information interface!

GWE::GInformationInterface::~GInformationInterface (  )  [virtual]

Virtual Destructor. Does not delete Data.


Member Function Documentation

void GWE::GInformationInterface::collectElementAdded ( const GCS::GElementID  )  [protected, virtual, slot]

Emitted when an element is added to the data.

See also:
elementFormChanged()

void GWE::GInformationInterface::collectElementDataChanged ( const QString &  xmlpath  )  [protected, virtual, slot]

Collects and emits data change notifications of elements.

See also:
elementFormChanged()

void GWE::GInformationInterface::collectEnergyChanged ( const GCS::GEnergy energy  )  [protected, virtual, slot]

Collects and emits energy change notifications of elements.

See also:
elementEnergyChanged()

void GWE::GInformationInterface::collectFormChanged ( const GCS::GForm form  )  [protected, virtual, slot]

Collects and emits form change notifications of elements.

See also:
elementFormChanged()

void GWE::GInformationInterface::collectParentChanged ( const GCS::GElementID ,
const GCS::GElementID ,
const GCS::GMatrix44  
) [protected, virtual, slot]

Collects and emits parent change notifications of elements.

See also:
elementParentChanged()

void GWE::GInformationInterface::connectOpenedElement ( const GCS::GElementID  )  [protected, virtual, slot]

Always called when an element was opened. It connects signals from the element to be able to react, that is, to emit signals from the GInformationInterface.

void GWE::GInformationInterface::elementAdded ( const GCS::GElementID element,
const GCS::GElementID parent 
) [signal]

Emitted whenever a new element is created or added.

Parameters:
parent the ID of the parent element of the created element

void GWE::GInformationInterface::elementChanged ( const GCS::GElementID element  )  [signal]

Emitted whenever the element changes in some way. Emitted after the element has changed.

Parameters:
element the element that has changed.
See also:
GCS::GElement

elementUpdated()

void GWE::GInformationInterface::elementDataChanged ( const GCS::GElementID element,
const QString &  xmlpath 
) [signal]

Emitted when the agent changed some data in the xml element data object.

See also:
GCS::GObject::ElementData

void GWE::GInformationInterface::elementEnergyChanged ( const GCS::GElementID element,
const GCS::GEnergy changedEnergy 
) [signal]

Emitted when the element's energy has changed.

See also:
GCS::GObject::Energy

void GWE::GInformationInterface::elementFormChanged ( const GCS::GElementID element,
const GCS::GForm changedForm 
) [signal]

Emitted when the element's form has changed.

See also:
GCS::GObject::Form

void GWE::GInformationInterface::elementParentChanged ( const GCS::GElementID element,
const GCS::GElementID new_parent,
const GCS::GElementID old_parent,
const GCS::GMatrix44 transformation 
) [signal]

Emitted whenever the parent of an element changes. The signal is emitted after the element has changed the parent.

Parameters:
element the element which changed the parent
old_parent the old parent of the reparented element
new_parent the new parent of the reparented element
Todo:
this is not yet in use!

void GWE::GInformationInterface::elementRemoved ( const GCS::GElementID element  )  [signal]

Emitted whenever an element is deleted.

void GWE::GInformationInterface::elementUpdated ( const GCS::GElementID element  )  [signal]

Emitted after the GWE has updated the element. An update can change the element in ANY way. Thus this signal should be treated like all data of an element has changed, including energy, form and elementdata.

QList< GCS::GElementID > GWE::GInformationInterface::getChildren ( const GCS::GElementID parent  )  const [virtual]

Parameters:
parent the element of which the children should be returned.
Returns:
list of children of given parent.

GCS::GElementID GWE::GInformationInterface::getConnection ( const GCS::GElementID element  )  const [virtual]

Returns:
ID of the connected element of given element.

QString GWE::GInformationInterface::getElementOwner ( const GCS::GElementID element  )  const [virtual]

This only works with DataController classes that support multiple owners.

Returns:
NetworkID of the server that owns given element

GCS::GElementID GWE::GInformationInterface::getParent ( const GCS::GElementID child  )  const [virtual]

Parameters:
child the element of which the parent should be returned.
Returns:
GCS::GElementID of parent element of given child.

const GCS::GElement * GWE::GInformationInterface::read ( const GCS::GElementID id  )  const [virtual]

Returns:
const element with given ID for read-only purposes

void GWE::GInformationInterface::setDataController ( GDataController data  )  [virtual]

Set the data controller this information interface should be used with.


Member Data Documentation

GDataController* GWE::GInformationInterface::Data [protected]

Used to access all data.

Note:
Data is not managed by GInformationInterface, it needs to be deleted somewhere else - and after GInformationInterface.


The documentation for this class was generated from the following files:
Generated on Thu Nov 16 07:49:37 2006 for G System by  doxygen 1.4.7