| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DayaBay::UserFloat Class Reference

User-defined floating-point data. More...

#include <UserFloat.h>

Inheritance diagram for DayaBay::UserFloat:

[legend]
Collaboration diagram for DayaBay::UserFloat:
[legend]
List of all members.

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

 UserFloat (const std::string &name, const float &value)
 standard constructor
 UserFloat ()
 Default Constructor.
virtual ~UserFloat ()
 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.
float value () const
 Retrieve const User-defined Value.
void setValue (float 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

float m_value
 User-defined Value.

Detailed Description

User-defined floating-point data.

Author:
dandwyer@caltech.edu created Mon Apr 11 03:30:17 2011

Definition at line 39 of file UserFloat.h.


Member Enumeration Documentation

enum DayaBay::UserData::DataType [inherited]

The type of the user-defined data (float, int, vector, etc).

Enumerator:
Unknown 
Float 
FloatArray 
Int 
IntArray 

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       };


Constructor & Destructor Documentation

DayaBay::UserFloat::UserFloat ( const std::string &  name,
const float &  value 
) [inline]

standard constructor

Definition at line 44 of file UserFloat.h.

00045                                   : UserData(name),
00046                                          m_value(value) {}

DayaBay::UserFloat::UserFloat (  )  [inline]

Default Constructor.

Definition at line 49 of file UserFloat.h.

00049 : m_value(0.0) {}

DayaBay::UserFloat::~UserFloat (  )  [virtual]

Default Destructor.

Definition at line 12 of file UserData.cc.

00013 {
00014   ;  
00015 }


Member Function Documentation

std::ostream & DayaBay::UserFloat::fillStream ( std::ostream &  s  )  const [inline, virtual]

Fill the ASCII output stream.

Reimplemented from DayaBay::UserData.

Definition at line 122 of file UserFloat.h.

00123 {
00124   UserData::fillStream(s);
00125   s << "{ " << "value : " << m_value << std::endl << " }";
00126   return s;
00127 }

DayaBay::UserData::DataType DayaBay::UserFloat::type (  )  const [inline, virtual]

Type of this user data field.

Reimplemented from DayaBay::UserData.

Definition at line 140 of file UserFloat.h.

00141 {
00142 return DayaBay::UserData::Float;
00143 }

float DayaBay::UserFloat::value (  )  const [inline]

Retrieve const User-defined Value.

Definition at line 130 of file UserFloat.h.

00131 {
00132   return m_value;
00133 }

void DayaBay::UserFloat::setValue ( float  value  )  [inline]

Update User-defined Value.

Definition at line 135 of file UserFloat.h.

00136 {
00137   m_value = value;
00138 }

static void* DayaBay::UserFloat::operator new ( size_t  size  )  [inline, static]

operator new

Reimplemented from DayaBay::UserData.

Definition at line 71 of file UserFloat.h.

00072     {
00073       return ( sizeof(UserFloat) == size ? 
00074                boost::singleton_pool<UserFloat, sizeof(UserFloat)>::malloc() :
00075                ::operator new(size) );
00076     }

static void* DayaBay::UserFloat::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 UserFloat.h.

00082     {
00083       return ::operator new (size,pObj);
00084     }

static void DayaBay::UserFloat::operator delete ( void *  p  )  [inline, static]

operator delete

Reimplemented from DayaBay::UserData.

Definition at line 87 of file UserFloat.h.

00088     {
00089       boost::singleton_pool<UserFloat, sizeof(UserFloat)>::is_from(p) ?
00090       boost::singleton_pool<UserFloat, sizeof(UserFloat)>::free(p) :
00091       ::operator delete(p);
00092     }

static void DayaBay::UserFloat::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 UserFloat.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 }


Member Data Documentation

float DayaBay::UserFloat::m_value [private]

User-defined Value.

Definition at line 105 of file UserFloat.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:19:30 2011 for UserData by doxygen 1.4.7