Moby
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Moby::XMLAttrib Class Reference

Attributes used for XML nodes. More...

#include <XMLTree.h>

Public Member Functions

 XMLAttrib (const std::string &name, const std::string &string_value)
 Constructs an XMLAttrib object from a name and a string value.
 
 XMLAttrib (const std::string &name, double real_value)
 Constructs a real-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, int int_value)
 Constructs an integer-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, unsigned unsigned_value)
 Constructs an unsigned integer-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const std::vector< Ravelin::SVelocityd > &velocity_values)
 
 XMLAttrib (const std::string &name, const std::vector< Ravelin::SAcceld > &accel_values)
 
 XMLAttrib (const std::string &name, double roll, double pitch, double yaw)
 
 XMLAttrib (const std::string &name, const Ravelin::Vector2d &vector_value)
 
 XMLAttrib (const std::string &name, const Ravelin::Vector3d &vector_value)
 
 XMLAttrib (const std::string &name, const Ravelin::VectorNd &vector_value)
 
 XMLAttrib (const std::string &name, const Ravelin::SVector6d &vector_value)
 
 XMLAttrib (const std::string &name, const Ravelin::MatrixNd &matrix_value)
 
 XMLAttrib (const std::string &name, const Ravelin::Matrix3d &matrix_value)
 
 XMLAttrib (const std::string &name, const Ravelin::Quatd &quat_value)
 
 XMLAttrib (const std::string &name, const Ravelin::Origin3d &origin_value)
 
 XMLAttrib (const std::string &name, bool bool_value)
 Constructs a Boolean-valued attribute from the given value.
 
 XMLAttrib (const std::string &name, long long_value)
 Constructs a long-valued attribute from the given value.
 
const std::string & get_string_value ()
 
double get_real_value ()
 Gets a floating point value from the underlying string representation.
 
Ravelin::Origin3d get_origin_value ()
 Returns an Origin3d value from the attribute.
 
std::vector< Ravelin::SVelocityd > get_velocity_values ()
 
std::vector< Ravelin::SAcceld > get_accel_values ()
 
int get_int_value ()
 
unsigned get_unsigned_value ()
 
bool get_bool_value ()
 Gets a Boolean value from the underlying string representation. More...
 
long get_long_value ()
 
std::list< std::string > get_strings_value ()
 Gets a list of space-delimited and/or comma-delimited strings from the underlying string value.
 
Ravelin::Quatd get_quat_value ()
 Returns a quaternion value from the attribute.
 
Ravelin::Quatd get_axis_angle_value ()
 
Ravelin::Quatd get_rpy_value ()
 Returns a quaternion value from a roll-pitch-yaw attribute.
 
void get_vector_value (Ravelin::VectorNd &v)
 
void get_vector_value (Ravelin::Vector2d &v)
 
void get_vector_value (Ravelin::Vector3d &v)
 
void get_vector_value (Ravelin::SVector6d &v)
 
void get_matrix_value (Ravelin::Matrix3d &m)
 
void get_matrix_value (Ravelin::MatrixNd &m)
 
bool operator== (const XMLAttrib &a) const
 
bool operator< (const XMLAttrib &a) const
 

Static Public Member Functions

static std::string str (double value)
 Gets a real value as a string.
 

Public Attributes

std::string name
 The name of the attribute.
 
std::string value
 The value in string form.
 
bool processed
 Indicates whether this attribute has been processed.
 

Detailed Description

Attributes used for XML nodes.

Member Function Documentation

bool XMLAttrib::get_bool_value ( )

Gets a Boolean value from the underlying string representation.

Note
an error message will be output to stderr if the string is not either "true" or "false" (case insensitive)

Referenced by Moby::TriangleMeshPrimitive::load_from_xml(), Moby::RCArticulatedBody::load_from_xml(), and Moby::RigidBody::load_from_xml().


The documentation for this class was generated from the following files: