Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OSCAR::CylisphereData Class Reference
[FileData]

Reads and writes a Cylisphere to and from an XML data file. More...

#include <CylisphereData.h>

Inheritance diagram for OSCAR::CylisphereData:

Inheritance graph
[legend]
List of all members.

Public Methods

 CylisphereData (const String &inputFileName, OSCARError &err=DUMMY_ERROR(noError), const String &rootElementName=String("Cylisphere"), const String name=String(""))
 CylisphereData (const char *xmlDataString, OSCARError &err=DUMMY_ERROR(noError), const String &rootElementName=String("Cylisphere"), const String name=String(""))
 CylisphereData (const DOMElement *CylisphereNode, OSCARError &err=DUMMY_ERROR(noError), const String &rootElementName=String("Cylisphere"), const String name=String(""))
 CylisphereData (const Cylisphere &cyli, OSCARError &err=DUMMY_ERROR(noError), const String &rootElementName=String("Cylisphere"), const String name=String(""))
 CylisphereData (const CylisphereData &rhs)
virtual ~CylisphereData ()
CylisphereData & operator= (const CylisphereData &rhs)
const CylisphereGetParameters () const
bool SetParameters (const Cylisphere &cylisphere)
bool Output (std::ostream &out, bool nameSpaceHeader=false) const

Static Public Methods

bool Output (const Cylisphere *cyli, std::ostream &strm, const String &rootElementName=String("Cylisphere"), bool nameSpaceHeader=false)

Protected Methods

virtual bool parseParameters (const DOMElement *cylisphereNode)

Protected Attributes

Cylispherecylisphere

Detailed Description

Author:
Chetan Kapoor


Constructor & Destructor Documentation

OSCAR::CylisphereData::CylisphereData const String   inputFileName,
OSCARError   err = DUMMY_ERROR(noError),
const String   rootElementName = String("Cylisphere"),
const String    name = String("")
 

Constructor.

This is the constructor for an object of type CylisphereData. Use this to construct an CylisphereData object by supplying a datafile that contains the Cylisphere data specified in XML. Possible errors that may occur include a fileOpenError or xmlError. A call to LoadData() should follow a succesful constructor call.

Parameters:
inputFileName This is a file that contains the Cylisphere model specified in XML format
err A reference to an object of type OSCARError. The default OSCARError object holds values that imply a "No Error" state. This is an error code that is returned.
name An String that specifies the Name of the object being created.
Exceptions:
xmlError xmlError Call GetError() for more information
See also:
LoadData()

OSCAR::CylisphereData::CylisphereData const char *    xmlDataString,
OSCARError   err = DUMMY_ERROR(noError),
const String   rootElementName = String("Cylisphere"),
const String    name = String("")
 

Constructor.

Use this to construct an CylisphereData object from a char string holding the XML description of a Cylisphere. Possible errors that may occur include or xmlError. A call to LoadData() should follow a succesful constructor call.

Parameters:
xmlDataString A null terminated string of char that contains XML data. Each XML file should specify the data with the target namespace rrgOSCAR with namespace www.robotics.utexas.edu and conforming to the schemas defined for OSCAR. See www.robotics.utexas.edu for valid schemas.
err A reference to an object of type OSCARError. The default OSCARError object holds values that imply a "No Error" state. This is an error code that is returned.
name An String that specifies the Name of the object being created.
Exceptions:
xmlError xmlError Call GetError() for more information
See also:
XMLData(const String& inputFileName, OSCARError &err = DUMMY_ERROR(noError), const String name = String(" "))

LoadData()

Exceptions:
xmlError xmlError Call GetError() for more information
See also:
LoadData()

OSCAR::CylisphereData::CylisphereData const DOMElement *    CylisphereNode,
OSCARError   err = DUMMY_ERROR(noError),
const String   rootElementName = String("Cylisphere"),
const String    name = String("")
 

Constructor that allows xml data to be loaded from pre validated DOMElement containing a Cylisphere node. A call to LoadData() should follow a succesful constructor call.

Parameters:
CylisphereNode A DOMElement that contains the data that will be parsed. It is assumed that the the target namespace is rrgOSCAR with namespace www.robotics.utexas.edu and data conforms to the schemas defined for OSCAR. See www.robotics.utexas.edu for valid schemas.
err A reference to an object of type OSCARError. The default OSCARError object holds values that imply a "No Error" state. This is an error code that is returned.
name An String that specifies the Name of the object being created.
Exceptions:
xmlError xmlError Call GetError() for more information
See also:
CylisphereData(const String& inputFileName, OSCARError &err = DUMMY_ERROR(noError), const String name = String(" "))

LoadData()

OSCAR::CylisphereData::CylisphereData const Cylisphere   cyli,
OSCARError   err = DUMMY_ERROR(noError),
const String   rootElementName = String("Cylisphere"),
const String    name = String("")
 

Creates a CylisphereData object from a Cylisphere object. Use this constructor to serialize a Cylisphere object into XML A call to LoadData() is not needed after this constructor call.

Parameters:
cyli A valid Cylisphere object that can then be serialized into XML by calling Output method.
err A reference to an object of type OSCARError. The default OSCARError object holds values that imply a "No Error" state. This is an error code that is returned.
name An String that specifies the Name of the object being created.
See also:
Output(std::ostream& out, bool nameSpaceHeader = false) const;

OSCAR::CylisphereData::CylisphereData const CylisphereData &    rhs
 

Copy Constructor.

This is the Copy Constructor for an object of type CylisphereData. Use this to construct an CylisphereData object from an existing CylisphereData object.

Parameters:
rhs An CylisphereData object that will be used to initialize this new object.

virtual OSCAR::CylisphereData::~CylisphereData   [virtual]
 

Destructor.

This is the Destructor for an object of type CylisphereData.


Member Function Documentation

const Cylisphere* OSCAR::CylisphereData::GetParameters   const
 

Returns the cylisphere that represents the cylisphere data.

Returns:
An Cylisphere object that is serialized using this class
See also:
SetParameters(const Cylisphere& cylisphere)

CylisphereData& OSCAR::CylisphereData::operator= const CylisphereData &    rhs
 

Assignment Operator.

This is the Assignment Operator for an object of type CylisphereData.

Parameters:
rhs A CylisphereData object that goes on the right hand side of the = operator
Returns:
A reference to the object on the left hand side of the = operator

bool OSCAR::CylisphereData::Output const Cylisphere   cyli,
std::ostream &    strm,
const String   rootElementName = String("Cylisphere"),
bool    nameSpaceHeader = false
[static]
 

Outputs any given Cylisphere object into XML. This does not output the internally stored object. Also, this method is declared static and as such can be called to serialize any Cylisphere object without creating a CylisphereData object.

Parameters:
cyli Cylisphere object that needs to be serailzed to XML
out A valid outputs stream to which data is outputed
nameSpaceHeader If true, the name space is appended to the root element. Normally, this should be true if you are outputting this data as a stand alone document. If you are outputting as a subset of higher level xml data, it should be false. The root node of the overall document should however output the namespace header. Default value is false.
Returns:
A true or a false. If false, call GetError() for detailed error information
Exceptions:
 

bool OSCAR::CylisphereData::Output std::ostream &    out,
bool    nameSpaceHeader = false
const [virtual]
 

Outputs stored data CylisphereModel in XML format. The root element for CylisphereData is .

Parameters:
out A valid outputs stream to which data is outputed
nameSpaceHeader If true, the name space is appended to the root element. Normally, this should be true if you are outputting this data as a stand alone document. If you are outputting as a subset of higher level xml data, it should be false. The root node of the overall document should however output the namespace header. Default value is false.
Returns:
A true or a false. If false, call GetError() for detailed error information
Exceptions:
 

Implements OSCAR::XMLData.

virtual bool OSCAR::CylisphereData::parseParameters const DOMElement *    cylisphereNode [protected, virtual]
 

Overloaded method for parsing an element of type CylisphereType.

Parameters:
cylisphereNode A DOMElement that points to a Cylisphere node

Reimplemented from OSCAR::XMLData.

bool OSCAR::CylisphereData::SetParameters const Cylisphere   cylisphere
 

Set the cylisphere that will be serialized by this object.

Returns:
true or false. If false, call GetError()
See also:
GetParameters() const


Member Data Documentation

Cylisphere* OSCAR::CylisphereData::cylisphere [protected]
 


The documentation for this class was generated from the following file:
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations