FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | 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
 

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.

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.

void Data::setDataPtr ( void *  ptr)
inline

Set the contents of the data pointer.

Definition at line 35 of file fei_Data.hpp.

void* Data::getDataPtr ( ) const
inline

Retrieve the contents of the data pointer.

Definition at line 38 of file fei_Data.hpp.


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