#include <archon/x3d/server/node.H>
Inheritance diagram for Archon::X3D::NodeBase:
Public Member Functions | |
virtual const NodeType * | getType () const =0 |
void | realize () |
If this node is not already realized, then realize it now. | |
bool | isRealized () const |
virtual void | onRealized () |
Will never be called with a scenegraph lock or a lock on this node. | |
string | getName () const |
void | setName (string name) throw (NodeNameInUseException) |
virtual const FieldBase * | lookupField (string name) const |
Search for a field of the specified name in this node. | |
Ref< ValueBase > | get (const FieldBase *) const throw (AccessException, UnexpectedException) |
Must not be called with a scenegraph lock. | |
unsigned | getSize (const SequenceFieldBase *) const throw (AccessException, UnexpectedException) |
Must not be called with a scenegraph lock. | |
Ref< ValueBase > | getAt (const SequenceFieldBase *, unsigned index) const throw (AccessException, RangeException, UnexpectedException) |
Must not be called with a scenegraph lock. | |
void | set (const FieldBase *, const Event *) throw (AccessException, UnexpectedException) |
void | setAt (const SequenceFieldBase *, Ref< const ValueBase >, unsigned index, Time) throw (AccessException, RangeException, UnexpectedException) |
void | add (const SequenceFieldBase *, Ref< const ValueBase >, Time) throw (AccessException, UnexpectedException) |
void | remove (const SequenceFieldBase *, Ref< const ValueBase >, Time) throw (AccessException, UnexpectedException) |
void | add (const NodeSequenceFieldBase *, Ref< NodeBase >, Time) throw (AccessException, UnexpectedException) |
Convenience wrapper for add(const SequenceFieldBase *, Ref<ValueBase>, Time). | |
void | remove (const NodeSequenceFieldBase *, Ref< NodeBase >, Time) throw (AccessException, UnexpectedException) |
Convenience wrapper for remove(const SequenceFieldBase *, Ref<ValueBase>, Time). | |
bool | inject (const NodeFieldBase *, Ref< NodeBase > childNode, Time stamp) throw (AccessException, UnexpectedException) |
Must not be called with a scenegraph lock. | |
virtual bool | changedSince (const Time &t) const |
Is any field of this node changed? | |
Public Attributes | |
const BackRef< ExecutionContext > | context |
The executionContext that this node bolongs to. | |
Protected Member Functions | |
NodeBase (BackRef< ExecutionContext > context) | |
NodeBase () | |
This constructor must never be called, and if it does, it throws. | |
virtual | ~NodeBase () |
virtual void | refForwardDestroy () |
bool | isRealizedNoLock () const |
Protected Attributes | |
const Mutex | mutex |
Classes | |
struct | AccessException |
Should be thrown when the combination of the phase of the nodes lifecycle and the input/output capabilities of the field is not compatible with the requested operation. More... | |
struct | RangeException |
Should be thrown when a field of sequence type is shorter that a specified index. More... | |
struct | RealizedException |
Should be thrown by methods that are illegal on realized nodes. More... |
Definition at line 58 of file node.H.
|
|
|
This constructor must never be called, and if it does, it throws. It is here because of notational convenience. That is, if it wasn't here, then NodeBase would not have a default constructor. This in turn means that every abstract sub-class such as ChildNode must include an explicit construction of NodeBase with a executionContext argument. This is completely redundant ans therefore inconvenient since NodeBase is required to be a virtual base class of all node types, and therefor an abstract node type will never get to call any NodeBase constructor itself. |
|
Definition at line 271 of file node.C. References Archon::SaiTestApps::Filebrowser::mutex, and Archon::X3D::NodeValue::value. |
|
Is any field of this node changed? Must be called with a scenegraph read lock. Definition at line 389 of file node.C. References Archon::X3D::NodeType::changedSince(). |
|
Must not be called with a scenegraph lock.
Definition at line 357 of file node.C. References Archon::Utilities::Ref< T >::get(), Archon::SaiTestApps::Filebrowser::mutex, and n. |
|
Search for a field of the specified name in this node. 'set_*' and '*_changed' variants are tryed automatically. Note that the default is just to consult the associated node type. This may be overwritten by nodes that can contain custom fields such as Script nodes. BUT BE SURE TO MAKE IT REENTRANT.
Definition at line 92 of file node.C. References Archon::X3D::NodeType::lookupField(). |
|
If this node is not already realized, then realize it now. A node must be realized when it is added as a child of some other node and or when it becomes the target of a route whichever comes first. It should not be realized in any other case. This allows us to assume that any node accessed in the rendering step as well as any node accessed in the event cascading step are always realized. Must not be called with a scenegraph lock. Definition at line 62 of file node.C. References mutex, and onRealized(). |
|
Definition at line 309 of file node.C. References Archon::SaiTestApps::Filebrowser::mutex, and Archon::X3D::NodeValue::value. |
|
Must not be called with a scenegraph lock.
Definition at line 175 of file node.C. References Archon::X3D::NodeSequenceValue::begin(), Archon::X3D::NodeSequenceValue::end(), Archon::SaiTestApps::Filebrowser::mutex, and Archon::X3D::NodeValue::value. Referenced by Archon::X3D::XML::Parser::SequenceValueParser< T >::parse(), and Archon::X3D::XML::Parser::SingleValueParser< T >::parse(). |
|
Definition at line 229 of file node.C. References Archon::SaiTestApps::Filebrowser::mutex, and Archon::X3D::NodeValue::value. |
|
The executionContext that this node bolongs to. Note: It is importatnt that this association can never change, since this anables safe locking on the scene mutex throug a node. In case you want to transfer a node from one scene to another, you have to clone it and then delete the old one. Definition at line 239 of file node.H. Referenced by Archon::X3D::UrlObject::addUri(), Archon::X3D::SubSceneNode::getSubScene(), Archon::X3D::FrameDrivenNode::onRealized(), Archon::X3D::SubSceneNode::setSubScene(), Archon::X3D::UrlObject::startLoading(), Archon::X3D::TimeSensor::tick(), Archon::X3D::FrameDrivenNode::~FrameDrivenNode(), and ~NodeBase(). |