COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Public Types | Public Member Functions | Public Attributes | List of all members
PropertyList Class Reference

#include <PropertyList.hpp>

Public Types

typedef std::map< std::string, boost::any > PropertyStorage_t
 type to store the options per name More...
 
typedef PropertyStorage_t::iterator iterator
 
typedef PropertyStorage_t::const_iterator const_iterator
 

Public Member Functions

PropertyListadd (const std::string &name, const boost::any &value)
 adds a property to the list More...
 
const boost::any & property (const std::string &pname) const
 get a const property from the list More...
 
boost::any & property (const std::string &pname)
 get a property from the list More...
 
const boost::any & operator[] (const std::string &pname) const
 contant access operator to properties More...
 
boost::any & operator[] (const std::string &pname)
 access operator to properties More...
 
void set (const std::string &pname, const boost::any &val)
 
void set (const std::string &arg)
 Configure an option on this class from a human readable string. More...
 
bool check (const std::string &prop_name) const
 
void erase (const std::string &pname)
 
template<typename TYPE >
TYPE value (const std::string &pname) const
 
std::string value_str (const std::string &pname) const
 
std::string type (const std::string &pname) const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 

Public Attributes

PropertyStorage_t store
 storage of options More...
 

Detailed Description

Class defines a list of options to be used in the ConfigObject class

Author
Tiago Quintino

Definition at line 28 of file PropertyList.hpp.

Member Typedef Documentation

typedef PropertyStorage_t::const_iterator const_iterator

Definition at line 37 of file PropertyList.hpp.

typedef PropertyStorage_t::iterator iterator

Definition at line 36 of file PropertyList.hpp.

typedef std::map< std::string , boost::any > PropertyStorage_t

type to store the options per name

Definition at line 34 of file PropertyList.hpp.

Member Function Documentation

PropertyList & add ( const std::string &  name,
const boost::any &  value 
)

adds a property to the list

Definition at line 24 of file PropertyList.cpp.

iterator begin ( )
inline

Definition at line 88 of file PropertyList.hpp.

const_iterator begin ( ) const
inline

Definition at line 92 of file PropertyList.hpp.

bool check ( const std::string &  prop_name) const
inline

check that a property with the name exists

Parameters
prop_namethe property name

Definition at line 68 of file PropertyList.hpp.

iterator end ( )
inline

Definition at line 90 of file PropertyList.hpp.

const_iterator end ( ) const
inline

Definition at line 94 of file PropertyList.hpp.

void erase ( const std::string &  pname)

erases a property

Parameters
prop_namethe property name

Definition at line 91 of file PropertyList.cpp.

const boost::any & operator[] ( const std::string &  pname) const

contant access operator to properties

Definition at line 109 of file PropertyList.cpp.

boost::any & operator[] ( const std::string &  pname)

access operator to properties

Definition at line 102 of file PropertyList.cpp.

const boost::any & property ( const std::string &  pname) const

get a const property from the list

Definition at line 36 of file PropertyList.cpp.

boost::any & property ( const std::string &  pname)

get a property from the list

Definition at line 58 of file PropertyList.cpp.

void set ( const std::string &  pname,
const boost::any &  val 
)

Configure one option, and trigger its actions

Parameters
[in]optnameThe option name
[in]valThe new value assigned to the option

Definition at line 116 of file PropertyList.cpp.

void set ( const std::string &  arg)

Configure an option on this class from a human readable string.

The string provides the configuration in one of the following formats:

  • var_name:type=value
  • var_name:array[type]=val1,val2

Definition at line 123 of file PropertyList.cpp.

std::string type ( const std::string &  pname) const

Definition at line 84 of file PropertyList.cpp.

TYPE value ( const std::string &  pname) const
inline
Returns
the value of the option cast to TYPE

Definition at line 79 of file PropertyList.hpp.

std::string value_str ( const std::string &  pname) const

Definition at line 77 of file PropertyList.cpp.

Member Data Documentation

storage of options

Definition at line 99 of file PropertyList.hpp.


The documentation for this class was generated from the following files:
Send comments to:
COOLFluiD Web Admin