Field3D
NullFieldMappingIO Class Reference

#include <FieldMappingIO.h>

Inheritance diagram for NullFieldMappingIO:
FieldMappingIO RefBase

List of all members.

Public Types

typedef NullFieldMappingIO class_type
typedef boost::intrusive_ptr
< NullFieldMappingIO
Ptr

Public Member Functions

virtual std::string className () const
 Returns the class name.
 NullFieldMappingIO ()
 Ctor.
virtual FieldMapping::Ptr read (hid_t mappingGroup)
 Reads the field mapping and tries to create a NullFieldMapping object from it.
virtual bool write (hid_t mappingGroup, FieldMapping::Ptr mapping)
 Writes the given field mapping to disk.

Static Public Member Functions

static const char * classType ()
 RTTI replacement.
static FieldMappingIO::Ptr create ()

Public Attributes

 DEFINE_FIELD_RTTI_CONCRETE_CLASS

Private Types

typedef FieldMappingIO base
 Convenience typedef for referring to base class.

Detailed Description

Handles IO for a NullFieldMapping object

Definition at line 128 of file FieldMappingIO.h.


Member Typedef Documentation

typedef boost::intrusive_ptr<NullFieldMappingIO> NullFieldMappingIO::Ptr

Reimplemented from FieldMappingIO.

Definition at line 135 of file FieldMappingIO.h.

Reimplemented from FieldMappingIO.

Definition at line 139 of file FieldMappingIO.h.

Convenience typedef for referring to base class.

Reimplemented from FieldMappingIO.

Definition at line 176 of file FieldMappingIO.h.


Constructor & Destructor Documentation

NullFieldMappingIO::NullFieldMappingIO ( ) [inline]

Ctor.

Definition at line 150 of file FieldMappingIO.h.

   : FieldMappingIO()
  { }

Member Function Documentation

static const char* NullFieldMappingIO::classType ( ) [inline, static]

RTTI replacement.

Reimplemented from FieldMappingIO.

Definition at line 142 of file FieldMappingIO.h.

  {
    return "NullFieldMappingIO";
  }
static FieldMappingIO::Ptr NullFieldMappingIO::create ( ) [inline, static]

Definition at line 154 of file FieldMappingIO.h.

Referenced by initIO().

  { return Ptr(new NullFieldMappingIO); }
FieldMapping::Ptr NullFieldMappingIO::read ( hid_t  mappingGroup) [virtual]

Reads the field mapping and tries to create a NullFieldMapping object from it.

Returns:
Null if no object was read

Implements FieldMappingIO.

Definition at line 87 of file FieldMappingIO.cpp.

References Msg::print(), Hdf5Util::readAttribute(), and Msg::SevWarning.

{
  string nfmData;
  if (!readAttribute(mappingGroup, k_nullMappingDataName, nfmData)) {
    Msg::print(Msg::SevWarning, "Couldn't read attribute " + k_nullMappingDataName);
    return NullFieldMapping::Ptr();
  }
  return NullFieldMapping::Ptr(new NullFieldMapping);
}
bool NullFieldMappingIO::write ( hid_t  mappingGroup,
FieldMapping::Ptr  mapping 
) [virtual]

Writes the given field mapping to disk.

Returns:
true if successful, otherwise false

Implements FieldMappingIO.

Definition at line 100 of file FieldMappingIO.cpp.

References Msg::print(), Msg::SevWarning, and Hdf5Util::writeAttribute().

{
  string nfmAttrData("NullFieldMapping has no data");
  if (!writeAttribute(mappingGroup, k_nullMappingDataName, nfmAttrData)) {
    Msg::print(Msg::SevWarning, "Couldn't add attribute " + k_nullMappingDataName);
    return false;
  }
  return true;
}
std::string NullFieldMappingIO::className ( ) const [virtual]

Returns the class name.

Implements FieldMappingIO.

Definition at line 112 of file FieldMappingIO.cpp.

References FIELD3D_NAMESPACE_OPEN::k_nullMappingName().

{ 
  return k_nullMappingName; 
}

Member Data Documentation


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