Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

GWE::GWEInterfaceSimple Class Reference

Provides local non-persistent GWE functionality. More...

#include <GWEInterfaceSimple.h>

Inheritance diagram for GWE::GWEInterfaceSimple:

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

Collaboration graph
[legend]
List of all members.

Public Slots

virtual void radiateInfluence (GCS::GElementInfluence &influence)
virtual void routeInfluence (const GCS::GElementID &destination, GCS::GElementInfluence &influence)

Public Member Functions

 GWEInterfaceSimple ()
virtual ~GWEInterfaceSimple ()
virtual bool add (GCS::GElement *)
virtual const GCS::GElementread (const GCS::GElementID &) const
virtual GCS::GElementopen (const GCS::GElementID &)
virtual bool close (GCS::GElement *)
virtual bool postDelete (GCS::GElement *)

Protected Slots

virtual void newElementCreated (GCS::GElement *element)
virtual void elementRemoved (const GCS::GElementID &ID)
virtual void elementReparented (GCS::GElement *element, const GCS::GElementID &oldParent, const GCS::GElementID &newParent)

Protected Member Functions

GCS::GElementgetElement (const GCS::GElementID &id) const
QPtrList< GCS::GElementfindInRange (GCS::GElement *source)

Private Attributes

QPtrList< GCS::GElementElements
QMutex * ElementListMutex

Detailed Description

Provides local non-persistent GWE functionality.

Author:
Raphael Langerhorst
GWEInterfaceSimple implements the GWEInterface interface, all functionality provided in this class works as stated in the documentation of the GWEInterface class;

the only exception is that data can't be kept persistent - all elements are only held in application memory and don't survive a shutdown/restart cycle.


Constructor & Destructor Documentation

GWE::GWEInterfaceSimple::GWEInterfaceSimple  ) 
 

Constructor.

GWE::GWEInterfaceSimple::~GWEInterfaceSimple  )  [virtual]
 

Virtual destructor


Member Function Documentation

bool GWE::GWEInterfaceSimple::add GCS::GElement  )  [virtual]
 

See also:
GWEInterface::add()

Implements GWE::GWEInterface.

bool GWE::GWEInterfaceSimple::close GCS::GElement  )  [virtual]
 

See also:
GWEInterface::close(), GWEInterface::open()

Implements GWE::GWEInterface.

void GWE::GWEInterfaceSimple::elementRemoved const GCS::GElementID ID  )  [protected, virtual, slot]
 

Called when a element should be removed

Note:
used internally (protected)

void GWE::GWEInterfaceSimple::elementReparented GCS::GElement element,
const GCS::GElementID oldParent,
const GCS::GElementID newParent
[protected, virtual, slot]
 

Called when an element changes its parent.

Note:
used internally (protected)

Transformation is handled by element itself, this slot just exists to allow information updating. In a networked GWE this might cause responsibility shifting between GWE server instances.

QPtrList< GElement > GWE::GWEInterfaceSimple::findInRange GCS::GElement source  )  [protected]
 

Returns a list of all elements that are in range of the source. This means the source's parent, all children and all elements that are in range of the source by checking the form attribute. If the source element has no form it is expected to be present in the whole parent, so all siblings are in range.

Note:
If the parent itself overlapts with another element then only elements with the same parent as the source are listed, as other elements don't have direct contact.

GElement * GWE::GWEInterfaceSimple::getElement const GCS::GElementID id  )  const [protected]
 

Searches for the element with given ID and returns it. If the element does not exist, NULL is returned.

void GWE::GWEInterfaceSimple::newElementCreated GCS::GElement element  )  [protected, virtual, slot]
 

Called when a new element is being created

Note:
used internally (protected)

GElement * GWE::GWEInterfaceSimple::open const GCS::GElementID  )  [virtual]
 

See also:
GWEInterface::open(), GWEInterface::close()

Implements GWE::GWEInterface.

bool GWE::GWEInterfaceSimple::postDelete GCS::GElement  )  [virtual]
 

See also:
GWEInterface::postDelete()

Implements GWE::GWEInterface.

void GWE::GWEInterfaceSimple::radiateInfluence GCS::GElementInfluence influence  )  [virtual, slot]
 

Note:
To find all affected elements GWEInterfaceSimple::findInRange is used.
See also:
GWEInterface::radiateInfluence(), findInRange()

Implements GWE::GWEInterface.

const GElement * GWE::GWEInterfaceSimple::read const GCS::GElementID  )  const [virtual]
 

See also:
GWEInterface::read()

Implements GWE::GWEInterface.

void GWE::GWEInterfaceSimple::routeInfluence const GCS::GElementID destination,
GCS::GElementInfluence influence
[virtual, slot]
 

See also:
GWEInterface::routeInfluence()

Implements GWE::GWEInterface.


Member Data Documentation

QMutex* GWE::GWEInterfaceSimple::ElementListMutex [private]
 

Used for locking the elements list. This is important for threaded access.

QPtrList<GCS::GElement> GWE::GWEInterfaceSimple::Elements [private]
 

Represents the whole storage mechanism for this "simple" GWE.

Todo:
use some hash table for this (GElementID as identifier)...


The documentation for this class was generated from the following files:
Generated on Thu Oct 21 21:18:26 2004 for G System by doxygen 1.3.6