Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

zeitgeist::Node Class Reference

Node makes up the hierarchy. More...

#include <node.h>

Inheritance diagram for zeitgeist::Node:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Node (const std::string &name="<Unnamed>")
 constructs a node with the given name
virtual ~Node ()
virtual boost::shared_ptr<
Leaf
GetChild (const std::string &name, bool recursive=false)
 returns a pointer to a child (i.e.
virtual boost::shared_ptr<
Leaf
GetChildOfClass (const std::string &name, bool recursive=false)
 returns a pointer to a child of the given class type, which can be searched recursively.
virtual boost::shared_ptr<
Leaf
GetChildSupportingClass (const std::string &name, bool recursive=false)
 constructs a list of children supporting the class 'name' (i.e.
virtual void GetChildren (const std::string &name, TLeafList &baseList, bool recursive=false)
 returns an a list of children.
virtual void GetChildrenOfClass (const std::string &name, TLeafList &baseList, bool recursive=false)
 constructs a list of all children of type 'name'.
virtual void GetChildrenSupportingClass (const std::string &name, TLeafList &baseList, bool recursive=false)
 constructs a list of all children supporting a class 'name' i.e.
virtual bool IsLeaf () const
 returns false to indicate that this node isn't a lead
virtual void UpdateCached ()
 update variables from a script
virtual void RemoveChildReference (const boost::shared_ptr< Leaf > &base)
 removes base from the set of children.
virtual void UnlinkChildren ()
 unlinks all child nodes
virtual bool AddChildReference (const boost::shared_ptr< Leaf > &base)
 adds base to the set of children and sets the parent of base to be this node
virtual void Dump () const
 writes debug data to stdout
virtual TLeafList::iterator begin ()
virtual TLeafList::const_iterator begin () const
virtual TLeafList::iterator end ()
virtual TLeafList::const_iterator end () const

Protected Attributes

TLeafList mChildren

Private Member Functions

 Node (const Node &obj)
Nodeoperator= (const Node &obj)

Detailed Description

Node makes up the hierarchy.

A Node object can reside within the hierarchy and have children

Definition at line 45 of file node.h.


Constructor & Destructor Documentation

Node::Node const std::string &  name = "<Unnamed>"  ) 
 

constructs a node with the given name

Definition at line 53 of file node.cpp.

Node::~Node  )  [virtual]
 

Definition at line 57 of file node.cpp.

zeitgeist::Node::Node const Node obj  )  [private]
 


Member Function Documentation

bool Node::AddChildReference const boost::shared_ptr< Leaf > &  base  )  [virtual]
 

adds base to the set of children and sets the parent of base to be this node

Reimplemented from zeitgeist::Leaf.

Definition at line 222 of file node.cpp.

References zeitgeist::Object::GetSelf(), and mChildren.

Referenced by oxygen::Collider::AddCollisionHandler(), InputSystemSDL::CreateDevice(), kerosin::InputServer::Init(), oxygen::SimulationServer::InitControlNode(), oxygen::SceneServer::InitSceneImporter(), SexpMonitor::OnLink(), kerosin::MaterialServer::OnLink(), oxygen::MonitorServer::RegisterMonitorItem(), and oxygen::MonitorServer::RegisterMonitorSystem().

Here is the call graph for this function:

Leaf::TLeafList::const_iterator Node::begin  )  const [virtual]
 

Reimplemented from zeitgeist::Leaf.

Definition at line 267 of file node.cpp.

References mChildren.

Leaf::TLeafList::iterator Node::begin  )  [virtual]
 

Reimplemented from zeitgeist::Leaf.

Definition at line 261 of file node.cpp.

References mChildren.

Referenced by oxygen::SimulationServer::ControlEvent(), PerfectVisionPerceptor::Percept(), kerosin::RenderServer::Render(), VisionPerceptor::SetupVisibleObjects(), RestrictedVisionPerceptor::SetupVisibleObjects(), and UpdateCached().

void Node::Dump  )  const [virtual]
 

writes debug data to stdout

Reimplemented from zeitgeist::Leaf.

Definition at line 246 of file node.cpp.

References zeitgeist::Leaf::Dump(), and mChildren.

Here is the call graph for this function:

Leaf::TLeafList::const_iterator Node::end  )  const [virtual]
 

Reimplemented from zeitgeist::Leaf.

Definition at line 279 of file node.cpp.

References mChildren.

Leaf::TLeafList::iterator Node::end  )  [virtual]
 

Reimplemented from zeitgeist::Leaf.

Definition at line 273 of file node.cpp.

References mChildren.

Referenced by oxygen::SimulationServer::ControlEvent(), PerfectVisionPerceptor::Percept(), kerosin::RenderServer::Render(), VisionPerceptor::SetupVisibleObjects(), RestrictedVisionPerceptor::SetupVisibleObjects(), and UpdateCached().

boost::shared_ptr< Leaf > Node::GetChild const std::string &  name,
bool  recursive = false
[virtual]
 

returns a pointer to a child (i.e.

node or leaf) with the given name, which can be searched recursively.

Reimplemented from zeitgeist::Leaf.

Definition at line 62 of file node.cpp.

References zeitgeist::Leaf::GetChild(), and mChildren.

Referenced by kerosin::InputServer::GetInputSystem(), and kerosin::MaterialServer::GetMaterial().

Here is the call graph for this function:

boost::shared_ptr< Leaf > Node::GetChildOfClass const std::string &  name,
bool  recursive = false
[virtual]
 

returns a pointer to a child of the given class type, which can be searched recursively.

The class Leaf will always return an empty reference

Reimplemented from zeitgeist::Leaf.

Definition at line 85 of file node.cpp.

References mChildren.

Referenced by oxygen::MonitorServer::RegisterMonitorItem(), and oxygen::MonitorServer::RegisterMonitorSystem().

void Node::GetChildren const std::string &  name,
TLeafList baseList,
bool  recursive = false
[virtual]
 

returns an a list of children.

Definition at line 129 of file node.cpp.

References zeitgeist::Leaf::GetChildren(), and mChildren.

Here is the call graph for this function:

void Node::GetChildrenOfClass const std::string &  name,
TLeafList baseList,
bool  recursive = false
[virtual]
 

constructs a list of all children of type 'name'.

Definition at line 147 of file node.cpp.

References zeitgeist::Leaf::GetChildrenOfClass(), and mChildren.

Here is the call graph for this function:

void Node::GetChildrenSupportingClass const std::string &  name,
TLeafList baseList,
bool  recursive = false
[virtual]
 

constructs a list of all children supporting a class 'name' i.e.

they are an instance of that class or are derived from it.

Definition at line 166 of file node.cpp.

References zeitgeist::Leaf::GetChildrenSupportingClass(), and mChildren.

Here is the call graph for this function:

boost::shared_ptr< Leaf > Node::GetChildSupportingClass const std::string &  name,
bool  recursive = false
[virtual]
 

constructs a list of children supporting the class 'name' (i.e.

nodes of a type equal to or derived from the class 'name'), which can be searched recursively.

Reimplemented from zeitgeist::Leaf.

Definition at line 107 of file node.cpp.

References mChildren.

Referenced by oxygen::Collider::PrePhysicsUpdateInternal().

bool Node::IsLeaf  )  const [virtual]
 

returns false to indicate that this node isn't a lead

Reimplemented from zeitgeist::Leaf.

Definition at line 187 of file node.cpp.

Node& zeitgeist::Node::operator= const Node obj  )  [private]
 

void Node::RemoveChildReference const boost::shared_ptr< Leaf > &  base  )  [virtual]
 

removes base from the set of children.

Reimplemented from zeitgeist::Leaf.

Definition at line 193 of file node.cpp.

References mChildren.

void Node::UnlinkChildren  )  [virtual]
 

unlinks all child nodes

Reimplemented from zeitgeist::Leaf.

Definition at line 199 of file node.cpp.

References zeitgeist::Object::GetClass(), and mChildren.

Here is the call graph for this function:

void Node::UpdateCached  )  [virtual]
 

update variables from a script

Reimplemented from zeitgeist::Leaf.

Reimplemented in oxygen::SpadesServer, and SexpMonitor.

Definition at line 285 of file node.cpp.

References begin(), and end().

Here is the call graph for this function:


Member Data Documentation

TLeafList zeitgeist::Node::mChildren [protected]
 

Definition at line 114 of file node.h.

Referenced by AddChildReference(), begin(), Dump(), end(), InputSystemSDL::EventFilter(), GetChild(), GetChildOfClass(), GetChildren(), GetChildrenOfClass(), GetChildrenSupportingClass(), GetChildSupportingClass(), oxygen::GeometryServer::OnLink(), RemoveChildReference(), and UnlinkChildren().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:50:43 2006 for rcssserver3d by  doxygen 1.4.4