Field3D
|
#include <Field.h>
Public Types | |
typedef FieldBase | class_type |
typedef FieldBase | class_type |
typedef boost::intrusive_ptr < FieldBase > | Ptr |
typedef boost::intrusive_ptr < FieldBase > | Ptr |
Public Member Functions | |
Constructors, destructors, copying | |
FieldBase () | |
Constructor. | |
FieldBase (const FieldBase &) | |
Copy Constructor. | |
virtual | ~FieldBase () |
Destructor. | |
FieldBase () | |
Constructor. | |
FieldBase (const FieldBase &) | |
Copy Constructor. | |
virtual | ~FieldBase () |
Destructor. | |
To be implemented by subclasses | |
virtual std::string | className () const =0 |
Returns the class name of the object. Used by the class pool and when writing the data to disk. | |
virtual Ptr | clone () const =0 |
Returns a pointer to a copy of the field, pure virtual so ensure derived classes properly implement it. | |
virtual std::string | className () const =0 |
Returns the class name of the object. Used by the class pool and when writing the data to disk. | |
virtual Ptr | clone () const =0 |
Returns a pointer to a copy of the field, pure virtual so ensure derived classes properly implement it. | |
RTTI replacement | |
| |
virtual bool | checkRTTI (const std::string &typenameStr)=0 |
This function is only implemented by concrete classes and triggers the actual RTTI check through matchRTTI();. | |
bool | matchRTTI (const std::string &typenameStr) |
Performs a check to see if the given typename string matches this class' This needs to be implemented in -all- subclasses, even abstract ones. | |
virtual bool | checkRTTI (const std::string &typenameStr)=0 |
This function is only implemented by concrete classes and triggers the actual RTTI check through matchRTTI();. | |
bool | matchRTTI (const std::string &typenameStr) |
Performs a check to see if the given typename string matches this class' This needs to be implemented in -all- subclasses, even abstract ones. | |
Metadata | |
FieldMetadata< FieldBase > & | metadata () |
accessor to the m_metadata class | |
const FieldMetadata< FieldBase > & | metadata () const |
Read only access to the m_metadata class. | |
virtual void | metadataHasChanged (const std::string &) |
This function should implemented by concrete classes to get the callback when metadata changes. | |
void | copyMetadata (const FieldBase &field) |
Copies the metadata from a second field. | |
FieldMetadata< FieldBase > & | metadata () |
accessor to the m_metadata class | |
const FieldMetadata< FieldBase > & | metadata () const |
Read only access to the m_metadata class. | |
virtual void | metadataHasChanged (const std::string &) |
This function should implemented by concrete classes to get the callback when metadata changes. | |
void | copyMetadata (const FieldBase &field) |
Copies the metadata from a second field. | |
Public Attributes | |
std::string | attribute |
Optional name of the attribute the field represents. | |
std::string | name |
Optional name of the field. | |
Private Attributes | |
FieldMetadata< FieldBase > | m_metadata |
metadata |
This class provides a common base for all Field objects. It serves the purpose of providing the className() virtual function and as a container for the metadata map
typedef boost::intrusive_ptr<FieldBase> FieldBase::Ptr |
Reimplemented from RefBase.
Reimplemented in DenseField< Data_T >, EmptyField< Data_T >, FieldRes, Field< Data_T >, WritableField< Data_T >, ResizableField< Data_T >, MACField< Data_T >, ProceduralField< Data_T >, SparseField< Data_T >, DenseField< Data_T >, EmptyField< Data_T >, FieldRes, Field< Data_T >, WritableField< Data_T >, ResizableField< Data_T >, MACField< Data_T >, ProceduralField< Data_T >, and SparseField< Data_T >.
typedef FieldBase FieldBase::class_type |
Reimplemented in DenseField< Data_T >, EmptyField< Data_T >, FieldRes, Field< Data_T >, WritableField< Data_T >, ResizableField< Data_T >, MACField< Data_T >, ProceduralField< Data_T >, SparseField< Data_T >, DenseField< Data_T >, EmptyField< Data_T >, FieldRes, Field< Data_T >, WritableField< Data_T >, ResizableField< Data_T >, MACField< Data_T >, ProceduralField< Data_T >, and SparseField< Data_T >.
typedef boost::intrusive_ptr<FieldBase> FieldBase::Ptr |
Reimplemented from RefBase.
Reimplemented in DenseField< Data_T >, EmptyField< Data_T >, FieldRes, Field< Data_T >, WritableField< Data_T >, ResizableField< Data_T >, MACField< Data_T >, ProceduralField< Data_T >, SparseField< Data_T >, DenseField< Data_T >, EmptyField< Data_T >, FieldRes, Field< Data_T >, WritableField< Data_T >, ResizableField< Data_T >, MACField< Data_T >, ProceduralField< Data_T >, and SparseField< Data_T >.
typedef FieldBase FieldBase::class_type |
Reimplemented in DenseField< Data_T >, EmptyField< Data_T >, FieldRes, Field< Data_T >, WritableField< Data_T >, ResizableField< Data_T >, MACField< Data_T >, ProceduralField< Data_T >, SparseField< Data_T >, DenseField< Data_T >, EmptyField< Data_T >, FieldRes, Field< Data_T >, WritableField< Data_T >, ResizableField< Data_T >, MACField< Data_T >, ProceduralField< Data_T >, and SparseField< Data_T >.
FIELD3D_NAMESPACE_OPEN FieldBase::FieldBase | ( | ) |
FieldBase::FieldBase | ( | const FieldBase & | other | ) |
Copy Constructor.
Definition at line 61 of file Field.cpp.
References m_metadata.
: RefBase(), name(other.name), attribute(other.attribute), m_metadata(this) { m_metadata = other.m_metadata; }
FieldBase::~FieldBase | ( | ) | [virtual] |
FieldBase::FieldBase | ( | ) |
Constructor.
FieldBase::FieldBase | ( | const FieldBase & | ) |
Copy Constructor.
virtual FieldBase::~FieldBase | ( | ) | [virtual] |
Destructor.
virtual std::string FieldBase::className | ( | ) | const [pure virtual] |
Returns the class name of the object. Used by the class pool and when writing the data to disk.
Implemented in DenseField< Data_T >, EmptyField< Data_T >, MACField< Data_T >, ProceduralField< Data_T >, SparseField< Data_T >, DenseField< Data_T >, EmptyField< Data_T >, MACField< Data_T >, ProceduralField< Data_T >, and SparseField< Data_T >.
Referenced by printFieldInfo().
virtual Ptr FieldBase::clone | ( | ) | const [pure virtual] |
Returns a pointer to a copy of the field, pure virtual so ensure derived classes properly implement it.
Implemented in DenseField< Data_T >, EmptyField< Data_T >, MACField< Data_T >, SparseField< Data_T >, DenseField< Data_T >, EmptyField< Data_T >, MACField< Data_T >, and SparseField< Data_T >.
virtual bool FieldBase::checkRTTI | ( | const std::string & | typenameStr | ) | [pure virtual] |
This function is only implemented by concrete classes and triggers the actual RTTI check through matchRTTI();.
bool FieldBase::matchRTTI | ( | const std::string & | typenameStr | ) | [inline] |
FieldMetadata<FieldBase>& FieldBase::metadata | ( | ) | [inline] |
accessor to the m_metadata class
Definition at line 202 of file Field.h.
References m_metadata.
Referenced by copyMetadata(), main(), and printFieldInfo().
{ return m_metadata; }
const FieldMetadata<FieldBase>& FieldBase::metadata | ( | ) | const [inline] |
Read only access to the m_metadata class.
Definition at line 206 of file Field.h.
References m_metadata.
{ return m_metadata; }
virtual void FieldBase::metadataHasChanged | ( | const std::string & | ) | [inline, virtual] |
void FieldBase::copyMetadata | ( | const FieldBase & | field | ) | [inline] |
Copies the metadata from a second field.
Definition at line 215 of file Field.h.
References m_metadata, and metadata().
{ m_metadata = field.metadata(); }
virtual std::string FieldBase::className | ( | ) | const [pure virtual] |
Returns the class name of the object. Used by the class pool and when writing the data to disk.
Implemented in DenseField< Data_T >, EmptyField< Data_T >, MACField< Data_T >, ProceduralField< Data_T >, SparseField< Data_T >, DenseField< Data_T >, EmptyField< Data_T >, MACField< Data_T >, ProceduralField< Data_T >, and SparseField< Data_T >.
virtual Ptr FieldBase::clone | ( | ) | const [pure virtual] |
Returns a pointer to a copy of the field, pure virtual so ensure derived classes properly implement it.
Implemented in DenseField< Data_T >, EmptyField< Data_T >, MACField< Data_T >, SparseField< Data_T >, DenseField< Data_T >, EmptyField< Data_T >, MACField< Data_T >, and SparseField< Data_T >.
virtual bool FieldBase::checkRTTI | ( | const std::string & | typenameStr | ) | [pure virtual] |
This function is only implemented by concrete classes and triggers the actual RTTI check through matchRTTI();.
bool FieldBase::matchRTTI | ( | const std::string & | typenameStr | ) | [inline] |
FieldMetadata<FieldBase>& FieldBase::metadata | ( | ) | [inline] |
accessor to the m_metadata class
Definition at line 202 of file Field.h.
References m_metadata.
{ return m_metadata; }
const FieldMetadata<FieldBase>& FieldBase::metadata | ( | ) | const [inline] |
Read only access to the m_metadata class.
Definition at line 206 of file Field.h.
References m_metadata.
{ return m_metadata; }
virtual void FieldBase::metadataHasChanged | ( | const std::string & | ) | [inline, virtual] |
void FieldBase::copyMetadata | ( | const FieldBase & | field | ) | [inline] |
Copies the metadata from a second field.
Definition at line 215 of file Field.h.
References m_metadata, and metadata().
{ m_metadata = field.metadata(); }
std::string FieldBase::name |
Optional name of the field.
Definition at line 223 of file Field.h.
Referenced by Field< Data_T >::dataTypeString(), main(), printFieldInfo(), Field3DInputFile::readProxyLayer(), and Field3DOutputFile::writeScalarLayer().
std::string FieldBase::attribute |
Optional name of the attribute the field represents.
Definition at line 225 of file Field.h.
Referenced by main(), printFieldInfo(), Field3DInputFile::readProxyLayer(), and Field3DOutputFile::writeScalarLayer().
FieldMetadata< FieldBase > FieldBase::m_metadata [private] |
metadata
Definition at line 232 of file Field.h.
Referenced by copyMetadata(), FieldBase(), and metadata().