Tag Class Reference

#include <Ample.h>

Inheritance diagram for Tag:
Inheritance graph
[legend]
Collaboration diagram for Tag:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Observer< TagObserverObserverType
typedef std::vector
< TagObserver * > 
ObserverList

Public Member Functions

void destroy (void)
uint16 getID (void) const
const std::string & getName (void) const
void setName (const std::string &name)
VNTagType getType (void) const
void setType (VNTagType type, const VNTag &value)
const VNTag & getValue (void) const
void setValue (const VNTag &value)
TagGroupgetGroup (void) const
unsigned int getDataVersion (void) const
unsigned int getStructureVersion (void) const
void addObserver (TagObserver &observer)
void removeObserver (TagObserver &observer)
void removeObserver (Observer< TagObserver > &observer)
const ObserverListgetObservers (void) const

Friends

class TagGroup

Detailed Description

Node tag class. Represents a single tag in a node's tag group.


Member Typedef Documentation

typedef std::vector<TagObserver *> ObserverList [inherited]
typedef Observer<TagObserver > ObserverType [inherited]

Member Function Documentation

void addObserver ( TagObserver observer  )  [inline, inherited]

Adds the specified observer to this object.

Parameters:
observer The observer to add.
Remarks:
An observer can only be added once. Additional additions are ignored.
void destroy ( void   ) 

Destroys this tag.

Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
unsigned int getDataVersion ( void   )  const [inherited]
Returns:
The current version of the internal state.
Remarks:
This value is updated for any kind of change.
TagGroup& getGroup ( void   )  const
Returns:
The group containing this tag.
uint16 getID ( void   )  const
Returns:
The ID of this tag.
const std::string& getName ( void   )  const
Returns:
The name of this tag.
const ObserverList& getObservers ( void   )  const [inline, inherited]
Returns:
The list of observers attached to this object.
unsigned int getStructureVersion ( void   )  const [inherited]
Returns:
The current version of the internal structure.
Remarks:
This value is only updated when the internal structure changes.
VNTagType getType ( void   )  const
Todo:
Replace VNTag with some OO.
Returns:
The type of this tag.
const VNTag& getValue ( void   )  const
Returns:
The current value of this tag.
void removeObserver ( Observer< TagObserver > &  observer  )  [inline, inherited]

Removes the specified observer from this object.

Parameters:
observer The observer to remove.
void removeObserver ( TagObserver observer  )  [inline, inherited]

Removes the specified observer from this object.

Parameters:
observer The observer to remove.
void setName ( const std::string &  name  ) 

Changes the name of this tag.

Parameters:
name The desired name.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void setType ( VNTagType  type,
const VNTag &  value 
)

Changes the type of this tag and sets an initial value.

Parameters:
type The desired type.
value The desired initial value.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void setValue ( const VNTag &  value  ) 

Changes the value of this tag.

Parameters:
value The desired value.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.

Friends And Related Function Documentation

friend class TagGroup [friend]

Reimplemented from Versioned.


Generated on Thu Nov 19 20:19:27 2009 for Ample by  doxygen 1.6.1