Node Class Reference

#include <Ample.h>

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

List of all members.

Public Types

typedef Observer< NodeObserverObserverType
typedef std::vector
< NodeObserver * > 
ObserverList

Public Member Functions

void destroy (void)
void createTagGroup (const std::string &name)
TagGroupgetTagGroupByID (uint16 ID)
const TagGroupgetTagGroupByID (uint16 ID) const
TagGroupgetTagGroupByIndex (unsigned int index)
const TagGroupgetTagGroupByIndex (unsigned int index) const
TagGroupgetTagGroupByName (const std::string &name)
const TagGroupgetTagGroupByName (const std::string &name) const
unsigned int getTagGroupCount (void) const
TaggetTagByNames (const std::string &groupName, const std::string &tagName)
const TaggetTagByNames (const std::string &groupName, const std::string &tagName) const
bool isMine (void) const
VNodeID getID (void) const
VNodeType getType (void) const
const std::string & getName (void) const
void setName (const std::string &name)
SessiongetSession (void) const
unsigned int getDataVersion (void) const
unsigned int getStructureVersion (void) const
void addObserver (NodeObserver &observer)
void removeObserver (NodeObserver &observer)
void removeObserver (Observer< NodeObserver > &observer)
const ObserverListgetObservers (void) const

Protected Member Functions

 Node (VNodeID ID, VNodeType type, VNodeOwner owner, Session &session)
virtual ~Node (void)

Friends

class Session

Detailed Description

Node base class. Represents a single node of unknown type.


Member Typedef Documentation

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

Constructor & Destructor Documentation

Node ( VNodeID  ID,
VNodeType  type,
VNodeOwner  owner,
Session session 
) [protected]

Constructs a node object.

Parameters:
ID The ID of the node.
type The type of the node.
owner The owner specification of the node.
session The session containing the node.
virtual ~Node ( void   )  [protected, virtual]

Destructor.


Member Function Documentation

void addObserver ( NodeObserver 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 createTagGroup ( const std::string &  name  ) 

Creates a new tag group in this node.

Parameters:
name The desired name of the tag group.
Remarks:
This call is asynchronous. It will not take effect until, at the earliest, after the first subsequent call to Session::update.
void destroy ( void   ) 

Destroys this node.

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.
VNodeID getID ( void   )  const
Returns:
The ID of this node.
const std::string& getName ( void   )  const
Returns:
The name of this node.
const ObserverList& getObservers ( void   )  const [inline, inherited]
Returns:
The list of observers attached to this object.
Session& getSession ( void   )  const
Returns:
The session containing this node.
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.
const Tag* getTagByNames ( const std::string &  groupName,
const std::string &  tagName 
) const
Parameters:
groupName The name of the group of the desired tag.
tagName The name of the desired tag.
Returns:
The tag with the specified name, in the specified group.
Tag* getTagByNames ( const std::string &  groupName,
const std::string &  tagName 
)
Parameters:
groupName The name of the group of the desired tag.
tagName The name of the desired tag.
Returns:
The tag with the specified name, in the specified group.
const TagGroup* getTagGroupByID ( uint16  ID  )  const
Parameters:
ID The ID of the desired tag group.
Returns:
The tag group with the specified ID, or NULL if no such tag group exists.
TagGroup* getTagGroupByID ( uint16  ID  ) 
Parameters:
ID The ID of the desired tag group.
Returns:
The tag group with the specified ID, or NULL if no such tag group exists.
const TagGroup* getTagGroupByIndex ( unsigned int  index  )  const
Parameters:
index The index of the desired tag group.
Returns:
The tag group at the specified index, or NULL if no such tag group exists.
TagGroup* getTagGroupByIndex ( unsigned int  index  ) 
Parameters:
index The index of the desired tag group.
Returns:
The tag group at the specified index, or NULL if no such tag group exists.
const TagGroup* getTagGroupByName ( const std::string &  name  )  const
Parameters:
name The name of the desired tag group.
Returns:
The tag group with the specified name, or NULL if no such tag group exists.
TagGroup* getTagGroupByName ( const std::string &  name  ) 
Parameters:
name The name of the desired tag group.
Returns:
The tag group with the specified name, or NULL if no such tag group exists.
unsigned int getTagGroupCount ( void   )  const
Returns:
The number of tag groups in this node.
VNodeType getType ( void   )  const
Returns:
The type of this node.
bool isMine ( void   )  const
Returns:
true if this node was created from this client, otherwise false.
void removeObserver ( Observer< NodeObserver > &  observer  )  [inline, inherited]

Removes the specified observer from this object.

Parameters:
observer The observer to remove.
void removeObserver ( NodeObserver 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 node.

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.

Friends And Related Function Documentation

friend class Session [friend]

Reimplemented from Versioned.

Reimplemented in TextNode, GeometryNode, ObjectNode, BitmapNode, and MaterialNode.


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