cuIBM
A GPU-based Immersed Boundary Method code
Public Member Functions | Private Member Functions | Private Attributes | List of all members
property Class Reference

Stores information about a property in a generic way. More...

#include <parameterDB.h>

Public Member Functions

 property ()
 Constructor. Initializes the memory to zero. More...
 
template<typename T >
get ()
 Gets the value of the property as a given type. More...
 
template<typename T >
void set (T v)
 Sets the value of the property given a type. More...
 
const char * print ()
 Returns a string describing the value of property as appropriate. More...
 
template<>
std::string get ()
 Gets the value of the property as a string. More...
 
template<>
void set (std::string s)
 Sets the value of the property given a string. More...
 

Private Member Functions

template<typename T >
getInternal ()
 

Private Attributes

const std::type_info * type
 
char value [256]
 

Detailed Description

Stores information about a property in a generic way.

Definition at line 23 of file parameterDB.h.

Constructor & Destructor Documentation

property::property ( )
inline

Constructor. Initializes the memory to zero.

Definition at line 37 of file parameterDB.h.

References print().

Member Function Documentation

template<typename T >
T property::get ( )

Gets the value of the property as a given type.

Returns
the value of the property as a given type

Definition at line 70 of file parameterDB.cu.

References value.

template<>
template boundaryCondition ** property::get< boundaryCondition ** > ( )

Gets the value of the property as a string.

Returns
the value of the property as a string

Definition at line 58 of file parameterDB.cu.

References value.

template<typename T >
T property::getInternal ( )
private
const char * property::print ( )

Returns a string describing the value of property as appropriate.

Returns
a constant character pointer

Definition at line 96 of file parameterDB.cu.

References toString(), type, and value.

Referenced by property().

template<typename T >
void property::set ( v)

Sets the value of the property given a type.

Parameters
vthe value

Definition at line 132 of file parameterDB.cu.

References type, and value.

template<>
void property::set ( std::string  s)

Sets the value of the property given a string.

Parameters
sa string

Definition at line 120 of file parameterDB.cu.

References value.

Member Data Documentation

const std::type_info* property::type
private

Definition at line 28 of file parameterDB.h.

Referenced by print(), and set().

char property::value[256]
private

Definition at line 31 of file parameterDB.h.

Referenced by get(), print(), and set().


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