#include <UserInt.h>
Inheritance diagram for DayaBay::UserInt:
Public Types | |
Unknown = 0 | |
Float = 1 | |
FloatArray = 2 | |
Int = 3 | |
IntArray = 4 | |
enum | DataType { Unknown = 0, Float = 1, FloatArray = 2, Int = 3, IntArray = 4 } |
The type of the user-defined data (float, int, vector, etc). More... | |
Public Member Functions | |
UserInt (const std::string &name, const int &value) | |
standard constructor | |
UserInt () | |
Default Constructor. | |
virtual | ~UserInt () |
Default Destructor. | |
virtual std::ostream & | fillStream (std::ostream &s) const |
Fill the ASCII output stream. | |
virtual UserData::DataType | type () const |
Type of this user data field. | |
int | value () const |
Retrieve const User-defined Value. | |
void | setValue (int value) |
Update User-defined Value. | |
const std::string & | name () const |
Retrieve const Name of this user data field. | |
void | setName (const std::string &value) |
Update Name of this user data field. | |
Static Public Member Functions | |
static void * | operator new (size_t size) |
operator new | |
static void * | operator new (size_t size, void *pObj) |
placement operator new it is needed by libstdc++ 3.2.3 (e.g. | |
static void | operator delete (void *p) |
operator delete | |
static void | operator delete (void *p, void *pObj) |
placement operator delete not sure if really needed, but it does not harm | |
Private Attributes | |
int | m_value |
User-defined Value. |
Definition at line 39 of file UserInt.h.
enum DayaBay::UserData::DataType [inherited] |
The type of the user-defined data (float, int, vector, etc).
Definition at line 47 of file UserData.h.
00047 { Unknown = 0, // Undefined, indicates error 00048 Float = 1, // Floating-point value 00049 FloatArray = 2, // Array of floating-point values 00050 Int = 3, // Integer value 00051 IntArray = 4 // Array of integer values 00052 };
DayaBay::UserInt::UserInt | ( | const std::string & | name, | |
const int & | value | |||
) | [inline] |
DayaBay::UserInt::UserInt | ( | ) | [inline] |
DayaBay::UserInt::~UserInt | ( | ) | [virtual] |
std::ostream & DayaBay::UserInt::fillStream | ( | std::ostream & | s | ) | const [inline, virtual] |
Fill the ASCII output stream.
Reimplemented from DayaBay::UserData.
Definition at line 122 of file UserInt.h.
00123 { 00124 UserData::fillStream(s); 00125 s << "{ " << "value : " << m_value << std::endl << " }"; 00126 return s; 00127 }
DayaBay::UserData::DataType DayaBay::UserInt::type | ( | ) | const [inline, virtual] |
Type of this user data field.
Reimplemented from DayaBay::UserData.
Definition at line 140 of file UserInt.h.
00141 { 00142 return DayaBay::UserData::Int; 00143 }
int DayaBay::UserInt::value | ( | ) | const [inline] |
void DayaBay::UserInt::setValue | ( | int | value | ) | [inline] |
static void* DayaBay::UserInt::operator new | ( | size_t | size | ) | [inline, static] |
operator new
Reimplemented from DayaBay::UserData.
Definition at line 71 of file UserInt.h.
00072 { 00073 return ( sizeof(UserInt) == size ? 00074 boost::singleton_pool<UserInt, sizeof(UserInt)>::malloc() : 00075 ::operator new(size) ); 00076 }
static void* DayaBay::UserInt::operator new | ( | size_t | size, | |
void * | pObj | |||
) | [inline, static] |
placement operator new it is needed by libstdc++ 3.2.3 (e.g.
in std::vector) it is not needed in libstdc++ >= 3.4
Reimplemented from DayaBay::UserData.
Definition at line 81 of file UserInt.h.
static void DayaBay::UserInt::operator delete | ( | void * | p | ) | [inline, static] |
static void DayaBay::UserInt::operator delete | ( | void * | p, | |
void * | pObj | |||
) | [inline, static] |
placement operator delete not sure if really needed, but it does not harm
Reimplemented from DayaBay::UserData.
Definition at line 96 of file UserInt.h.
00097 { 00098 ::operator delete (p, pObj); 00099 }
const std::string & DayaBay::UserData::name | ( | ) | const [inline, inherited] |
Retrieve const Name of this user data field.
Definition at line 150 of file UserData.h.
00151 { 00152 return m_name; 00153 }
void DayaBay::UserData::setName | ( | const std::string & | value | ) | [inline, inherited] |
Update Name of this user data field.
Definition at line 155 of file UserData.h.
00156 { 00157 m_name = value; 00158 }
int DayaBay::UserInt::m_value [private] |