FieldBase Class Referenceabstract
Fields

`#include <Field.h>`

Inheritance diagram for FieldBase:

## Public Types

typedef FieldBase | class_type
typedef boost::intrusive_ptr< FieldBase > | Ptr
Public Types inherited from RefBase
typedef boost::intrusive_ptr< RefBase > | Ptr
typedef boost::weak_ptr< RefBase > | WeakPtr

## 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 std::string | classType () const =0
| Returns the full class type string.
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 & | metadata ()
| accessor to the m_metadata class
const FieldMetadata & | metadata () const
| Read only access to the m_metadata class.
void | copyMetadata (const FieldBase &field)
| Copies the metadata from a second field.
Public Member Functions inherited from RefBase
void | ref () const
| Used by boost::intrusive_pointer.
size_t | refcnt ()
| Used by boost::intrusive_pointer.
void | unref () const
| Used by boost::intrusive_pointer.
WeakPtr | weakPtr () const
| RefBase ()
| RefBase (const RefBase &)
| Copy constructor.
RefBase & | operator= (const RefBase &)
| Assignment operator.
virtual | ~RefBase ()
| Destructor.
virtual bool | checkRTTI (const char *typenameStr)=0
| This function is only implemented by concrete classes and triggers the actual RTTI check through matchRTTI();.
bool | matchRTTI (const char *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.
Public Member Functions inherited from MetadataCallback
virtual void | metadataHasChanged (const std::string &)
| Alerts the callback holder that the metadata has changed.

## Static Public Member Functions

static const char * | staticClassName ()
static const char * | staticClassType ()
static const char * | staticClassType ()

## Public Attributes

std::string | attribute
| Optional name of the attribute the field represents.
std::string | name
| Optional name of the field.

## Private Attributes

FieldMetadata | m_metadata
| metadata

## Detailed Description

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

Definition at line 91 of file Field.h.

## Member Typedef Documentation

## Ptr

typedef boost::intrusive_ptr<FieldBase> FieldBase::Ptr

Definition at line 97 of file Field.h.

## class_type

typedef FieldBase FieldBase::class_type

Definition at line 98 of file Field.h.

## Constructor & Destructor Documentation

## FieldBase() [1/2]

FIELD3D_NAMESPACE_OPEN FieldBase::FieldBase | ( |  | ) |

Constructor.

Definition at line 54 of file Field.cpp.

: RefBase(),
m_metadata(this)
{
// Empty
}
FieldBase::m_metadata
FieldMetadata m_metadata
metadata
Definition Field.h:180
RefBase::RefBase
RefBase()
Definition RefCount.h:120

References m_metadata, and RefBase::RefBase().

Referenced by copyMetadata(), FieldBase(), and FieldRes::FieldRes().

## FieldBase() [2/2]

FieldBase::FieldBase | ( | const FieldBase & | other | ) |

Copy Constructor.

Definition at line 61 of file Field.cpp.

: RefBase(),
name(other.name),
attribute(other.attribute),
m_metadata(this)
{
m_metadata = other.m_metadata;
}
FieldBase::attribute
std::string attribute
Optional name of the attribute the field represents.
Definition Field.h:173
FieldBase::name
std::string name
Optional name of the field.
Definition Field.h:171

References attribute, FieldBase(), m_metadata, name, and RefBase::RefBase().

## ~FieldBase()

FieldBase::~FieldBase | ( |  | ) |

virtual

Destructor.

Definition at line 73 of file Field.cpp.

{
// Empty
}

## Member Function Documentation

## staticClassName()

const char * FieldBase::staticClassName | ( |  | ) |

inline static

Definition at line 118 of file Field.h.

{
return "FieldBase";
}

Referenced by staticClassType().

## staticClassType()

const char * FieldBase::staticClassType | ( |  | ) |

inline static

Definition at line 123 of file Field.h.

{
return staticClassName();
}
FieldBase::staticClassName
static const char * staticClassName()
Definition Field.h:118

References staticClassName().

## className()

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.

Note
  This is different from classType for any templated class, as staticClassType() will include the template parameter(s) but className remains just the name of the template itself.

## classType()

virtual std::string FieldBase::classType | ( |  | ) | const

pure virtual

Returns the full class type string.

## clone()

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 >, DenseField< double >, DenseField< float >, DenseField< half >, DenseField< V3d >, DenseField< V3f >, DenseField< V3h >, EmptyField< Data_T >, EmptyField< float >, MACField< Data_T >, MACField< V3d >, MACField< V3f >, MACField< V3h >, MIPDenseField< Data_T >, MIPField< Field_T >, MIPField< DenseField< Data_T > >, MIPField< SparseField< Data_T > >, MIPSparseField< Data_T >, Ptr< float >, real_t< Data_T >, SparseField< Data_T >, SparseField< double >, SparseField< float >, SparseField< half >, SparseField< V3d >, SparseField< V3f >, and SparseField< V3h >.

Referenced by FieldRes::FieldRes().

## metadata() [1/2]

FieldMetadata & FieldBase::metadata | ( |  | ) |

inline

accessor to the m_metadata class

Definition at line 155 of file Field.h.

{ return m_metadata; }

References m_metadata.

Referenced by detail::adjustedMIPFieldMapping(), copyMetadata(), MIPField< Field_T >::mappingChanged(), Field3DInputFile::readProxyLayer(), Field3DInputFileHDF5::readProxyLayer(), MIPBase< Data_T >::setMIPOffset(), ProceduralField< half >::typedFloatMetadata(), ProceduralField< half >::typedFloatMetadata(), ProceduralField< half >::typedFloatMetadata(), ProceduralField< half >::typedFloatMetadata(), ProceduralField< half >::typedFloatMetadata(), ProceduralField< half >::typedFloatMetadata(), ProceduralField< half >::typedIntMetadata(), ProceduralField< half >::typedIntMetadata(), ProceduralField< half >::typedIntMetadata(), ProceduralField< half >::typedIntMetadata(), ProceduralField< half >::typedIntMetadata(), and ProceduralField< half >::typedIntMetadata().

## metadata() [2/2]

const FieldMetadata & FieldBase::metadata | ( |  | ) | const

inline

Read only access to the m_metadata class.

Definition at line 159 of file Field.h.

{ return m_metadata; }

References m_metadata.

## copyMetadata()

void FieldBase::copyMetadata | ( | const FieldBase & | field | ) |

inline

Copies the metadata from a second field.

Definition at line 163 of file Field.h.

{ m_metadata = field.metadata(); }
FieldBase::metadata
FieldMetadata & metadata()
accessor to the m_metadata class
Definition Field.h:155

References FieldBase(), m_metadata, and metadata().

## Member Data Documentation

## name

std::string FieldBase::name

Optional name of the field.

Definition at line 171 of file Field.h.

Referenced by FieldBase(), match(), match(), Field3DInputFile::readLayer(), Field3DInputFileHDF5::readLayer(), Field3DInputFile::readProxyLayer(), Field3DInputFileHDF5::readProxyLayer(), MIPField< Field_T >::syncLevelInfo(), ProceduralField< half >::typedFloatMetadata(), ProceduralField< half >::typedFloatMetadata(), ProceduralField< half >::typedFloatMetadata(), ProceduralField< half >::typedFloatMetadata(), ProceduralField< half >::typedFloatMetadata(), ProceduralField< half >::typedFloatMetadata(), ProceduralField< half >::typedIntMetadata(), ProceduralField< half >::typedIntMetadata(), ProceduralField< half >::typedIntMetadata(), ProceduralField< half >::typedIntMetadata(), ProceduralField< half >::typedIntMetadata(), ProceduralField< half >::typedIntMetadata(), Field3DOutputFile::writeLayer(), Field3DOutputFileHDF5::writeScalarLayer(), and Field3DOutputFileHDF5::writeVectorLayer().

## attribute

std::string FieldBase::attribute

Optional name of the attribute the field represents.

Definition at line 173 of file Field.h.

Referenced by FieldBase(), match(), match(), Field3DInputFile::readLayer(), Field3DInputFileHDF5::readLayer(), Field3DInputFile::readProxyLayer(), Field3DInputFileHDF5::readProxyLayer(), MIPField< Field_T >::syncLevelInfo(), Field3DOutputFile::writeLayer(), Field3DOutputFileHDF5::writeScalarLayer(), and Field3DOutputFileHDF5::writeVectorLayer().

## m_metadata

FieldMetadata FieldBase::m_metadata

private

metadata

Definition at line 180 of file Field.h.

Referenced by copyMetadata(), FieldBase(), FieldBase(), metadata(), and metadata().

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

- export/Field.h
- src/Field.cpp