delphi_cb
 All Classes Namespaces Files Functions Variables Macros
IDataContainer Class Referenceabstract

Inherited by CDelphiData [virtual].

Public Member Functions

 IDataContainer ()
 
virtual ~IDataContainer ()
 
bool keyExists (const string &strKey)
 
template<class T >
const T & getKey_constRef (const string &strKey)
 
template<class T >
const T * getKey_constPtr (const string &strKey)
 
template<class T >
const T ** getKey_constPtr (const string &strKey, const int &iRows, const int &iColumns)
 
template<class T >
const T *** getKey_constPtr (const string &strKey, const int &iRows, const int &iColumns, const int &iPages)
 
template<class T >
const T **** getKey_constPtr (const string &strKey, const int &iRows, const int &iColumns, const int &iPages, const int &iSects)
 
template<class T >
T & getKey_Ref (const string &strKey)
 
template<class T >
getKey_Val (const string &strKey)
 
template<class T >
T * getKey_Ptr (const string &strKey)
 
template<class T >
T *** getKey_Ptr (const string &strKey, const int &iRows, const int &iColumns, const int &iPages)
 
virtual void showMap (const string &strMapFile)=0
 
virtual void reset (const string &strF95File)=0
 

Protected Member Functions

virtual void setMap ()=0
 

Protected Attributes

DataMap myData
 

Constructor & Destructor Documentation

IDataContainer::IDataContainer ( )
inline

constructor

virtual IDataContainer::~IDataContainer ( )
inlinevirtual

virtual destructor allowing an instance of a derived class can be deleted properly through a pointer to this base class

Member Function Documentation

template<class T >
const T * IDataContainer::getKey_constPtr ( const string &  strKey)

Template function to get a constant pointer pointing to the data of a vector-type entry in the data container

Parameters
[in]strKeyThe key to be searched in the data container
Returns
a constant pointer if the key is found. Otherwise, an exception is thrown.
template<class T >
const T ** IDataContainer::getKey_constPtr ( const string &  strKey,
const int &  iRows,
const int &  iColumns 
)

Template function to get a constant 2D pointer pointing to the data of a vector-type entry in the data container

Parameters
[in]strKeyThe key to be searched in the data container
[in]iRowsNumber of rows
[in]iColumnsNumber of columns
Returns
a constant 2D pointer if the key is found. Otherwise, an exception is thrown.
template<class T >
const T *** IDataContainer::getKey_constPtr ( const string &  strKey,
const int &  iRows,
const int &  iColumns,
const int &  iPages 
)

Template function to get a constant 3D pointer pointing to the data of a vector-type entry in the data container

 @param[in] strKey The key to be searched in the data container
Parameters
[in]iRowsNumber of rows
[in]iColumnsNumber of columns
[in]iPagesNumber of pages
Returns
a constant 3D pointer if the key is found. Otherwise, an exception is thrown.
template<class T >
const T **** IDataContainer::getKey_constPtr ( const string &  strKey,
const int &  iRows,
const int &  iColumns,
const int &  iPages,
const int &  iSects 
)

Template function to get a constant 4D pointer pointing to the data of a vector-type entry in the data container

Parameters
[in]strKeyThe key to be searched in the data container
[in]iRowsNumber of rows
[in]iColumnsNumber of columns
[in]iPagesNumber of pages
[in]iSectsNumber of sections
Returns
a constant 4D pointer if the key is found. Otherwise, an exception is thrown.
template<class T >
template const vector< SDoubleGridValue > & IDataContainer::getKey_constRef ( const string &  strKey)

Template function to get a constant reference to an entry of the data container

Parameters
[in]strKeyThe key to be searched in the data container
Returns
a constant reference to an entry if the key is found. Otherwise, an exception is thrown.
template<class T >
T * IDataContainer::getKey_Ptr ( const string &  strKey)

Template function to get a pointer pointing to the data of a vector-type entry in the data container

Parameters
[in]strKeyThe key to be searched in the data container
Returns
a pointer if the key is found. Otherwise, an exception is thrown.
template<class T >
T *** IDataContainer::getKey_Ptr ( const string &  strKey,
const int &  iRows,
const int &  iColumns,
const int &  iPages 
)

Template function to get a 3D pointer pointing to the data of a vector-type entry in the data container

Parameters
[in]strKeyThe key to be searched in the data container
[in]iRowsNumber of rows
[in]iColumnsNumber of columns
[in]iPagesNumber of pages
Returns
a 3D pointer if the key is found. Otherwise, an exception is thrown.
template<class T >
template vector< SDoubleGridValue > & IDataContainer::getKey_Ref ( const string &  strKey)

Template function to get a reference to an entry of the data container

Parameters
[in]strKeyThe key to be searched in the data container
Returns
a reference to an entry if the key is found. Otherwise, an exception is thrown.
template<class T >
template vector< SDoubleGridValue > IDataContainer::getKey_Val ( const string &  strKey)

Template function to get the value to an entry of the data container

Parameters
[in]strKeyThe key to be searched in the data container
Returns
Value of an entry if the key is found. Otherwise, an exception is thrown.
bool IDataContainer::keyExists ( const string &  strKey)

Function to check if the user-specified key exists or not in the data container

Parameters
[in]strKeyThe key to be searched in the data container
Returns
true if the key exists, false otherwise
virtual void IDataContainer::reset ( const string &  strF95File)
pure virtual

Function to reset data container by the values obtained from FORTRAN program

Parameters
[in]strF95FileThe file name storing values obtained from FORTRAN program

Implemented in CDelphiData.

virtual void IDataContainer::setMap ( )
protectedpure virtual

member function to set above data map. must be virtual since only the derived class knows the contents to be written in the data container.

virtual void IDataContainer::showMap ( const string &  strMapFile)
pure virtual

Function to show contents in the data container

Parameters
[in]strMapFileThe file name that the data container to be written into

Implemented in CDelphiData.

Member Data Documentation

DataMap IDataContainer::myData
protected

data map containing variables to be read/modified among many other classes. Each entry contains a key (string type) and associated value (boost::any type)


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