Field3D
NullFieldMappingIO Class Reference

#include <FieldMappingIO.h>

Inheritance diagram for NullFieldMappingIO:
FieldMappingIO FieldMappingIO RefBase RefBase RefBase RefBase

List of all members.

Public Types

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

Public Member Functions

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

Static Public Member Functions

static FieldMappingIO::Ptr create ()
static FieldMappingIO::Ptr create ()

Detailed Description

Handles IO for a NullFieldMapping object

Definition at line 111 of file FieldMappingIO.h.


Member Typedef Documentation

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

Reimplemented from FieldMappingIO.

Definition at line 118 of file FieldMappingIO.h.

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

Reimplemented from FieldMappingIO.

Definition at line 118 of file FieldMappingIO.h.


Constructor & Destructor Documentation

NullFieldMappingIO::NullFieldMappingIO ( ) [inline]

Ctor.

Definition at line 123 of file FieldMappingIO.h.

   : FieldMappingIO()
  { }
NullFieldMappingIO::NullFieldMappingIO ( ) [inline]

Ctor.

Definition at line 123 of file FieldMappingIO.h.

   : FieldMappingIO()
  { }

Member Function Documentation

static FieldMappingIO::Ptr NullFieldMappingIO::create ( ) [inline, static]

Definition at line 127 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 76 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 89 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 102 of file FieldMappingIO.cpp.

References FIELD3D_NAMESPACE_OPEN::k_nullMappingName().

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

Definition at line 127 of file FieldMappingIO.h.

  { return Ptr(new NullFieldMappingIO); }
virtual 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.

virtual 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.

virtual std::string NullFieldMappingIO::className ( ) const [virtual]

Returns the class name.

Implements FieldMappingIO.


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