UAPAttribute Class Reference

UAPAttribute instances are used to construct a UAP model. More...

#include <UAPAttribute.hpp>

List of all members.

Public Member Functions

 UAPAttribute (const std::string &_name, const std::string &_value)
 Creates a UAPAttribute with the specified name and value.
void setName (const std::string &_name)
 Sets the name of this attribute.
void setValue (const std::string &_value)
 Sets the value of this attribute.
std::string getName () const
 Returns the name of this attribute.
std::string getValue () const
 Returns the value of this attribute.
bool getInt (int &num)
 Returns the integer representation of the attribute value.
bool getDouble (double &num)
 Returns the real (double) representation of the attribute value.
bool getBool (bool &num)
 Returns the logical (bool) representation of the attribute value.
std::string toString () const
 Returns a string object representing this attribute.

Friends

std::ostream & operator<< (std::ostream &os, const UAPAttribute &attr)
 Overrides the default output stream operator.


Detailed Description

UAPAttribute instances are used to construct a UAP model.

The UAPAttribute class provides a mutable wrapper for translation so that it is safe to use as an attribute.

Each UAP attribute describes:

The value of an attribute is a string.

Author:
Daniel Bates, Andy Wolski
Version:
1.3, 07/18/05

Definition at line 46 of file UAPAttribute.hpp.


Constructor & Destructor Documentation

UAPAttribute::UAPAttribute ( const std::string &  _name,
const std::string &  _value 
)

Creates a UAPAttribute with the specified name and value.

Parameters:
_name the name
_value the value
See also:
string

Definition at line 29 of file UAPAttribute.cpp.


Member Function Documentation

bool UAPAttribute::getBool ( bool &  num  ) 

Returns the logical (bool) representation of the attribute value.

  • The lagical.
    Returns:
    True if conversion OK. False otherwise.

Definition at line 69 of file UAPAttribute.cpp.

bool UAPAttribute::getDouble ( double &  num  ) 

Returns the real (double) representation of the attribute value.

  • The double number.
    Returns:
    True if conversion OK. False otherwise.

Definition at line 63 of file UAPAttribute.cpp.

bool UAPAttribute::getInt ( int &  num  ) 

Returns the integer representation of the attribute value.

  • The integer number.
    Returns:
    True if conversion OK. False otherwise.

Definition at line 57 of file UAPAttribute.cpp.

string UAPAttribute::getName (  )  const

Returns the name of this attribute.

Returns:
the name of this attribute.
See also:
string

Definition at line 42 of file UAPAttribute.cpp.

string UAPAttribute::getValue (  )  const

Returns the value of this attribute.

Returns:
The value of this attribute.
See also:
string

Definition at line 47 of file UAPAttribute.cpp.

void UAPAttribute::setName ( const std::string &  _name  ) 

Sets the name of this attribute.

Parameters:
_name the name
See also:
string

Definition at line 32 of file UAPAttribute.cpp.

void UAPAttribute::setValue ( const std::string &  _value  ) 

Sets the value of this attribute.

Parameters:
_value the value
See also:
string

Definition at line 37 of file UAPAttribute.cpp.

string UAPAttribute::toString (  )  const

Returns a string object representing this attribute.

Returns:
a string representation of this attribute.
See also:
string

Definition at line 52 of file UAPAttribute.cpp.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const UAPAttribute attr 
) [friend]

Overrides the default output stream operator.

See also:
toString

Definition at line 75 of file UAPAttribute.cpp.


Generated on Fri Feb 12 15:47:57 2010 for Universal Accelerator Parser by  doxygen 1.5.7