Base class for ObjectTree nodes. More...
#include <vtkKWEObjectTreeNodeBase.h>


Base class for ObjectTree nodes.
The base class for ObjectTree nodes, vtkKWEObjectTreeNodeBase provides the ability add and remove children of a node while guaranteeing that a cycle isn't created. Also, to change the characteristics of a "basic" node type, subclasses of vtkKWEObjectTreePropertyBase can be added to a node, though a node can only have one instance of each property type (such as vtkKWEObjectTreeUserProperty). Though not implemented yet, descendants of a node could (or would?) inherit these properties, if they don't have an instance of the propeoerty type themselves. Similar to Properties, but not to be inherited by a descendant are Attributes of a node. These are more basic charateristics of the node, including the "Name" of the node as well as its "State" (if "inactive", the node is "off", and children are not traversed). If requested, a node will also generate a UUID for the purpose of uniquely identifying a node.
As a subclass of vtkKWESerializableObject, this object can easily be serialized via its Serialize method.
Definition at line 61 of file vtkKWEObjectTreeNodeBase.h.
Definition at line 202 of file vtkKWEObjectTreeNodeBase.h.
| vtkKWEObjectTreeNodeBase::vtkKWEObjectTreeNodeBase | ( | ) | [protected] |
| virtual vtkKWEObjectTreeNodeBase::~vtkKWEObjectTreeNodeBase | ( | ) | [protected, virtual] |
| static vtkKWEObjectTreeNodeBase* vtkKWEObjectTreeNodeBase::New | ( | ) | [static] |
Reimplemented from vtkKWESerializableObject.
Reimplemented in vtkKWEObjectTreeTransformableNode.
| vtkKWEObjectTreeNodeBase::vtkTypeRevisionMacro | ( | vtkKWEObjectTreeNodeBase | , | |
| vtkKWESerializableObject | ||||
| ) |
| void vtkKWEObjectTreeNodeBase::PrintSelf | ( | ostream & | os, | |
| vtkIndent | indent | |||
| ) | [virtual] |
Reimplemented from vtkObject.
Reimplemented in vtkKWEObjectTreeTransformableNode.
| virtual void vtkKWEObjectTreeNodeBase::SetNodeObject | ( | vtkObject * | object | ) | [virtual] |
Set/Get the vtkObject for this node.
| virtual vtkObject* vtkKWEObjectTreeNodeBase::GetNodeObject | ( | ) | [virtual] |
Set/Get the vtkObject for this node.
| virtual unsigned int vtkKWEObjectTreeNodeBase::GetNumberOfChildren | ( | ) | [virtual] |
Returns number of children this node has.
| virtual int vtkKWEObjectTreeNodeBase::AddChild | ( | vtkKWEObjectTreeNodeBase * | childNode | ) | [virtual] |
Add the child to this node and set this node as its parent. The node is added only if unique (not already a child), if the node doesn't have a parent (which actually handles its uniqueness as a child), and if a cycle won't be created by adding the child. Returns index of the child (-1 if not added).
| virtual int vtkKWEObjectTreeNodeBase::InsertChild | ( | unsigned int | index, | |
| vtkKWEObjectTreeNodeBase * | childNode | |||
| ) | [virtual] |
Inserts this child at the specified index (0 based)in the child "list" and sets this node as its parent. The node is added only if unique (not already a child), if the index is valid (will not insert at index 3 if only 2 children in the list), if the node doesn't have a parent (which actually handles its uniqueness as a child), and if a cycle won't be created by adding the child. Return 1 if the node is added (0 otherwise);
| int vtkKWEObjectTreeNodeBase::RemoveChild | ( | vtkKWEObjectTreeNodeBase * | childNode | ) |
Remove indicated child node. Return index of the child that was removed or -1 if it wasn't a child.
| int vtkKWEObjectTreeNodeBase::RemoveChild | ( | unsigned int | index | ) |
Remove child at indicated index. Return 1 if successful (0 otherwise).
| vtkKWEObjectTreeNodeBase* vtkKWEObjectTreeNodeBase::GetChild | ( | unsigned int | index | ) |
Get child at indicated index.
| virtual vtkKWEObjectTreeNodeBase* vtkKWEObjectTreeNodeBase::GetParent | ( | ) | [virtual] |
Get the parent of this node (a value of NULL indicates this node is the root of the tree
| virtual bool vtkKWEObjectTreeNodeBase::IsDescendant | ( | vtkKWEObjectTreeNodeBase * | testNode | ) | [virtual] |
Tests whether a node exists in the tree (returns true if it does).
| int vtkKWEObjectTreeNodeBase::AddProperty | ( | vtkKWEObjectTreePropertyBase * | nodeProperty | ) |
Add the property to the node; returns 0 if the property was already present (does NOT replace the existing property)
| void vtkKWEObjectTreeNodeBase::GetAllProperties | ( | vtkInformation * | allProperties | ) |
Fill the passed vtkInformation object with ALL the properties of this node, including those that this node inherits, IF CanInheritProperties()==true
| vtkKWEObjectTreePropertyBase* vtkKWEObjectTreeNodeBase::GetProperty | ( | vtkInformationObjectBaseKey * | propertyKey, | |
| bool & | inheritedProperty, | |||
| bool | includeInheritance = false | |||
| ) |
Retrieves the requested property, if it exists (otherwise returns NULL). If includeInheritance == true (and INHERIT_PROPERTIES is ON), will search ancestors for inheritable property of specified type. The inheritedProperty flag it set to true if the property is inherited from an ancestor.
| int vtkKWEObjectTreeNodeBase::RemoveProperty | ( | vtkInformationObjectBaseKey * | propertyKey | ) |
Removes the property with the given Key, if it exists. Returns 1 if the property existed and was removed, 0 otherwise.
| int vtkKWEObjectTreeNodeBase::RemoveProperty | ( | vtkKWEObjectTreePropertyBase * | nodeProperty | ) |
Removes the property if it exists. Returns 1 if the property existed and was removed, 0 otherwise.
| void vtkKWEObjectTreeNodeBase::RemoveAllProperties | ( | ) |
Removes all the node's properties.
| int vtkKWEObjectTreeNodeBase::GetNumberOfProperties | ( | ) |
Return the number of properties set on this node.
| virtual void vtkKWEObjectTreeNodeBase::Modified | ( | ) | [virtual] |
Update modifed time for this object and also update the TreeModifiedTime (for this object, and pushes up to parent as well)
Reimplemented from vtkObject.
| virtual unsigned long vtkKWEObjectTreeNodeBase::GetMTime | ( | ) | [virtual] |
Return this object's modified time, considering the properties of this node. This value is not affected by a child changing (but is by adding or removing a child)
Reimplemented from vtkObject.
Reimplemented in vtkKWEObjectTreeTransformableNode.
| virtual unsigned long vtkKWEObjectTreeNodeBase::GetTreeModifiedTime | ( | ) | [virtual] |
Return the modified time for this (sub)tree.
| virtual bool vtkKWEObjectTreeNodeBase::IsEqualTo | ( | vtkKWEObjectTreeNodeBase * | testNode, | |
| bool | checkDescendants, | |||
| bool | canBeSuperset = false, |
|||
| bool | considerInheritedProperties = false | |||
| ) | [virtual] |
Check to see if the specified node is the same (Attributes and Properties) as this node. If checkDescendants == true, then the children (and their children) are compared as well (and must be in the same order). If canBeSuperset == true, then it is considered "equal" if all attrbiutes and Properties that are set in the testNode match in "this" node (this node can be a superset of testNode); the final flag "considerInheritedProperties" will compare an inherited property as if it were a property specifed on the node.
Reimplemented in vtkKWEObjectTreeTransformableNode.
| virtual void vtkKWEObjectTreeNodeBase::Serialize | ( | vtkKWESerializer * | ) | [virtual] |
Reads the state of an instance from an archive OR writes the state of an instance to an archive.
Reimplemented from vtkKWESerializableObject.
Reimplemented in vtkKWEObjectTreeTransformableNode.
| const char* vtkKWEObjectTreeNodeBase::GetName | ( | ) |
Set/Get the name of this node.
| void vtkKWEObjectTreeNodeBase::SetName | ( | const char * | name | ) |
Set/Get the name of this node.
| const char* vtkKWEObjectTreeNodeBase::GetUUID | ( | ) |
Get the UUID for this node.
| void vtkKWEObjectTreeNodeBase::SetUUID | ( | const char * | uuid | ) |
Set the UUID for this node.
| int vtkKWEObjectTreeNodeBase::CreateUUID | ( | ) |
Creates a UUID for this node (if one doesn't already exist). Return 0 if already exists, 1 if able to "generate" an uuid, and 2 if it was necessary to "construct" (less unique) an uuid.
| void vtkKWEObjectTreeNodeBase::ClearUUID | ( | ) |
Clear/remove the UUID for this node. Calling CreateUUID after ClearUUID will create a new/different UUID.
| void vtkKWEObjectTreeNodeBase::SetStateToActive | ( | ) | [inline] |
Definition at line 208 of file vtkKWEObjectTreeNodeBase.h.
| void vtkKWEObjectTreeNodeBase::SetStateToInactive | ( | ) | [inline] |
Definition at line 210 of file vtkKWEObjectTreeNodeBase.h.
| void vtkKWEObjectTreeNodeBase::SetState | ( | int | nodeState | ) |
| int vtkKWEObjectTreeNodeBase::GetState | ( | ) |
| const char* vtkKWEObjectTreeNodeBase::GetStateAsString | ( | ) |
| void vtkKWEObjectTreeNodeBase::InheritPropertiesOn | ( | ) | [inline] |
Set/Get whether or not this node can inherit properties from its ancestors
Definition at line 219 of file vtkKWEObjectTreeNodeBase.h.
| void vtkKWEObjectTreeNodeBase::InheritPropertiesOff | ( | ) | [inline] |
Set/Get whether or not this node can inherit properties from its ancestors
Definition at line 221 of file vtkKWEObjectTreeNodeBase.h.
| bool vtkKWEObjectTreeNodeBase::CanInheritProperties | ( | ) | [inline] |
Set/Get whether or not this node can inherit properties from its ancestors
Definition at line 223 of file vtkKWEObjectTreeNodeBase.h.
| bool vtkKWEObjectTreeNodeBase::GetInheritProperties | ( | ) |
Set/Get whether or not this node can inherit properties from its ancestors
| void vtkKWEObjectTreeNodeBase::SetInheritProperties | ( | bool | inheritState | ) |
Set/Get whether or not this node can inherit properties from its ancestors
| static vtkInformationStringKey* vtkKWEObjectTreeNodeBase::NAME | ( | ) | [static] |
| static vtkInformationStringKey* vtkKWEObjectTreeNodeBase::UUID | ( | ) | [static] |
| static vtkInformationIntegerKey* vtkKWEObjectTreeNodeBase::STATE | ( | ) | [static] |
| static vtkInformationIntegerKey* vtkKWEObjectTreeNodeBase::INHERIT_PROPERTIES | ( | ) | [static] |
| void vtkKWEObjectTreeNodeBase::SetParent | ( | vtkKWEObjectTreeNodeBase * | parent | ) | [protected] |
The parent of this node.
| void vtkKWEObjectTreeNodeBase::AddChildren | ( | vtkKWEObjectTreeNodeIterator * | iterator | ) | [protected] |
Adds the children of this node to the iterator according to how the iterator is defined/setup.
| virtual void vtkKWEObjectTreeNodeBase::UpdateTreeModifiedTime | ( | unsigned long | treeTime | ) | [protected, virtual] |
Update the TreeModifiedTime for this node (and pushes the time up to its parent as well)
Reimplemented in vtkKWEObjectTreeTransformableNode.
| void vtkKWEObjectTreeNodeBase::AddInheritedProperties | ( | vtkInformation * | allProperties | ) | [protected] |
Add inheritable properties that don't already exist in allProperties. Should only be called by a child of "this" object and the resulting list is only accurate for the original caller of GetAllProperties()
| int vtkKWEObjectTreeNodeBase::GetNumberOfInformationEntries | ( | vtkInformation * | infoObject | ) | [protected] |
Returns the number of entries in the vtkInformation object. This really should go in with the vtkInformation code in VTK, but here for now
| virtual void vtkKWEObjectTreeNodeBase::SerializeObject | ( | vtkKWESerializer * | ) | [protected, virtual] |
Serialize the Object member. I've separated this out (from Serialize) and made it virtual since subclasses may want to serialize this differently based on the type of the Object that the Node will hold.
friend class vtkKWEObjectTreeNodeIterator [friend] |
Adds the children of this node to the iterator according to how the iterator is defined/setup.
Definition at line 245 of file vtkKWEObjectTreeNodeBase.h.
friend class vtkKWEObjectTreePropertyBase [friend] |
Update the TreeModifiedTime for this node (and pushes the time up to its parent as well)
Definition at line 252 of file vtkKWEObjectTreeNodeBase.h.
vtkKWEObjectTreeNodeBaseChildren* vtkKWEObjectTreeNodeBase::Children [protected] |
The children of this node. PIMPL
Definition at line 267 of file vtkKWEObjectTreeNodeBase.h.
vtkKWEObjectTreeNodeBase* vtkKWEObjectTreeNodeBase::Parent [protected] |
Parent of the node. If NULL, then this node is the root of the tree.
Definition at line 270 of file vtkKWEObjectTreeNodeBase.h.
vtkInformation* vtkKWEObjectTreeNodeBase::Properties [protected] |
Properties that make this node "special". They could be properties controlling visualization or maybe an application specific property.
Definition at line 274 of file vtkKWEObjectTreeNodeBase.h.
vtkInformation* vtkKWEObjectTreeNodeBase::Attributes [protected] |
"Attributes" of this node that are not inherited by the children
Definition at line 277 of file vtkKWEObjectTreeNodeBase.h.
unsigned long vtkKWEObjectTreeNodeBase::TreeModifiedTime [protected] |
Cached value for the tree with this node as root
Definition at line 280 of file vtkKWEObjectTreeNodeBase.h.
vtkObject* vtkKWEObjectTreeNodeBase::NodeObject [protected] |
The vtkObject contained within this node
Definition at line 283 of file vtkKWEObjectTreeNodeBase.h.
1.7.1