Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

amire::component::ComposedComponent Class Reference

Inheritance diagram for amire::component::ComposedComponent:

amire::component::Component amire::component::ComponentContext amire::component::Handler List of all members.

Public Member Functions

 ComposedComponent (ComponentManager *componentManager, const std::string &prototypeName=std::string())
virtual ~ComposedComponent ()
virtual void reinitializeEngine (MREngine *engine)
virtual void functionalCallback (MREngine *engine)
virtual osg::ref_ptr< const
Component
getComponentPrototype (const std::string &name)
virtual osg::ref_ptr< const
amire::property::StructProperty
getConfigurationProperty () const
virtual osg::ref_ptr< amire::property::StructPropertyrequestConfigurationProperty ()
void setConfigurationPropertyExport (osg::ref_ptr< ConfigurationPropertyExport > configurationExport)
const osg::ref_ptr< ConfigurationPropertyExport > & getConfigurationPropertyExport () const
void add (const osg::ref_ptr< Component > &component)
void remove (const osg::ref_ptr< Component > &component)
const std::vector< osg::ref_ptr<
SlotExport > > & 
getInSlotExports () const
const std::vector< osg::ref_ptr<
SlotExport > > & 
getOutSlotExports () const
void exportInSlot (const osg::ref_ptr< Component > &component, const std::string &inSlotName)
void exportOutSlot (const osg::ref_ptr< Component > &component, const std::string &outSlotName)
void exportInSlot (const osg::ref_ptr< Component > &component, const std::string &internInSlotName, const std::string &externInSlotName)
void exportOutSlot (const osg::ref_ptr< Component > &component, const std::string &internOutSlotName, const std::string &externOutSlotName)
void unexportInSlot (const osg::ref_ptr< Component > &component, const std::string &internInSlotName)
void unexportOutSlot (const osg::ref_ptr< Component > &component, const std::string &internOutSlotName)
void unexportInSlot (const std::string &externInSlotName)
void unexportOutSlot (const std::string &externOutSlotName)
void eliminateUnusedExports ()
void updateRequiredExports ()
int getExternOutSlotId (const osg::ref_ptr< const Component > &component, int internOutSlotId) const
int getExternInSlotId (const osg::ref_ptr< const Component > &component, int internInSlotId) const

Protected Member Functions

virtual void changedInSlots (const osg::ref_ptr< const Component > &component)
virtual void changedOutSlots (const osg::ref_ptr< const Component > &component)
virtual void removedInSlot (const osg::ref_ptr< const Component > &component, int inSlotId, const std::string &inSlotName)
virtual void removedOutSlot (const osg::ref_ptr< const Component > &component, int outSlotId, const std::string &outSlotName)
virtual void renamedInSlot (const osg::ref_ptr< const Component > &component, int inSlotId, const std::string &oldInSlotName, const std::string &newInSlotName)
virtual void renamedOutSlot (const osg::ref_ptr< const Component > &component, int outSlotId, const std::string &oldOutSlotName, const std::string &newOutSlotName)
virtual void changedInSlotType (const osg::ref_ptr< const Component > &component, int inSlotId, const std::string &inSlotName, const osg::ref_ptr< const amire::property::PropertyType > &oldInSlotType, const osg::ref_ptr< const amire::property::PropertyType > &newInSlotType)
virtual void changedOutSlotType (const osg::ref_ptr< const Component > &component, int outSlotId, const std::string &outSlotName, const osg::ref_ptr< const amire::property::PropertyType > &oldOutSlotType, const osg::ref_ptr< const amire::property::PropertyType > &newOutSlotType)
virtual std::string getQualifier () const
virtual osg::ref_ptr< Componentclone (ComponentContext *context) const
virtual void receiveInSlotProperty (int inSlotId, const osg::ref_ptr< const amire::property::Property > &property)
virtual osg::ref_ptr< const
amire::property::Property
emitOutSlotProperty (int outSlotId)
virtual void configurationPropertyModified ()
virtual void initMetaInformation ()

Detailed Description

An instance of the composed component contains a set of components, a set of connections between the components and a set of exported in- and out-slots. When you have a network of components which does something special that should be reusable you grab this network and wrap it into a composed component. After the registration of this composed component at the component manager it is available for reuse and can be handled like each normal component implementation. The use of a composed component instance is only allowed for the description of a new (composed) pomponent prototype.


Constructor & Destructor Documentation

amire::component::ComposedComponent::ComposedComponent ComponentManager componentManager,
const std::string &  prototypeName = std::string()
 

virtual amire::component::ComposedComponent::~ComposedComponent  )  [virtual]
 


Member Function Documentation

void amire::component::ComposedComponent::add const osg::ref_ptr< Component > &  component  ) 
 

Adds a component to the set of components contained in this composed component. Each in- and out-slot connection of the given component must be analyzed. Connections to an in- or out-slot export of this composed component must be connected directly to the involved component inside the composed component. After the integration of the given component into the composed component ist connections to a component in- or out-slot outside of the composed component must be reconnected. Each slot of the given component that is involved in such a connection must be exported and the involved slot of the outside component must be connected to the exported slot. Slot exports that are required before the integration of the given component and are not required after the integration are not removed from the export list. Under the assumption that the export only was include into the export list to uphold the connection between an inside and an outside component the removal of the export would be the correct behavior. But this is only one special case and therefore it cannot be the default behavior. An assert exception is thrown when the component is null or it is already part of the composed component. *DEPRICATED*

virtual void amire::component::ComposedComponent::changedInSlots const osg::ref_ptr< const Component > &  component  )  [protected, virtual]
 

Informs the context about modified in-slots of a component.

Reimplemented from amire::component::ComponentContext.

virtual void amire::component::ComposedComponent::changedInSlotType const osg::ref_ptr< const Component > &  component,
int  inSlotId,
const std::string &  inSlotName,
const osg::ref_ptr< const amire::property::PropertyType > &  oldInSlotType,
const osg::ref_ptr< const amire::property::PropertyType > &  newInSlotType
[protected, virtual]
 

Informs the context about a type modified slot.

Reimplemented from amire::component::ComponentContext.

virtual void amire::component::ComposedComponent::changedOutSlots const osg::ref_ptr< const Component > &  component  )  [protected, virtual]
 

Informs the context about modified out-slots of a component.

Reimplemented from amire::component::ComponentContext.

virtual void amire::component::ComposedComponent::changedOutSlotType const osg::ref_ptr< const Component > &  component,
int  outSlotId,
const std::string &  outSlotName,
const osg::ref_ptr< const amire::property::PropertyType > &  oldOutSlotType,
const osg::ref_ptr< const amire::property::PropertyType > &  newOutSlotType
[protected, virtual]
 

Informs the context about a type modified slot.

Reimplemented from amire::component::ComponentContext.

virtual osg::ref_ptr<Component> amire::component::ComposedComponent::clone ComponentContext context  )  const [protected, virtual]
 

The clone() method must return a clone of this component. It is used by the component manager to create new component instances out of the component prototype. It is abstract and has to be implemented by each component implementation.

Reimplemented from amire::component::Component.

virtual void amire::component::ComposedComponent::configurationPropertyModified  )  [protected, virtual]
 

The configurationPropertyModified method is an abstract method that must be implemented by the component implementation class. It is called each time when the configuration property is released, which implies the possibility of a modified configuration property.

Implements amire::component::Component.

void amire::component::ComposedComponent::eliminateUnusedExports  ) 
 

The eliminateUnusedExports method removes all slot exports from the list of exported slots that are not required. This method should be called after you have finished the creation of a new composed component and before the exact specification of the slots that have to be exported and are not exported automatically. *DEPRICATED*

virtual osg::ref_ptr<const amire::property::Property> amire::component::ComposedComponent::emitOutSlotProperty int  outSlotId  )  [protected, virtual]
 

The emitOutSlotProperty method must be implemented to integrate out-slots into the component implementation. It is called, when the out-slot specified by the out-slot id is emitted by the component itself or from outside the component. It must provide the property that should be produced for this emit. An assert exception should be thrown for any failure case.

Reimplemented from amire::component::Component.

void amire::component::ComposedComponent::exportInSlot const osg::ref_ptr< Component > &  component,
const std::string &  internInSlotName,
const std::string &  externInSlotName
 

Exports the specified in-slot. An exception is thrown if the slot is not defined for the component.

void amire::component::ComposedComponent::exportInSlot const osg::ref_ptr< Component > &  component,
const std::string &  inSlotName
 

Exports the specified in-slot. The external slot name is a concatenation of the component name, a '.'-character and the internal slot name (given as argument). An exception is thrown if the slot is not defined for the component.

void amire::component::ComposedComponent::exportOutSlot const osg::ref_ptr< Component > &  component,
const std::string &  internOutSlotName,
const std::string &  externOutSlotName
 

Exports the specified out-slot. An exception is thrown if the slot is not defined for the component.

void amire::component::ComposedComponent::exportOutSlot const osg::ref_ptr< Component > &  component,
const std::string &  outSlotName
 

Exports the specified out-slot. The external slot name is a concatenation of the component name, a '.'-character and the internal slot name (given as argument). An exception is thrown if the slot is not defined for the component.

virtual void amire::component::ComposedComponent::functionalCallback MREngine engine  )  [virtual]
 

The functionalCallback method must be overwritten by the derived class and provide the functional or logical behaviour of the callback handler. A logical and functionality for example or the setting of a transformation matrix or scene graph at the MR engine for a specific component would be such a functionality. This callback should be used to integrate the functional behaviour into a component. An assert exception should be thrown in any failure case.

Reimplemented from amire::component::Component.

virtual osg::ref_ptr<const Component> amire::component::ComposedComponent::getComponentPrototype const std::string &  name  )  [virtual]
 

Returns the the specified component prototype. An exception is thrown when the prototype is unknown for this context.

Implements amire::component::ComponentContext.

virtual osg::ref_ptr<const amire::property::StructProperty> amire::component::ComposedComponent::getConfigurationProperty  )  const [virtual]
 

The getConfigurationProperty method returns reference pointer of the not modifiable configuration property for this component.

Reimplemented from amire::component::Component.

const osg::ref_ptr<ConfigurationPropertyExport>& amire::component::ComposedComponent::getConfigurationPropertyExport  )  const
 

Returns the configuration export strategy of this composed component prototype.

int amire::component::ComposedComponent::getExternInSlotId const osg::ref_ptr< const Component > &  component,
int  internInSlotId
const
 

Returns the external in-slot id for the given internal in-slot id. This method is for internal use only.

int amire::component::ComposedComponent::getExternOutSlotId const osg::ref_ptr< const Component > &  component,
int  internOutSlotId
const
 

Returns the external out-slot id for the given internal out-slot id. This method is for internal use only.

const std::vector<osg::ref_ptr<SlotExport> >& amire::component::ComposedComponent::getInSlotExports  )  const
 

Returns the list of all exported in-slots.

const std::vector<osg::ref_ptr<SlotExport> >& amire::component::ComposedComponent::getOutSlotExports  )  const
 

Returns the list of all exported out-slots.

virtual std::string amire::component::ComposedComponent::getQualifier  )  const [protected, virtual]
 

Returns the qualifier of this component context.

Reimplemented from amire::component::ComponentContext.

virtual void amire::component::ComposedComponent::initMetaInformation  )  [protected, virtual]
 

The initPrototypeMetaInformation is called to initialize the component's meta information. It must be implemented by the derived component class.

Reimplemented from amire::component::Component.

virtual void amire::component::ComposedComponent::receiveInSlotProperty int  inSlotId,
const osg::ref_ptr< const amire::property::Property > &  property
[protected, virtual]
 

The receiveInSlotProperty method must be implemented to integrate in-slots into the component implementation. It is called when the component receives a property at the in-slot specified by its in-slot id. An assert exception should be thrown for any failure case.

Reimplemented from amire::component::Component.

virtual void amire::component::ComposedComponent::reinitializeEngine MREngine engine  )  [virtual]
 

DEPRECATED: Will be renamed to to reintitialize as soon as possible!!!
The reinitializeEngine method is called by the MR engine to initialize the scene graph of the MR engine. It is called when the component manager of the MR engine has changed. The default implementation does nothing. An assert exception should be thrown in any failure case.

Reimplemented from amire::component::Component.

void amire::component::ComposedComponent::remove const osg::ref_ptr< Component > &  component  ) 
 

Removes the component from the set of components contained in this composed component. It is not a deletion of the component. Like in the addComponent method it is necessary to update the connections lists for the given component and the and export lists of the composed component. Connections between the given component and a component inside the composed component are directly connected before the removal. After the removal they must be connected by an export of the involved slot. Connections between the given component and a component outside the composed component are connected by an export slot. This connection must be transformed to a direct connection after the removal. Due to the same reason as in addComponent method the slot export that are not required anymore after the removal are not removed from the export lists. An assert exception is thrown when the component is null or it is already part of the composed component. *DEPRICATED*

virtual void amire::component::ComposedComponent::removedInSlot const osg::ref_ptr< const Component > &  component,
int  inSlotId,
const std::string &  inSlotName
[protected, virtual]
 

virtual void amire::component::ComposedComponent::removedOutSlot const osg::ref_ptr< const Component > &  component,
int  outSlotId,
const std::string &  outSlotName
[protected, virtual]
 

virtual void amire::component::ComposedComponent::renamedInSlot const osg::ref_ptr< const Component > &  component,
int  inSlotId,
const std::string &  oldInSlotName,
const std::string &  newInSlotName
[protected, virtual]
 

Informs the context about a renamed slot.

Reimplemented from amire::component::ComponentContext.

virtual void amire::component::ComposedComponent::renamedOutSlot const osg::ref_ptr< const Component > &  component,
int  outSlotId,
const std::string &  oldOutSlotName,
const std::string &  newOutSlotName
[protected, virtual]
 

Informs the context about a renamed slot.

Reimplemented from amire::component::ComponentContext.

virtual osg::ref_ptr<amire::property::StructProperty> amire::component::ComposedComponent::requestConfigurationProperty  )  [virtual]
 

The requestConfigurationProperty method locks the component and returns reference pointer of the modifiable configuration property for this component. An assert exception is thrown when the configuration property is requested twice.

Reimplemented from amire::component::Component.

void amire::component::ComposedComponent::setConfigurationPropertyExport osg::ref_ptr< ConfigurationPropertyExport configurationExport  ) 
 

Sets the configuration export strategy for this composed component prototype.

void amire::component::ComposedComponent::unexportInSlot const std::string &  externInSlotName  ) 
 

Removes the given in-slot export from the list of exported slots. An assert exception is thrown when the component specified by the slot export is not part of this composed component, the specified slot is not available for the component or the export is not part of the export list.

void amire::component::ComposedComponent::unexportInSlot const osg::ref_ptr< Component > &  component,
const std::string &  internInSlotName
 

Removes the given in-slot export from the list of exported slots. An assert exception is thrown when the component specified by the slot export is not part of this composed component, the specified slot is not available for the component or the export is not part of the export list.

void amire::component::ComposedComponent::unexportOutSlot const std::string &  externOutSlotName  ) 
 

Removes the given out-slot export from the list of exported slots. An assert exception is thrown when the component specified by the slot export is not part of this composed component, the specified slot is not available for the component or the export is not part of the export list.

void amire::component::ComposedComponent::unexportOutSlot const osg::ref_ptr< Component > &  component,
const std::string &  internOutSlotName
 

Removes the given out-slot export from the list of exported slots. An assert exception is thrown when the component specified by the slot export is not part of this composed component, the specified slot is not available for the component or the export is not part of the export list.

void amire::component::ComposedComponent::updateRequiredExports  ) 
 

When the addComponent method is used to add new component instances to the composed component prototype, this method must be called to updates all required exports (all connections to component instances that are outside of this context are diconnected, the slots are exported and the connections are reestablished with the composed component. *DEPRICATED*


Friends And Related Function Documentation

friend class Component [friend]
 

Reimplemented from amire::component::ComponentContext.

friend class SlotExport [friend]
 


The documentation for this class was generated from the following file:
Generated on Tue May 20 17:23:57 2003 for AMIRE-Framework by doxygen1.3