Overture  Version 25
Public Member Functions | Protected Member Functions | List of all members
EntityTag Class Reference

#include <EntityTag.h>

Public Member Functions

 EntityTag (const std::string name="", const void *data=0, const bool copy_data=false, const int data_size=0)
 the default constructor initialized the EntityTag to a nil tag
 
 EntityTag (const EntityTag &et)
 a simple copy constructor; note it will be deep or shallow depending on the value of et.copyData
 
virtual ~EntityTag ()
 
bool is_nil () const
 return true if this tag has nothing stored in it
 
virtual int setData (const std::string name, const void *data, const bool copy_data=false, const int data_size=0)
 set the data in the tag; note this will be a shallow or deep copy depending on the value of copy_data
 
virtual int getData (void *&data, std::string &name)
 obtain a pointer to the data and the name of the tag
 
virtual const void * getData () const
 return a const pointer to the data
 
virtual int getDataSize () const
 obtain the storage size of the data
 
bool copiesData () const
 copiesData returns true if the tag performs a deep copy of the data it stores
 
std::string getName () const
 obtain the name of the tag, this name can be different for each instance
 
virtual std::string getClassName () const
 obtain the classname of the tag; this name is the same for all instances
 
virtual int get (const GenericDataBase &dir, const aString &name)
 put to an Overture GenericDataBase
 
virtual int put (GenericDataBase &dir, const aString &name) const
 get from an Overture GenericDataBase
 

Protected Member Functions

void destroy ()
 

Detailed Description

EntityTag can be used to manage generic tagging information for UnstructuredMappings. It will either shallow or deep copy the data given to it. Also, it is usefull as a base class for user defined tag types.

Constructor & Destructor Documentation

EntityTag::EntityTag ( const std::string  name = "",
const void *  data = 0,
const bool  copy_data = false,
const int  data_size = 0 
)
inline

the default constructor initialized the EntityTag to a nil tag

References setData().

EntityTag::EntityTag ( const EntityTag et)
inline

a simple copy constructor; note it will be deep or shallow depending on the value of et.copyData

References setData().

virtual EntityTag::~EntityTag ( )
inlinevirtual

References destroy().

Member Function Documentation

bool EntityTag::copiesData ( ) const
inline

copiesData returns true if the tag performs a deep copy of the data it stores

Referenced by UnstructuredMapping::operator=().

void EntityTag::destroy ( )
inlineprotected

Referenced by setData(), and ~EntityTag().

int EntityTag::get ( const GenericDataBase dir,
const aString name 
)
virtual
virtual std::string EntityTag::getClassName ( void  ) const
inlinevirtual

obtain the classname of the tag; this name is the same for all instances

int EntityTag::getData ( void *&  data,
std::string &  name 
)
virtual

obtain a pointer to the data and the name of the tag

Referenced by UnstructuredMapping::getTagData(), and UnstructuredMapping::operator=().

virtual const void* EntityTag::getData ( ) const
inlinevirtual

return a const pointer to the data

virtual int EntityTag::getDataSize ( ) const
inlinevirtual

obtain the storage size of the data

Referenced by UnstructuredMapping::operator=().

std::string EntityTag::getName ( ) const
inline

obtain the name of the tag, this name can be different for each instance

Referenced by UnstructuredMapping::deleteTag(), and UnstructuredMapping::operator=().

bool EntityTag::is_nil ( ) const
inline

return true if this tag has nothing stored in it

int EntityTag::put ( GenericDataBase dir,
const aString name 
) const
virtual
int EntityTag::setData ( const std::string  name,
const void *  data,
const bool  copy_data = false,
const int  data_size = 0 
)
virtual

set the data in the tag; note this will be a shallow or deep copy depending on the value of copy_data

References destroy().

Referenced by EntityTag(), and UnstructuredMapping::setTagData().


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