SheafSystem  0.0.0.0
sheaf::data_type_map Class Reference

A collection of data converters that map data types between internal and external representations. More...

#include <data_type_map.h>

Inheritance diagram for sheaf::data_type_map:
sheaf::any sheaf::file_data_type_map sheaf::poset_data_type_map

Public Member Functions

virtual data_type_mapclone () const
 Virtual constructor; makes a new instance of the same type as this. More...
 
virtual bool invariant () const
 Class invariant. More...
 
virtual bool is_ancestor_of (const any *other) const
 Conformance test; true if other conforms to this. More...
 
virtual ~data_type_map ()
 Destructor. More...
 
hid_t file () const
 The hdf file this type map is associated with. More...
 
data_converteroperator[] (int xi) const
 The data converter for the type with index xi. More...
 
data_converterconverter (primitive_type xpt) const
 The data converter for primitive type xpt. More...
 
size_t max_internal_size () const
 The internal size of the largest fixed length type. More...
 
size_t max_external_size () const
 The external size of the largest fixed length type. More...
 
size_t max_size () const
 The maximum size, internal or external, of any fixed length type. More...
 
- Public Member Functions inherited from sheaf::any
bool is_same_type (const any *other) const
 True if other is the same type as this. More...
 
virtual ~any ()
 Destructor. More...
 
bool invariant_check () const
 True if invariant checking is enabled. More...
 
void enable_invariant_check () const
 Enable invariant checking. More...
 
void disable_invariant_check () const
 Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More...
 
int disable_invariance_check_request_depth () const
 Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More...
 

Protected Member Functions

 data_type_map ()
 Default constructor. More...
 
 data_type_map (const data_type_map &xother)
 Copy constructor. More...
 
- Protected Member Functions inherited from sheaf::any
 any ()
 default constructor More...
 

Protected Attributes

hid_t _file
 The hdf file handle. More...
 
size_t _max_internal_size
 The internal size of the largest fixed length type. More...
 
size_t _max_external_size
 The external size of the largest fixed length type. More...
 
data_converter_converters [PRIMITIVE_TYPE_END]
 Table of converters, one for each type defined in the file. More...
 

Detailed Description

A collection of data converters that map data types between internal and external representations.

Definition at line 49 of file data_type_map.h.

Constructor & Destructor Documentation

◆ ~data_type_map()

sheaf::data_type_map::~data_type_map ( )
virtual

Destructor.

Definition at line 123 of file data_type_map.cc.

References operator[]().

Referenced by is_ancestor_of().

◆ data_type_map() [1/2]

sheaf::data_type_map::data_type_map ( )
protected

Default constructor.

Definition at line 170 of file data_type_map.cc.

References _file, _max_external_size, and _max_internal_size.

Referenced by clone(), and operator[]().

◆ data_type_map() [2/2]

sheaf::data_type_map::data_type_map ( const data_type_map xother)
protected

Copy constructor.

Issue:
need reference counting here.
Postcondition

Definition at line 191 of file data_type_map.cc.

References _converters, _file, _max_external_size, _max_internal_size, and invariant().

Member Function Documentation

◆ clone()

sheaf::data_type_map * sheaf::data_type_map::clone ( ) const
virtual

Virtual constructor; makes a new instance of the same type as this.

Postcondition
  • result != 0
  • is_same_type(result)

Reimplemented from sheaf::any.

Reimplemented in sheaf::poset_data_type_map, and sheaf::file_data_type_map.

Definition at line 40 of file data_type_map.cc.

References data_type_map(), invariant(), and sheaf::any::is_same_type().

◆ converter()

data_converter* sheaf::data_type_map::converter ( primitive_type  xpt) const
inline

The data converter for primitive type xpt.

Definition at line 102 of file data_type_map.h.

◆ file()

hid_t sheaf::data_type_map::file ( ) const
inline

The hdf file this type map is associated with.

Definition at line 88 of file data_type_map.h.

◆ invariant()

bool sheaf::data_type_map::invariant ( ) const
virtual

◆ is_ancestor_of()

bool sheaf::data_type_map::is_ancestor_of ( const any other) const
virtual

Conformance test; true if other conforms to this.

Precondition
  • other != 0

Reimplemented from sheaf::any.

Reimplemented in sheaf::poset_data_type_map, and sheaf::file_data_type_map.

Definition at line 96 of file data_type_map.cc.

References ~data_type_map().

Referenced by invariant().

◆ max_external_size()

size_t sheaf::data_type_map::max_external_size ( ) const
inline

The external size of the largest fixed length type.

Definition at line 118 of file data_type_map.h.

◆ max_internal_size()

size_t sheaf::data_type_map::max_internal_size ( ) const
inline

The internal size of the largest fixed length type.

Definition at line 110 of file data_type_map.h.

◆ max_size()

size_t sheaf::data_type_map::max_size ( ) const
inline

The maximum size, internal or external, of any fixed length type.

Definition at line 126 of file data_type_map.h.

Referenced by sheaf::dof_tuple_record_set::dof_tuple_record_set().

◆ operator[]()

sheaf::data_converter * sheaf::data_type_map::operator[] ( int  xi) const

The data converter for the type with index xi.

Precondition
  • is_primitive_index(xi)
Postcondition
  • result != 0

Definition at line 144 of file data_type_map.cc.

References _converters, data_type_map(), and sheaf::is_primitive_index().

Referenced by ~data_type_map().

Member Data Documentation

◆ _converters

data_converter* sheaf::data_type_map::_converters[PRIMITIVE_TYPE_END]
protected

Table of converters, one for each type defined in the file.

Definition at line 163 of file data_type_map.h.

Referenced by data_type_map(), operator[](), and sheaf::file_data_type_map::~file_data_type_map().

◆ _file

hid_t sheaf::data_type_map::_file
protected

The hdf file handle.

Definition at line 148 of file data_type_map.h.

Referenced by data_type_map(), and sheaf::file_data_type_map::~file_data_type_map().

◆ _max_external_size

size_t sheaf::data_type_map::_max_external_size
protected

The external size of the largest fixed length type.

Definition at line 158 of file data_type_map.h.

Referenced by data_type_map().

◆ _max_internal_size

size_t sheaf::data_type_map::_max_internal_size
protected

The internal size of the largest fixed length type.

Definition at line 153 of file data_type_map.h.

Referenced by data_type_map().


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