Field3D
|
#include <Field.h>
Public Types | |
typedef FieldBase | class_type |
typedef boost::intrusive_ptr < FieldBase > | Ptr |
Public Member Functions | |
Constructors, destructors, copying | |
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. | |
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. | |
Static Public Member Functions | |
static const char * | classType () |
static const char * | staticClassName () |
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 >, and SparseField< Data_T >.
typedef FieldBase FieldBase::class_type |
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] |
static const char* FieldBase::staticClassName | ( | ) | [inline, static] |
Reimplemented in DenseField< Data_T >, FieldRes, Field< Data_T >, WritableField< Data_T >, ResizableField< Data_T >, MACField< Data_T >, ProceduralField< Data_T >, and SparseField< Data_T >.
Definition at line 118 of file Field.h.
{ return "FieldBase"; }
static const char* FieldBase::classType | ( | ) | [inline, static] |
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 >, and SparseField< Data_T >.
Definition at line 123 of file Field.h.
{ return staticClassName(); }
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 >, 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 >, and SparseField< Data_T >.
FieldMetadata<FieldBase>& FieldBase::metadata | ( | ) | [inline] |
accessor to the m_metadata class
Definition at line 152 of file Field.h.
Referenced by copyMetadata().
{ return m_metadata; }
const FieldMetadata<FieldBase>& FieldBase::metadata | ( | ) | const [inline] |
Read only access to the m_metadata class.
Definition at line 156 of file Field.h.
{ 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 165 of file Field.h.
References metadata().
{ m_metadata = field.metadata(); }
std::string FieldBase::name |
Optional name of the field.
Definition at line 173 of file Field.h.
Referenced by SparseField< Data_T >::classType(), ProceduralField< Data_T >::classType(), MACField< Data_T >::classType(), ResizableField< Data_T >::classType(), WritableField< Data_T >::classType(), Field< Data_T >::classType(), DenseField< Data_T >::classType(), Field< Data_T >::dataTypeString(), Field3DInputFile::readProxyLayer(), and Field3DOutputFile::writeScalarLayer().
std::string FieldBase::attribute |
Optional name of the attribute the field represents.
Definition at line 175 of file Field.h.
Referenced by Field3DInputFile::readProxyLayer(), and Field3DOutputFile::writeScalarLayer().
FieldMetadata<FieldBase> FieldBase::m_metadata [private] |