FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
Data Class Reference

#include <fei_Data.hpp>

Public Member Functions

 Data ()
 
virtual ~Data ()
 
void setTypeName (const char *name)
 
const char * getTypeName () const
 
void setDataPtr (void *ptr)
 
void * getDataPtr () const
 

Private Attributes

std::string typeName_
 
void * dataPtr_
 

Detailed Description

This is a very simple class for passing stuff around in a void pointer. It has the ability to store and query a type name, so at least there can be user-enforced type safety.

When setTypeName is called, a char* is created and a copy of the input argument is taken. This char* is later destroyed by the Data destructor. The void* dataPtr_ member is not destroyed, it is just a copy of a pointer.

Definition at line 18 of file fei_Data.hpp.

Constructor & Destructor Documentation

Data::Data ( )
inline

Default constructor.

Definition at line 21 of file fei_Data.hpp.

virtual Data::~Data ( )
inlinevirtual

Default destructor.

Definition at line 24 of file fei_Data.hpp.

Member Function Documentation

void Data::setTypeName ( const char *  name)
inline

Set a string representing the type of the object stored in 'getDataPtr()'.

Definition at line 28 of file fei_Data.hpp.

References typeName_.

Referenced by FEI_Implementation::aggregateSystem().

const char* Data::getTypeName ( ) const
inline

Query the string representing the type of the object stored in 'getDataPtr()'.

Definition at line 32 of file fei_Data.hpp.

References typeName_.

Referenced by FEI_Implementation::aggregateSystem().

void Data::setDataPtr ( void *  ptr)
inline

Set the contents of the data pointer.

Definition at line 35 of file fei_Data.hpp.

References dataPtr_.

Referenced by FEI_Implementation::aggregateSystem().

void* Data::getDataPtr ( ) const
inline

Retrieve the contents of the data pointer.

Definition at line 38 of file fei_Data.hpp.

References dataPtr_.

Referenced by FEI_Implementation::aggregateSystem().

Member Data Documentation

std::string Data::typeName_
private

Definition at line 41 of file fei_Data.hpp.

Referenced by getTypeName(), and setTypeName().

void* Data::dataPtr_
private

Definition at line 42 of file fei_Data.hpp.

Referenced by getDataPtr(), and setDataPtr().


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