 |
Generated: Wed Apr 7 03:04:31 2004 |
Main Page Namespace List Class Hierarchy Compound List File List Compound Members File Members
Component Class Reference#include <Component.h>
Inheritance diagram for Component: [legend]Collaboration diagram for Component: [legend]List of all members.
Detailed Description
An instance of an AI module in the architecture. Contains other components within the scope, and handles their processing hierarchically for most of the operations defined.
Constructor & Destructor Documentation
| Component |
( |
const std::string & |
type |
) |
[inline] |
|
|
|
Constructor called by the class factory when it creates a new component. - Parameters:
-
| type |
String representing the type that the factory created. |
|
| virtual ~Component |
( |
|
) |
[inline, virtual] |
|
|
|
Default virtual destructor. |
Member Function Documentation
| void Broadcast |
( |
Message & |
m |
) |
[virtual] |
|
|
|
Pass a message on to the parent so it can sent to all the other components in the scope.
Implemented by components that need to emmit messages. - Parameters:
-
| m |
A downcast message that must be sent. |
Reimplemented in Architecture. |
| virtual void Dispatch |
( |
Message & |
m |
) |
[inline, virtual] |
|
|
|
Implemented by components that need to listen to messages. - Parameters:
-
| m |
The message received, it can be upcast back. |
|
| virtual void Done |
( |
|
) |
[inline, virtual] |
|
|
|
Called before the Save procedure to prepare for automatic storage. Usually coded by hand by the developer. |
| virtual Interface* Export |
( |
const std::string & |
name |
) |
[inline, virtual] |
|
|
|
Virtual implementation of the interface creation within the component. This must be overriden for exporters expected to provide interfaces. - Parameters:
-
| name |
Name of the interface in question. |
- Returns:
-
A pointer to a new interface, to be cast upwards at will.
|
| const std::string GetType |
( |
|
) |
const [inline] |
|
|
|
Determine the type of this component. |
| virtual bool Import |
( |
const std::string & |
name, |
|
|
Interface * |
i |
|
) |
[inline, virtual] |
|
|
|
Virtual implementation of interface handling. This can optionally be overriden for components that need to import interfaces. - Parameters:
-
| name |
Name of the hook under which to import the interface. |
| i |
Pointer to the interface itself. |
- Returns:
-
Indication of success.
|
| virtual void Include |
( |
const std::string & |
name, |
|
|
Component *const |
component |
|
) |
[inline, virtual] |
|
|
|
Add a component to the scope if possible. This will generally be done by architectures only, so that they can pass the Body and other global components around. - Parameters:
-
| name |
String representing the name of the component. |
| component |
Pointer to the component to be added. |
Reimplemented in Architecture. |
| virtual void Init |
( |
|
) |
[inline, virtual] |
|
|
|
Initialisation is called after the Load() procedure to add finishing touches. Usually coded by hand by the developer. |
| virtual void Load |
( |
Data & |
config |
) |
[inline, virtual] |
|
|
|
Internalise the data stored within the XML, and perform preliminary preparations. This is generally automatically generated with FEAR tools. - Parameters:
-
| config |
Relevant DOM node of the entire XML document. |
|
| virtual void PreLoad |
( |
Data & |
config, |
|
|
Architecture * |
parent |
|
) |
[inline, virtual] |
|
|
|
Overloaded function that prepares the loading as appropriate.
Reimplemented in Architecture. |
| virtual void PreSave |
( |
Data & |
config |
) |
[inline, virtual] |
|
|
|
Overloaded function that prepares the saving.
Reimplemented in Architecture. |
| virtual void Save |
( |
Data & |
config |
) |
[inline, virtual] |
|
|
|
Selective persistence modifies the nodes in the XML only as appropriate. - Parameters:
-
| config |
Relevant DOM node of the entire XML document. |
|
Member Data Documentation
|
|
parent architecture, if any
|
std::string m_type [protected]
|
|
|
|
helper string representing the exporter type
|
The documentation for this class was generated from the following files:
| |