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

OSCAR::ConeData Class Reference
[FileData]

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

#include <ConeData.h>

Inheritance diagram for OSCAR::ConeData:

Inheritance graph
[legend]
List of all members.

Public Methods

 ConeData (const String &inputFileName, OSCARError &err=DUMMY_ERROR(noError), const String &rootElementName=String("Cone"), const String name=String(""))
 ConeData (const char *xmlDataString, OSCARError &err=DUMMY_ERROR(noError), const String &rootElementName=String("Cone"), const String name=String(""))
 ConeData (const DOMElement *coneNode, OSCARError &err=DUMMY_ERROR(noError), const String &rootElementName=String("Cone"), const String name=String(""))
 ConeData (const Cone &cone, OSCARError &err=DUMMY_ERROR(noError), const String &rootElementName=String("Cone"), const String name=String(""))
 ConeData (const ConeData &rhs)
virtual ~ConeData ()
ConeData & operator= (const ConeData &rhs)
const ConeGetParameters () const
bool SetParameters (const Cone &cone)
bool Output (std::ostream &out, bool nameSpaceHeader=false) const

Static Public Methods

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

Protected Methods

virtual bool parseParameters (const DOMElement *coneNode)

Protected Attributes

Conecone

Detailed Description

Author:
Chetan Kapoor


Constructor & Destructor Documentation

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

Constructor.

This is the constructor for an object of type ConeData. Use this to construct an ConeData object by supplying a datafile that contains the Cone 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 Cone 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::ConeData::ConeData const char *    xmlDataString,
OSCARError   err = DUMMY_ERROR(noError),
const String   rootElementName = String("Cone"),
const String    name = String("")
 

Constructor.

Use this to construct an ConeData object from a char string holding the XML description of a Cone. 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::ConeData::ConeData const DOMElement *    coneNode,
OSCARError   err = DUMMY_ERROR(noError),
const String   rootElementName = String("Cone"),
const String    name = String("")
 

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

Parameters:
coneNode 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:
ConeData(const String& inputFileName, OSCARError &err = DUMMY_ERROR(noError), const String name = String(" "))

LoadData()

OSCAR::ConeData::ConeData const Cone   cone,
OSCARError   err = DUMMY_ERROR(noError),
const String   rootElementName = String("Cone"),
const String    name = String("")
 

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

Parameters:
cone A valid Cone 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::ConeData::ConeData const ConeData &    rhs
 

Copy Constructor.

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

Parameters:
rhs A ConeData object that will be used to initialize this new object.

virtual OSCAR::ConeData::~ConeData   [virtual]
 

Destructor.

This is the Destructor for an object of type ConeData.


Member Function Documentation

const Cone* OSCAR::ConeData::GetParameters   const
 

Returns the Cone that represents the Cone data.

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

ConeData& OSCAR::ConeData::operator= const ConeData &    rhs
 

Assignment Operator.

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

Parameters:
rhs A ConeData 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::ConeData::Output const Cone   cone,
std::ostream &    strm,
const String   rootElementName = String("Cone"),
bool    nameSpaceHeader = false
[static]
 

Outputs any given Cone 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 Cone object without creating a ConeData object.

Parameters:
cone Cone 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::ConeData::Output std::ostream &    out,
bool    nameSpaceHeader = false
const [virtual]
 

Outputs stored data CylisphereModel in XML format. The root element for ConeData 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::ConeData::parseParameters const DOMElement *    coneNode [protected, virtual]
 

Overloaded method for parsing an element of type CylisphereType.

Parameters:
coneNode A DOMElement that points to a Cone node

Reimplemented from OSCAR::XMLData.

bool OSCAR::ConeData::SetParameters const Cone   cone
 

Set the Cone that will be serialized by this object.

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


Member Data Documentation

Cone* OSCAR::ConeData::cone [protected]
 


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