#include <rdObject.h>
Inheritance diagram for rdObject:

Public Member Functions | |
| rdObject () | |
| Default constructor. | |
| rdObject (const char *aFileName) | |
| Construct an object from file. | |
| rdObject (const rdXMLDocument *aDocument) | |
| Construct an object from a document. | |
| rdObject (IDOM_Element *aNode) | |
| Construct an object from an IDOM_Element. | |
| rdObject (const rdObject &aObject) | |
| Copy constructor. | |
| virtual | ~rdObject () |
| Destructor. | |
| rdObject & | operator= (const rdObject &aObject) |
| Assign this object to the values of another. | |
| virtual bool | operator== (const rdObject &aObject) |
| Determine if two objects are equal. | |
| const char * | getType () const |
| Get the type of this object. | |
| void | setName (const char *aName) |
| Set the name of this object. | |
| const char * | getName () const |
| Get the type of this object. | |
| rdXMLDocument * | getDocument () const |
| Get the document for this object. | |
| IDOM_Element * | getNode () const |
| Get the node set for this object. | |
| virtual void | updateObject (bool aDeep=true) |
| Update this object based on its XML node. | |
| virtual void | updateNode (bool aDeep=true) |
| Update the XML node that represents this object. | |
| virtual void | generateNode (IDOM_Element *aParent) |
| Generate an XML node to represent this object. | |
| void | print (const char *aFileName=NULL) |
| Print the object. | |
Static Public Attributes | |
| const int | NAME_LENGTH = rdObject_NAME_LENGTH |
| A length limit for the name of an object. | |
| const char | PROP_NAME [] = "name" |
| Token for the name. | |
Protected Member Functions | |
| void | setType (const char *aType) |
| Set the type of this object. | |
Protected Attributes | |
| rdXMLDocument * | _document |
| XML document. | |
| IDOM_Element * | _node |
| XML element node. | |
Private Member Functions | |
| void | setNull () |
| Set all member variables to their null or default values. | |
| void | generateDocument () |
| Generate a new XML document with this object as the root node. | |
Private Attributes | |
| char * | _type |
| Type. | |
| char * | _name |
| Name . | |
objects. It provides a common object from which to derive and also some basic functionality, such as writing to files in XML format and the equality operator. Future enhancements to rdObject might include thread functionality.
|
|
Construct an object from file. The object is constructed from the root element of the XML document. The type of object is the tag name of the XML root element.
|
|
|
Construct an object from a document. The document is copied and this object, including its derived classes, are constructed based on the nodes within the document. |
|
|
Copy constructor. Copy constructors for all rdObject's only copy the non-XML variable members of the object; that is, the object's IDOM_node and rdXMLDocument are not copied but set to NULL. The reason for this is that for the object and all its derived classes to establish the correct connection to the XML document nodes, the the object would need to reconstruct based on the XML document not the values of the object's member variables. There are three proper ways to generate an XML document for an rdObject: 1) Construction based on XML file (
3) A call to generateDocument(). This method generates an XML document for the rdObject from scratch. Only the essential document nodes are created (that is, nodes that correspond directly to member variables.).
|
|
|
Generate an XML node to represent this object. If the parent node is NULL the intent is to generate a new document as well as a new node. Howerver, for this request to be successful, a document must not already be associated with the object. If the parent node is not NULL and this object already has a node, the node must be from the same document as the parent. Requesting that a new node be generated when one already exists is useful when it is desired to remake a node entirely including elements for all the properties of an object.S
Reimplemented in rdGeneralizedForceAtv, rdLinearSetPoint, rdMuscleZajac, rdPolynomialSetPoint, rdSetPoint, rdControl, rdControlConstant, rdControlLinear, rdControlSet, rdActuator, rdActuatorSet, rdContactForce, rdContactForceSet, rdForce, rdGeneralizedForce, rdFunction, rdFunctionSet, rdGCVSpline, suSpringGeneralizedForce, suTrackJoint, suTrackObject, and suTrackObjectSet. |
|
|
Get the document for this object.
|
|
|
Get the node set for this object.
|
|
|
Assign this object to the values of another.
|
|
|
Determine if two objects are equal.
|
|
|
Print the object.
|
|
|
Update the XML node that represents this object.
Reimplemented in rdGeneralizedForceAtv, rdLinearSetPoint, rdMuscleZajac, rdPolynomialSetPoint, rdSetPoint, rdControl, rdControlConstant, rdControlLinear, rdControlSet, rdActuator, rdActuatorSet, rdContactForce, rdContactForceSet, rdForce, rdGeneralizedForce, rdEdge, rdEdges, rdFunction, rdFunctionSet, rdGBodies, rdGBody, rdGCVSpline, rdGModel, rdObjectArray, rdPtrArray, rdTriangle, rdTriangles, rdV3D, rdValueArray< T >, rdVertices, suSpringGeneralizedForce, suTrackJoint, suTrackObject, and suTrackObjectSet. |
|
|
Update this object based on its XML node.
Reimplemented in rdGeneralizedForceAtv, rdLinearSetPoint, rdMuscleZajac, rdPolynomialSetPoint, rdSetPoint, rdControl, rdControlConstant, rdControlLinear, rdControlSet, rdActuator, rdActuatorSet, rdContactForce, rdContactForceSet, rdForce, rdGeneralizedForce, rdEdge, rdEdges, rdFunction, rdFunctionSet, rdGBodies, rdGBody, rdGCVSpline, rdGModel, rdObjectArray, rdPtrArray, rdTriangle, rdV3D, rdValueArray< T >, rdVertices, suSpringGeneralizedForce, suTrackJoint, suTrackObject, and suTrackObjectSet. |
1.3