|
libbio
|
#include <TypedPerspective.h>


Protected Member Functions | |
| virtual Pointer< Brane< DIMENSION > > | CreateBrane (DIMENSION id, const Name &name) |
Protected Member Functions inherited from bio::physical::Perspective< DIMENSION > | |
| void | RegisterBrane (Pointer< Brane< DIMENSION > > brane) |
| template<class T > | |
| T | GetBraneAs (DIMENSION id) |
| template<class T > | |
| const T | GetBraneAs (DIMENSION id) const |
Additional Inherited Members | |
Static Public Member Functions inherited from bio::physical::Perspective< DIMENSION > | |
| static DIMENSION | InvalidId () |
| static Name | InvalidName () |
Static Protected Member Functions inherited from bio::physical::Perspective< DIMENSION > | |
| ::std::string | IndexKeyFor (const Name &name) |
Protected Attributes inherited from bio::physical::Perspective< DIMENSION > | |
| Pointer< Container > | mBranes |
| DIMENSION | mNextId |
| mutable ::std::map< DIMENSION, Index > | mByIdIndex |
A TypedPerspective extends Perspective by adding Waves to its Branes.
This allows you to (Dis)AssociateType(...) and GetNewObject...(...) from Names and Ids.
| DIMENSION | an unsigned integer (e.g. uint8_t). |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Associates the given Wave type with the given id.
Nop if a type is already Associated. In that case, you must Disassociate the type before calling this method.
NOTE: THE ASSOCIATED TYPE WILL BE DELETED BY *this AND SHOULD LAST THE LIFETIME OF THE PROGRAM!
In other words, don't delete whatever you provide here.
This is only necessary if you want to use GetTypeFromId later on.
Associating a type with an id has no effect on the Recorded Properties.
You should only use this with classes that derive from physical::Class<>, as this is the only accepted means of retrieving the type later (see GetInstance, below).
| id | |
| type |
|
inlineprotectedvirtual |
Create a TypedBrane instead of a standard Brane.
| id | |
| name |
Reimplemented from bio::physical::Perspective< DIMENSION >.
|
inlinevirtual |
Removes the type association created by AssociateType() and deletes the Associated Wave.
Disassociating a type has no effect on the Recorded Properties.
| id |
|
inlinevirtual |
Creates a new object by Clone()ing the associated type.
| id |
|
inline |
Ease of use method for casting the result of GetNewObjectFromId()
| T |
| id |
|
inlinevirtual |
Creates a new object by Clone()ing the associated type.
| name |
|
inline |
Ease of access method for casting the result of GetNewObjectFromName()
| T |
| name |
|
inlinevirtual |
Only works if AssociateType has been called with the given id.
| id |
|
inline |
Ease of access method for casting the result of GetTypeFromId().
| T |
| id |
|
inlinevirtual |
Only works if AssociateType has been called with the given id.
| name |
|
inline |
Ease of access method for casting the result of GetTypeFromId().
| T |
| name |
|
inlinevirtual |
Check if AssociateType() has been called for a particular id.
| id |