MIRA
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
RemoteAuthorityRootPropertyNode Class Reference

#include <fw/RemoteAuthority.h>

Inheritance diagram for RemoteAuthorityRootPropertyNode:
Inheritance graph
[legend]

Public Types

typedef std::vector< PropertyNode * > NodeList
 

Public Member Functions

 RemoteAuthorityRootPropertyNode (RemoteAuthority *iAuthority, RemoteAuthorityPropertyUpdater &iUpdater)
 
const PropertyNodegetRootProperty () const
 
PropertyNodegetRootProperty ()
 
const RemoteAuthoritygetAuthority () const
 
RemoteAuthoritygetAuthority ()
 
RemoteAuthorityPropertyUpdatergetUpdater () const
 
void addChild (PropertyNode *child, int index=-1)
 
void removeChild (int index, NodeList::iterator it)
 
void removeChild (int index)
 
void removeAllChildren ()
 
void registerListener (PropertyNodeListener *listener)
 
void unregisterListener (PropertyNodeListener *listener)
 
void lock ()
 
bool tryLock ()
 
void unlock ()
 
virtual PropertyNodeparent ()
 Returns the parent property node (or NULL, if this is a root node) More...
 
virtual const PropertyNodeparent () const
 Returns the parent property node (or NULL, if this is a root node) More...
 
virtual NodeListchildren ()
 Returns a vector with all child property nodes. More...
 
virtual const NodeListchildren () const
 Returns a vector with all child property nodes. More...
 
const PropertyNodefindChildNode (const std::vector< std::string > &ids, std::size_t level=0) const
 Searches for a child property node (which may also be a child of a child of a child, etc). More...
 
PropertyNodefindChildNode (const std::vector< std::string > &ids, std::size_t level=0)
 
const PropertyNodefindChildNode (const std::string &id) const
 Searches for a child property node (which may also be a child of a child of a child, etc). More...
 
PropertyNodefindChildNode (const std::string &id)
 Searches for a child property node (which may also be a child of a child of a child, etc). More...
 
std::string fullID (PropertyNode *p=NULL) const
 Returns the full qualified ID of this property, including the names of the parent properties separated by '. More...
 
virtual void setFromString (const std::string &value)
 Sets the value of the property, where the value is given as string. More...
 
virtual std::string getAsString () const
 Returns the value of the property as string. More...
 
template<typename T >
TypedPropertyNode< T > * toTyped ()
 Casts this property node to a typed property node, or returns NULL if the types do not match. More...
 
template<typename T >
const TypedPropertyNode< T > * toTyped () const
 Casts this property node to a typed property node, or returns NULL if the types do not match. More...
 
template<typename Reflector >
void reflectCommon (Reflector &r)
 
template<typename Reflector >
void reflectRead (Reflector &r)
 
template<typename Reflector >
void reflectWrite (Reflector &r)
 
const std::string & id () const
 Returns the unique id of this property. More...
 
const std::string & name () const
 Returns the name of this property as specified in the reflect() method. More...
 
const std::string & comment () const
 Returns the comment that is associated with this property. More...
 
const Typenametype () const
 Returns the type of this property as Typename. More...
 
template<typename T >
getHint (const std::string &attribute, const T &defaultValue=T()) const
 Returns the specified value for the given property hint attribute. More...
 
bool hasHint (const std::string &attribute) const
 Returns true if a hint with the specified attribute exists. More...
 
bool isReadOnly () const
 Returns true, if this property is read-only and hence, can not be modified. More...
 
bool isVolatile () const
 Returns true, if this property is volatile and hence, must be locked for access. More...
 
void setName (const std::string &name)
 For internal use by PropertySerializer only: Overrides the name of the property. More...
 

Protected Types

typedef ProtecteeMixin< PropertyNodeListenerListProtectedListenerList
 

Protected Member Functions

virtual RootPropertyNodegetRootNode ()
 
virtual const RootPropertyNodegetRootNode () const
 
ScopedAccess< ProtectedListenerListgetListeners (bool alreadyLocked=false)
 
void removeChildren (int index, int count)
 Removes contiguous children, starting at index (without deleting them). More...
 
void removeChildren (int index, NodeList::iterator it, int count)
 Removes contiguous children, starting at index (without deleting them). More...
 
void moveChild (int index, int destination)
 Moves a child node from index to before element at destination. More...
 
void moveChild (int index, NodeList::iterator it, int destination, NodeList::iterator destIt)
 Moves a child node from index to before element at destination. More...
 
virtual void beginAddChildren (PropertyNodeListenerList &listeners, int index, int count)
 Caller must ensure to keep listeners locked between beginAddChildren and endAddChildren! More...
 
virtual void endAddChildren (PropertyNodeListenerList &listeners)
 
virtual void beginRemoveChildren (PropertyNodeListenerList &listeners, int index, NodeList::iterator it, int count)
 Caller must ensure to keep listeners locked between beginRemoveChildren and endRemoveChildren! More...
 
virtual void endRemoveChildren (PropertyNodeListenerList &listeners)
 
virtual void beginMoveChildren (PropertyNodeListenerList &listeners, int index, NodeList::iterator it, int count, int destination)
 Caller must ensure to keep listeners locked between beginMoveChildren and endMoveChildren! More...
 
virtual void endMoveChildren (PropertyNodeListenerList &listeners)
 

Protected Attributes

RemoteAuthorityauthority
 
RemoteAuthorityPropertyUpdaterupdater
 
std::string mID
 the unique id of the property More...
 
std::string mName
 the name of the property (mostly equal to mID) More...
 
std::string mComment
 the comment that is associated to the property More...
 
PropertyHint mHint
 the specified property hints More...
 
Typename mType
 the type of the property More...
 
bool mIsReadOnly
 indicates whether the property is read-only More...
 
bool mIsVolatile
 indicates whether the property is volatile More...
 

Member Typedef Documentation

◆ ProtectedListenerList

◆ NodeList

typedef std::vector<PropertyNode*> NodeList
inherited

Constructor & Destructor Documentation

◆ RemoteAuthorityRootPropertyNode()

Member Function Documentation

◆ getRootProperty() [1/2]

const PropertyNode* getRootProperty ( ) const
inline

◆ getRootProperty() [2/2]

PropertyNode* getRootProperty ( )
inline

◆ getAuthority() [1/2]

const RemoteAuthority* getAuthority ( ) const
inline

◆ getAuthority() [2/2]

RemoteAuthority* getAuthority ( )
inline

◆ getUpdater()

RemoteAuthorityPropertyUpdater& getUpdater ( ) const
inline

◆ addChild()

void addChild ( PropertyNode child,
int  index = -1 
)
inherited

◆ removeChild() [1/2]

void removeChild ( int  index,
NodeList::iterator  it 
)
inherited

◆ removeChild() [2/2]

void removeChild ( int  index)
inherited

◆ removeAllChildren()

void removeAllChildren ( )
inherited

◆ getRootNode() [1/2]

virtual RootPropertyNode* getRootNode ( )
protectedvirtualinherited

Reimplemented from PropertyNode.

◆ getRootNode() [2/2]

virtual const RootPropertyNode* getRootNode ( ) const
protectedvirtualinherited

Reimplemented from PropertyNode.

◆ registerListener()

void registerListener ( PropertyNodeListener listener)
inherited

◆ unregisterListener()

void unregisterListener ( PropertyNodeListener listener)
inherited

◆ lock()

void lock ( )
inherited

◆ tryLock()

bool tryLock ( )
inherited

◆ unlock()

void unlock ( )
inherited

◆ getListeners()

ScopedAccess<ProtectedListenerList> getListeners ( bool  alreadyLocked = false)
protectedinherited

◆ parent() [1/2]

virtual PropertyNode* parent ( )
inlinevirtualinherited

Returns the parent property node (or NULL, if this is a root node)

Reimplemented in TypedRemotePropertyNode< T >.

◆ parent() [2/2]

virtual const PropertyNode* parent ( ) const
inlinevirtualinherited

Returns the parent property node (or NULL, if this is a root node)

Reimplemented in TypedRemotePropertyNode< T >.

◆ children() [1/2]

virtual NodeList& children ( )
inlinevirtualinherited

Returns a vector with all child property nodes.

Reimplemented in TypedRemotePropertyNode< T >.

◆ children() [2/2]

virtual const NodeList& children ( ) const
inlinevirtualinherited

Returns a vector with all child property nodes.

Reimplemented in TypedRemotePropertyNode< T >.

◆ findChildNode() [1/4]

const PropertyNode* findChildNode ( const std::vector< std::string > &  ids,
std::size_t  level = 0 
) const
inherited

Searches for a child property node (which may also be a child of a child of a child, etc).

The "path" to the child node is specified via the provided vector, where the first item corresponds to the id of the child property, the second item corresponds to the child property of the child property, etc. The parameter 'level' specifies the item where to start within the specified vector, this parameter usually will be 0 in the first call.

◆ findChildNode() [2/4]

PropertyNode* findChildNode ( const std::vector< std::string > &  ids,
std::size_t  level = 0 
)
inherited

The "path" to the child node is specified via the provided vector, where the first item corresponds to the id of the child property, the second item corresponds to the child property of the child property, etc. The parameter 'level' specifies the item where to start within the specified vector, this parameter usually will be 0 in the first call.

◆ findChildNode() [3/4]

const PropertyNode* findChildNode ( const std::string &  id) const
inherited

Searches for a child property node (which may also be a child of a child of a child, etc).

The "path" to the property is addressed via its full name. The following example

myObject.myMember.value

addresses the child property "value" of the property "myMember" of the child property "myObject".

◆ findChildNode() [4/4]

PropertyNode* findChildNode ( const std::string &  id)
inherited

Searches for a child property node (which may also be a child of a child of a child, etc).

The "path" to the property is addressed via its full name. The following example

myObject.myMember.value

addresses the child property "value" of the property "myMember" of the child property "myObject".

◆ fullID()

std::string fullID ( PropertyNode p = NULL) const
inlineinherited

Returns the full qualified ID of this property, including the names of the parent properties separated by '.

'

If no optional parameter is specified, the name is generated up to the root of the property hierarchy. If another parent node is specified as the name is generated relative to that node.

◆ setFromString()

virtual void setFromString ( const std::string &  value)
virtualinherited

Sets the value of the property, where the value is given as string.

◆ getAsString()

virtual std::string getAsString ( ) const
virtualinherited

Returns the value of the property as string.

◆ toTyped() [1/2]

TypedPropertyNode< T > * toTyped ( )
inlineinherited

Casts this property node to a typed property node, or returns NULL if the types do not match.

◆ toTyped() [2/2]

const TypedPropertyNode< T > * toTyped ( ) const
inlineinherited

Casts this property node to a typed property node, or returns NULL if the types do not match.

◆ removeChildren() [1/2]

void removeChildren ( int  index,
int  count 
)
inlineprotectedinherited

Removes contiguous children, starting at index (without deleting them).

Notifies all registered listeners.

◆ removeChildren() [2/2]

void removeChildren ( int  index,
NodeList::iterator  it,
int  count 
)
protectedinherited

Removes contiguous children, starting at index (without deleting them).

Notifies all registered listeners. Use this for efficiency if iterator is already known, otherwise use removeChild(index) Iterator it must be a forward iterator to the first of the removed children (at index).

◆ moveChild() [1/2]

void moveChild ( int  index,
int  destination 
)
inlineprotectedinherited

Moves a child node from index to before element at destination.

Notifies all registered listeners.

◆ moveChild() [2/2]

void moveChild ( int  index,
NodeList::iterator  it,
int  destination,
NodeList::iterator  destIt 
)
protectedinherited

Moves a child node from index to before element at destination.

Notifies all registered listeners. Use this for efficiency if iterators are already known, otherwise use moveChild(index, destination)

◆ beginAddChildren()

virtual void beginAddChildren ( PropertyNodeListenerList listeners,
int  index,
int  count 
)
protectedvirtualinherited

Caller must ensure to keep listeners locked between beginAddChildren and endAddChildren!

◆ endAddChildren()

virtual void endAddChildren ( PropertyNodeListenerList listeners)
protectedvirtualinherited

◆ beginRemoveChildren()

virtual void beginRemoveChildren ( PropertyNodeListenerList listeners,
int  index,
NodeList::iterator  it,
int  count 
)
protectedvirtualinherited

Caller must ensure to keep listeners locked between beginRemoveChildren and endRemoveChildren!

◆ endRemoveChildren()

virtual void endRemoveChildren ( PropertyNodeListenerList listeners)
protectedvirtualinherited

◆ beginMoveChildren()

virtual void beginMoveChildren ( PropertyNodeListenerList listeners,
int  index,
NodeList::iterator  it,
int  count,
int  destination 
)
protectedvirtualinherited

Caller must ensure to keep listeners locked between beginMoveChildren and endMoveChildren!

◆ endMoveChildren()

virtual void endMoveChildren ( PropertyNodeListenerList listeners)
protectedvirtualinherited

◆ reflectCommon()

void reflectCommon ( Reflector &  r)
inlineinherited

◆ reflectRead()

void reflectRead ( Reflector &  r)
inlineinherited

◆ reflectWrite()

void reflectWrite ( Reflector &  r)
inlineinherited

◆ id()

const std::string& id ( ) const
inlineinherited

Returns the unique id of this property.

◆ name()

const std::string& name ( ) const
inlineinherited

Returns the name of this property as specified in the reflect() method.

◆ comment()

const std::string& comment ( ) const
inlineinherited

Returns the comment that is associated with this property.

◆ type()

const Typename& type ( ) const
inlineinherited

Returns the type of this property as Typename.

◆ getHint()

T getHint ( const std::string &  attribute,
const T &  defaultValue = T() 
) const
inlineinherited

Returns the specified value for the given property hint attribute.

If no such attribute is set in this hint, then the defaultValue is returned.

◆ hasHint()

bool hasHint ( const std::string &  attribute) const
inlineinherited

Returns true if a hint with the specified attribute exists.

◆ isReadOnly()

bool isReadOnly ( ) const
inlineinherited

Returns true, if this property is read-only and hence, can not be modified.

◆ isVolatile()

bool isVolatile ( ) const
inlineinherited

Returns true, if this property is volatile and hence, must be locked for access.

◆ setName()

void setName ( const std::string &  name)
inlineinherited

For internal use by PropertySerializer only: Overrides the name of the property.

Member Data Documentation

◆ authority

RemoteAuthority* authority
protected

◆ updater

RemoteAuthorityPropertyUpdater& updater
protected

◆ mID

std::string mID
protectedinherited

the unique id of the property

◆ mName

std::string mName
protectedinherited

the name of the property (mostly equal to mID)

◆ mComment

std::string mComment
protectedinherited

the comment that is associated to the property

◆ mHint

PropertyHint mHint
protectedinherited

the specified property hints

◆ mType

Typename mType
protectedinherited

the type of the property

◆ mIsReadOnly

bool mIsReadOnly
protectedinherited

indicates whether the property is read-only

◆ mIsVolatile

bool mIsVolatile
protectedinherited

indicates whether the property is volatile


The documentation for this class was generated from the following file: