echelon  0.8.0
Public Types | Public Member Functions | Static Public Member Functions | Related Functions | List of all members
echelon::type Class Reference

A handle to an HDF5 type. More...

#include <type.hpp>

Public Types

using native_handle_type = hdf5::type
 Type of the underlying HDF5 low-level handle.
 

Public Member Functions

 type ()=default
 Initializes the handle with its null state.
 
type clone () const
 Clones the type. More...
 
const native_handle_typenative_handle () const
 The underlying HDF5 low-level handle.
 
 operator bool () const
 Tests the validity of the handle.
 

Static Public Member Functions

static type char_ ()
 Returns a handle to the primitive type 'char'.
 
static type short_ ()
 Returns a handle to the primitive type 'short'.
 
static type int_ ()
 Returns a handle to the primitive type 'int'.
 
static type long_ ()
 Returns a handle to the primitive type 'long'.
 
static type long_long ()
 Returns a handle to the primitive type 'long long'.
 
static type uchar ()
 Returns a handle to the primitive type 'unsigned char'.
 
static type ushort ()
 Returns a handle to the primitive type 'unsigned short'.
 
static type uint ()
 Returns a handle to the primitive type 'unsigned int'.
 
static type ulong ()
 Returns a handle to the primitive type 'unsigned long'.
 
static type ulong_long ()
 Returns a handle to the primitive type 'unsigned long long'.
 
static type float_ ()
 Returns a handle to the primitive type 'float'.
 
static type double_ ()
 Returns a handle to the primitive type 'double'.
 
static type string ()
 Returns a handle to the primitive type 'string'.
 
static type object_reference ()
 Returns a handle to the primitive type 'object reference'.
 
static type compound_type (const type_layout &layout)
 Creates a new compound type using a given layout. More...
 

Related Functions

(Note that these are not member functions.)

bool operator== (const type &lhs, const type &rhs)
 Tests two types for equality. More...
 
bool operator!= (const type &lhs, const type &rhs)
 Tests two types for inequality. More...
 
bool operator== (const type &lhs, const type &rhs)
 Tests two types for equality. More...
 
bool operator!= (const type &lhs, const type &rhs)
 Tests two types for inequality. More...
 

Detailed Description

A handle to an HDF5 type.

Member Function Documentation

type echelon::type::clone ( ) const

Clones the type.

Postcondition
t == t.clone()
Returns
a handle to the new type
type echelon::type::compound_type ( const type_layout layout)
static

Creates a new compound type using a given layout.

Parameters
layoutthe layout, which describes the type's structure
Returns
a handle to the new compound type

Friends And Related Function Documentation

bool operator!= ( const type lhs,
const type rhs 
)
related

Tests two types for inequality.

The same as !(lhs == rhs).

For a detailed description of type equality within echelon see operator==.

Parameters
lhsleft-hand side of the comparison
rhsright-hand side of the comparison
Returns
true, if both types are not equal, and false otherwise
bool operator!= ( const type lhs,
const type rhs 
)
related

Tests two types for inequality.

The same as !(lhs == rhs).

For a detailed description of type equality within echelon see operator==.

Parameters
lhsleft-hand side of the comparison
rhsright-hand side of the comparison
Returns
true, if both types are not equal, and false otherwise
bool operator== ( const type lhs,
const type rhs 
)
related

Tests two types for equality.

Type equality within echelon is defined by the following rules:

  • All primitive types are not equal.
  • Types with a different type class are not equal.
  • Two compound types are equal, if and only if:
    • They have the same number of members.
    • Each member of the first type is equal to the corresponding member of the second type.
    • The name of each member of the first type is equal to the name of the corresponding member of the second type.
Parameters
lhsleft-hand side of the comparison
rhsright-hand side of the comparison
Returns
true, if both types are equal, and false otherwise
bool operator== ( const type lhs,
const type rhs 
)
related

Tests two types for equality.

Type equality within echelon is defined by the following rules:

  • All primitive types are not equal.
  • Types with a different type class are not equal.
  • Two compound types are equal, if and only if:
    • They have the same number of members.
    • Each member of the first type is equal to the corresponding member of the second type.
    • The name of each member of the first type is equal to the name of the corresponding member of the second type.
Parameters
lhsleft-hand side of the comparison
rhsright-hand side of the comparison
Returns
true, if both types are equal, and false otherwise

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