SheafSystem  0.0.0.0
sheaf::primitive_attributes Class Reference

Abstract object wrapper for an instance of a primitive type. More...

#include <primitive_attributes.h>

Public Member Functions

 primitive_attributes ()
 Default constructor. More...
 
 primitive_attributes (const primitive_attributes &xother)
 Copy constructor. More...
 
 primitive_attributes (primitive_type xid)
 Creates a new primitive value of the type associated with xid and default value. More...
 
 primitive_attributes (const void *x)
 Conversion from pointer; creates a new primitive value of type VOID_STAR with value x. More...
 
 primitive_attributes (const char *x)
 Conversion from C string; creates a new primitive value of type C_STRING with value x. More...
 
template<typename T >
 primitive_attributes (const T &x)
 Conversion from type T; creates a new primitive value of type T with value x. More...
 
primitive_attributesoperator= (const primitive_attributes &)
 Copy assignment operator. More...
 
 ~primitive_attributes ()
 Destructor; not virtual, this can not be a base class. More...
 
primitive_type id () const
 The id for the primitive type associated with this. More...
 
size_type size () const
 The size of the primitive type associated with this. More...
 
size_type alignment () const
 The alignment for the primitive type associated with this. More...
 
const std::string & name () const
 The name of the primitive type associated with this. More...
 
const std::string & aliases () const
 Other names for the primitive type associated with this. More...
 
const std::string & hdf_type_name () const
 The name in the hdf file of the primitive type associated with this. More...
 
int hdf_type () const
 The hdf type of the primitive type associated with this. More...
 
primitive_buffer_type default_value () const
 The default value for the primitive type associated with this. More...
 
 operator primitive_descriptor () const
 Conversion to primitive_descriptor. More...
 
template<>
 primitive_attributes (const std::string &x)
 
template<>
 primitive_attributes (const scoped_index &x)
 
template<>
 primitive_attributes (const namespace_relative_member_index &x)
 
template<>
 primitive_attributes (const namespace_relative_subposet_index &x)
 

Static Public Member Functions

static const primitive_attributesprototype (pod_index_type xid)
 The prototype for the primitive value of the type associated with xid. More...
 
static primitive_type id (const std::string &xname)
 Type id of the primitive type with name or alias xname. More...
 
static primitive_type id (pod_index_type xid)
 Converts pod_index_type xid to primitive_type. More...
 
static size_type size (pod_index_type xid)
 Size of the primitive type with id xid. More...
 
static size_type alignment (pod_index_type xid)
 Alignment of the primitive type with id xid. More...
 
static const std::string & name (pod_index_type xid)
 The name of primitive type with id xid. More...
 
static const std::string & aliases (pod_index_type xid)
 Other names for the primitive type with id xid. More...
 
static const std::string & hdf_type_name (pod_index_type xid)
 The name in the hdf file of primitive type with id xid. More...
 
static int hdf_type (pod_index_type xid)
 The hdf type of primitive type with id xid. More...
 
static primitive_buffer_type default_value (pod_index_type xid)
 The default value for the primitive type associated with this. More...
 
static primitive_descriptor descriptor (pod_index_type xid)
 Primitive descriptor for the primitive type with id xid. More...
 

Detailed Description

Abstract object wrapper for an instance of a primitive type.

Definition at line 40 of file primitive_attributes.h.

Constructor & Destructor Documentation

◆ primitive_attributes() [1/10]

◆ primitive_attributes() [2/10]

sheaf::primitive_attributes::primitive_attributes ( const primitive_attributes xother)

Copy constructor.

Definition at line 166 of file primitive_attributes.cc.

References primitive_attributes().

◆ primitive_attributes() [3/10]

sheaf::primitive_attributes::primitive_attributes ( primitive_type  xid)

Creates a new primitive value of the type associated with xid and default value.

Precondition
  • is_primitive_index(xid)
Postcondition

Definition at line 173 of file primitive_attributes.cc.

References sheaf::is_primitive_index(), and primitive_attributes().

◆ primitive_attributes() [4/10]

sheaf::primitive_attributes::primitive_attributes ( const void *  x)

◆ primitive_attributes() [5/10]

sheaf::primitive_attributes::primitive_attributes ( const char *  x)

◆ primitive_attributes() [6/10]

template<typename T >
sheaf::primitive_attributes::primitive_attributes ( const T &  x)

◆ ~primitive_attributes()

sheaf::primitive_attributes::~primitive_attributes ( )

Destructor; not virtual, this can not be a base class.

Definition at line 419 of file primitive_attributes.cc.

Referenced by operator=().

◆ primitive_attributes() [7/10]

template<>
sheaf::primitive_attributes::primitive_attributes ( const std::string &  x)
Postcondition

Definition at line 275 of file primitive_attributes.cc.

References primitive_attributes().

◆ primitive_attributes() [8/10]

template<>
sheaf::primitive_attributes::primitive_attributes ( const scoped_index x)
Postcondition

Definition at line 295 of file primitive_attributes.cc.

References primitive_attributes().

◆ primitive_attributes() [9/10]

template<>
sheaf::primitive_attributes::primitive_attributes ( const namespace_relative_member_index x)

◆ primitive_attributes() [10/10]

template<>
sheaf::primitive_attributes::primitive_attributes ( const namespace_relative_subposet_index x)

Member Function Documentation

◆ aliases() [1/2]

static const std::string& sheaf::primitive_attributes::aliases ( pod_index_type  xid)
inlinestatic

Other names for the primitive type with id xid.

Definition at line 90 of file primitive_attributes.h.

References aliases().

Referenced by aliases().

◆ aliases() [2/2]

const std::string& sheaf::primitive_attributes::aliases ( ) const
inline

Other names for the primitive type associated with this.

Definition at line 216 of file primitive_attributes.h.

◆ alignment() [1/2]

static size_type sheaf::primitive_attributes::alignment ( pod_index_type  xid)
inlinestatic

Alignment of the primitive type with id xid.

Definition at line 74 of file primitive_attributes.h.

References alignment().

Referenced by alignment().

◆ alignment() [2/2]

size_type sheaf::primitive_attributes::alignment ( ) const
inline

The alignment for the primitive type associated with this.

Definition at line 200 of file primitive_attributes.h.

◆ default_value() [1/2]

static primitive_buffer_type sheaf::primitive_attributes::default_value ( pod_index_type  xid)
inlinestatic

The default value for the primitive type associated with this.

Definition at line 114 of file primitive_attributes.h.

References default_value().

Referenced by default_value().

◆ default_value() [2/2]

primitive_buffer_type sheaf::primitive_attributes::default_value ( ) const
inline

The default value for the primitive type associated with this.

Definition at line 240 of file primitive_attributes.h.

◆ descriptor()

static primitive_descriptor sheaf::primitive_attributes::descriptor ( pod_index_type  xid)
inlinestatic

Primitive descriptor for the primitive type with id xid.

Definition at line 122 of file primitive_attributes.h.

Referenced by sheaf::data_converter::data_converter(), and sheaf::primitives_poset_dof_map::primitives_poset_dof_map().

◆ hdf_type() [1/2]

static int sheaf::primitive_attributes::hdf_type ( pod_index_type  xid)
inlinestatic

The hdf type of primitive type with id xid.

Definition at line 106 of file primitive_attributes.h.

References hdf_type().

Referenced by hdf_type().

◆ hdf_type() [2/2]

int sheaf::primitive_attributes::hdf_type ( ) const
inline

The hdf type of the primitive type associated with this.

Definition at line 232 of file primitive_attributes.h.

Referenced by sheaf::file_data_type_map::~file_data_type_map().

◆ hdf_type_name() [1/2]

static const std::string& sheaf::primitive_attributes::hdf_type_name ( pod_index_type  xid)
inlinestatic

The name in the hdf file of primitive type with id xid.

Definition at line 98 of file primitive_attributes.h.

References hdf_type_name().

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

◆ hdf_type_name() [2/2]

const std::string& sheaf::primitive_attributes::hdf_type_name ( ) const
inline

The name in the hdf file of the primitive type associated with this.

Definition at line 224 of file primitive_attributes.h.

Referenced by sheaf::file_data_type_map::~file_data_type_map().

◆ id() [1/3]

sheaf::primitive_type sheaf::primitive_attributes::id ( const std::string &  xname)
static

Type id of the primitive type with name or alias xname.

Precondition
  • !xtype_name.empty()

Definition at line 120 of file primitive_attributes.cc.

References primitive_attributes().

Referenced by id(), and prototype().

◆ id() [2/3]

static primitive_type sheaf::primitive_attributes::id ( pod_index_type  xid)
inlinestatic

Converts pod_index_type xid to primitive_type.

Definition at line 58 of file primitive_attributes.h.

References id().

◆ id() [3/3]

◆ name() [1/2]

static const std::string& sheaf::primitive_attributes::name ( pod_index_type  xid)
inlinestatic

The name of primitive type with id xid.

Definition at line 82 of file primitive_attributes.h.

References name().

Referenced by name().

◆ name() [2/2]

const std::string& sheaf::primitive_attributes::name ( ) const
inline

The name of the primitive type associated with this.

Definition at line 208 of file primitive_attributes.h.

Referenced by sheaf::operator<<(), and sheaf::sheaf_constants::primitive_type_to_name().

◆ operator primitive_descriptor()

◆ operator=()

sheaf::primitive_attributes & sheaf::primitive_attributes::operator= ( const primitive_attributes x)

Copy assignment operator.

Definition at line 391 of file primitive_attributes.cc.

References ~primitive_attributes().

Referenced by primitive_attributes().

◆ prototype()

const sheaf::primitive_attributes & sheaf::primitive_attributes::prototype ( pod_index_type  xid)
static

The prototype for the primitive value of the type associated with xid.

Postcondition
  • static_cast<pod_index_type>(result.id()) == (is_primitive_index(xid) ? xid : static_cast<pod_index_type>(NOT_A_PRIMITIVE_TYPE))

Definition at line 94 of file primitive_attributes.cc.

References id(), and sheaf::is_primitive_index().

Referenced by sheaf::file_data_type_map::~file_data_type_map().

◆ size() [1/2]

static size_type sheaf::primitive_attributes::size ( pod_index_type  xid)
inlinestatic

Size of the primitive type with id xid.

Definition at line 66 of file primitive_attributes.h.

References size().

Referenced by size().

◆ size() [2/2]

size_type sheaf::primitive_attributes::size ( ) const
inline

The size of the primitive type associated with this.

Definition at line 192 of file primitive_attributes.h.


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