Ravelin
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Ravelin::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, float 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< SVelocityd > &velocity_values)
 
 XMLAttrib (const std::string &name, const std::vector< SVelocityf > &velocity_values)
 
 XMLAttrib (const std::string &name, const std::vector< SAcceld > &accel_values)
 
 XMLAttrib (const std::string &name, const std::vector< SAccelf > &accel_values)
 
 XMLAttrib (const std::string &name, double roll, double pitch, double yaw)
 
 XMLAttrib (const std::string &name, float roll, float pitch, float yaw)
 
 XMLAttrib (const std::string &name, const Vector2d &vector_value)
 Constructs a Vector2d-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const Vector2f &vector_value)
 Constructs a Vector2d-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const Vector3d &vector_value)
 Constructs a Vector3d-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const Vector3f &vector_value)
 Constructs a Vector3d-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const VectorNd &vector_value)
 Constructs a vector-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const VectorNf &vector_value)
 Constructs a vector-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const SVector6d &vector_value)
 Constructs a vector-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const SVector6f &vector_value)
 Constructs a vector-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const MatrixNd &matrix_value)
 Constructs a vector-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const MatrixNf &matrix_value)
 Constructs a vector-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const Matrix3d &matrix_value)
 Constructs a vector-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const Matrix3f &matrix_value)
 Constructs a vector-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const Quatd &quat_value)
 Constructs a Quatd-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const Quatf &quat_value)
 Constructs a Quatd-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const Origin3d &origin_value)
 Constructs a Origin3d-valued attribute with the given name.
 
 XMLAttrib (const std::string &name, const Origin3f &origin_value)
 Constructs a Origin3d-valued attribute with the given name.
 
 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 ()
 
void get_real_value (double &value)
 Gets a floating point value from the underlying string representation.
 
void get_real_value (float &value)
 Gets a floating point value from the underlying string representation.
 
void get_origin_value (Origin3d &origin)
 Returns an Origin3d value from the attribute.
 
void get_origin_value (Origin3f &origin)
 Returns an Origin3d value from the attribute.
 
void get_velocity_values (std::vector< SVelocityd > &values)
 
void get_velocity_values (std::vector< SVelocityf > &values)
 
void get_accel_values (std::vector< SAcceld > &values)
 
void get_accel_values (std::vector< SAccelf > &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.
 
void get_quat_value (Quatd &q)
 Returns a quaternion value from the attribute.
 
void get_axis_angle_value (Quatd &q)
 
void get_rpy_value (Quatd &q)
 Returns a quaternion value from a roll-pitch-yaw attribute.
 
void get_quat_value (Quatf &q)
 Returns a quaternion value from the attribute.
 
void get_axis_angle_value (Quatf &q)
 
void get_rpy_value (Quatf &q)
 Returns a quaternion value from a roll-pitch-yaw attribute.
 
void get_vector_value (VectorNd &v)
 Gets a list of space-delimited and/or comma-delimited vectors from the underlying string value.
 
void get_vector_value (Vector2d &v)
 Gets a list of space-delimited and/or comma-delimited vectors from the underlying string value.
 
void get_vector_value (Vector3d &v)
 Gets a list of space-delimited and/or comma-delimited vectors from the underlying string value.
 
void get_vector_value (SVector6d &v)
 Gets a list of space-delimited and/or comma-delimited vectors from the underlying string value.
 
void get_matrix_value (Matrix3d &m)
 Gets a list of space-delimited and/or comma-delimited strings from the underlying string value.
 
void get_matrix_value (MatrixNd &m)
 Gets a list of space-delimited and/or comma-delimited strings from the underlying string value.
 
void get_vector_value (VectorNf &v)
 Gets a list of space-delimited and/or comma-delimited vectors from the underlying string value.
 
void get_vector_value (Vector2f &v)
 Gets a list of space-delimited and/or comma-delimited vectors from the underlying string value.
 
void get_vector_value (Vector3f &v)
 Gets a list of space-delimited and/or comma-delimited vectors from the underlying string value.
 
void get_vector_value (SVector6f &v)
 Gets a list of space-delimited and/or comma-delimited vectors from the underlying string value.
 
void get_matrix_value (Matrix3f &m)
 Gets a list of space-delimited and/or comma-delimited strings from the underlying string value.
 
void get_matrix_value (MatrixNf &m)
 Gets a list of space-delimited and/or comma-delimited strings from the underlying string value.
 
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.
 
static std::string str (float 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)

References processed, and value.


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