OMToolkit 1.0 The polygonal mesh processing tool.

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Namespaces | Classes | Functions
OpenMesh::IO Namespace Reference

## Namespaces
namespace | OMFormat

## Classes
class | OMReaderExt
struct | binaryExt
struct | binaryExt< std::string >
struct | binaryExt< OpenMesh::Attributes::StatusInfo >
class | OMWriterExt
struct | binary< OMToolkit::Types::OMSerializableMatrix< T > >
struct | binary< OMToolkit::Types::OMSerializableVector< T > >
struct | Enabler

## Functions
template<typename T >
size_t | store (mds::mod::CChannel &_os, const T &_v, bool _swap=false)
template<typename T >
size_t | restore (mds::mod::CChannel &_is, T &_v, bool _swap=false)
template<>
size_t | store (mds::mod::CChannel &_os, const OMFormat::HeaderExt &_hdr, bool _swap)
template<>
size_t | restore (mds::mod::CChannel &_is, OMFormat::HeaderExt &_hdr, bool _swap)
template<>
size_t | store (mds::mod::CChannel &_os, const OMFormat::Chunk::Header &_hdr, bool _swap)
template<>
size_t | restore (mds::mod::CChannel &_is, OMFormat::Chunk::Header &_hdr, bool _swap)
template<typename T >
size_t | store (mds::mod::CChannel &_os, const T &_val, OMFormat::Chunk::Integer_Size _b, bool _swap, t_signed)
template<typename T >
size_t | store (mds::mod::CChannel &_os, const T &_val, OMFormat::Chunk::Integer_Size _b, bool _swap, t_unsigned)
template<typename T >
size_t | store (mds::mod::CChannel &_os, const T &_val, OMFormat::Chunk::Integer_Size _b, bool _swap)
template<typename T >
size_t | restore (mds::mod::CChannel &_is, T &_val, OMFormat::Chunk::Integer_Size _b, bool _swap, t_signed)
template<typename T >
size_t | restore (mds::mod::CChannel &_is, T &_val, OMFormat::Chunk::Integer_Size _b, bool _swap, t_unsigned)
template<typename T >
size_t | restore (mds::mod::CChannel &_is, T &_val, OMFormat::Chunk::Integer_Size _b, bool _swap)
template<typename VecT >
size_t | store (mds::mod::CChannel &_os, const VecT &_vec, GenProg::Int2Type< 2 >, bool _swap)
template<typename VecT >
size_t | store (mds::mod::CChannel &_os, const VecT &_vec, GenProg::Int2Type< 3 >, bool _swap)
template<typename VecT >
size_t | store (mds::mod::CChannel &_os, const VecT &_vec, GenProg::Int2Type< 4 >, bool _swap)
template<typename VecT >
size_t | store (mds::mod::CChannel &_os, const VecT &_vec, GenProg::Int2Type< 1 >, bool _swap)
template<typename VecT >
size_t | vector_store (mds::mod::CChannel &_os, const VecT &_vec, bool _swap)
template<typename VecT >
size_t | restore (mds::mod::CChannel &_is, VecT &_vec, GenProg::Int2Type< 2 >, bool _swap)
template<typename VecT >
size_t | restore (mds::mod::CChannel &_is, VecT &_vec, GenProg::Int2Type< 3 >, bool _swap)
template<typename VecT >
size_t | restore (mds::mod::CChannel &_is, VecT &_vec, GenProg::Int2Type< 4 >, bool _swap)
template<typename VecT >
size_t | restore (mds::mod::CChannel &_is, VecT &_vec, GenProg::Int2Type< 1 >, bool _swap)
template<typename VecT >
size_t | vector_restore (mds::mod::CChannel &_is, VecT &_vec, bool _swap)
template<>
size_t | store (mds::mod::CChannel &_os, const OMFormat::Chunk::PropertyName &_pn, bool _swap)
template<>
size_t | restore (mds::mod::CChannel &_is, OMFormat::Chunk::PropertyName &_pn, bool _swap)
| SIMPLE_BINARY_EXT (bool)
| SIMPLE_BINARY_EXT (float)
| SIMPLE_BINARY_EXT (double)
| SIMPLE_BINARY_EXT (long double)
| SIMPLE_BINARY_EXT (int8_t)
| SIMPLE_BINARY_EXT (int16_t)
| SIMPLE_BINARY_EXT (int32_t)
| SIMPLE_BINARY_EXT (int64_t)
| SIMPLE_BINARY_EXT (uint8_t)
| SIMPLE_BINARY_EXT (uint16_t)
| SIMPLE_BINARY_EXT (uint32_t)
| SIMPLE_BINARY_EXT (uint64_t)
| VECTORTS_BINARY_EXT (1)
| VECTORTS_BINARY_EXT (2)
| VECTORTS_BINARY_EXT (3)
| VECTORTS_BINARY_EXT (4)
| VECTORTS_BINARY_EXT (6)

## Function Documentation

template<typename T >

size_t OpenMesh::IO::restore | ( | mds::mod::CChannel & | _is,
|  | T & | _v,
|  | bool | _swap = `false`
| ) |  |
| inline

Retore value from stream Intput MDSTk channel Value to restore Swap bytes flag

Returns
  Number of restored bytes

template<>

size_t OpenMesh::IO::restore | ( | mds::mod::CChannel & | _is,
|  | OMFormat::HeaderExt & | _hdr,
|  | bool | _swap
| ) |  |
| inline

Retore OM format header from stream Intput MDSTk channel Header to restore Swap bytes flag

Returns
  Number of restored bytes

template<>

size_t OpenMesh::IO::restore | ( | mds::mod::CChannel & | _is,
|  | OMFormat::Chunk::Header & | _hdr,
|  | bool | _swap
| ) |  |
| inline

Retore OM chunk header from stream Intput MDSTk channel Header to restore Swap bytes flag

Returns
  Number of restored bytes

template<typename T >

size_t OpenMesh::IO::restore | ( | mds::mod::CChannel & | _is,
|  | T & | _val,
|  | OMFormat::Chunk::Integer_Size | _b,
|  | bool | _swap,
|  | t_signed |
| ) |  |
| inline

Helper to restore a an integer

Parameters

  _is | Input MDSTk channel
  _val | Value to restore
  _b | Integer size
  _swap | Swap byte flag
  t_signed | Signed flag

Returns
  Number of restored bytes

template<typename T >

size_t OpenMesh::IO::restore | ( | mds::mod::CChannel & | _is,
|  | T & | _val,
|  | OMFormat::Chunk::Integer_Size | _b,
|  | bool | _swap,
|  | t_unsigned |
| ) |  |
| inline

Helper to restore a an unsigned integer

Parameters

  _is | Input MDSTk channel
  _val | Value to restore
  _b | Integer size
  _swap | Swap byte flag
  t_unsigned | unsigned flag

Returns
  Number of restored bytes

template<typename T >

size_t OpenMesh::IO::restore | ( | mds::mod::CChannel & | _is,
|  | T & | _val,
|  | OMFormat::Chunk::Integer_Size | _b,
|  | bool | _swap
| ) |  |
| inline

Restore an integer with a wanted number of bits

Parameters

  _is | Input MDSTk channel
  _val | Value to restore
  _b | Integer size
  _swap | Swap byte flag
  t_unsigned | unsigned flag

template<typename VecT >

size_t OpenMesh::IO::restore | ( | mds::mod::CChannel & | _is,
|  | VecT & | _vec,
|  | GenProg::Int2Type< 2 > | ,
|  | bool | _swap
| ) |  |
| inline

Helper to restore a 2D vector

Parameters

  _is | Input MDSTk channel
  _vec | Vector to restore
  _swap | Swap byte flag

Returns
  Number of restored bytes

template<typename VecT >

size_t OpenMesh::IO::restore | ( | mds::mod::CChannel & | _is,
|  | VecT & | _vec,
|  | GenProg::Int2Type< 3 > | ,
|  | bool | _swap
| ) |  |
| inline

Helper to restore a 3D vector

Parameters

  _is | Input MDSTk channel
  _vec | Vector to restore
  _swap | Swap byte flag

Returns
  Number of restored bytes

template<typename VecT >

size_t OpenMesh::IO::restore | ( | mds::mod::CChannel & | _is,
|  | VecT & | _vec,
|  | GenProg::Int2Type< 4 > | ,
|  | bool | _swap
| ) |  |
| inline

Helper to restore a 4D vector

Parameters

  _is | Input MDSTk channel
  _vec | Vector to restore
  _swap | Swap byte flag

Returns
  Number of restored bytes

template<typename VecT >

size_t OpenMesh::IO::restore | ( | mds::mod::CChannel & | _is,
|  | VecT & | _vec,
|  | GenProg::Int2Type< 1 > | ,
|  | bool | _swap
| ) |  |
| inline

Helper to restore a 1D vector

Parameters

  _is | Input MDSTk channel
  _vec | Vector to restore
  _swap | Swap byte flag

Returns
  Number of restored bytes

template<>

size_t OpenMesh::IO::restore | ( | mds::mod::CChannel & | _is,
|  | OMFormat::Chunk::PropertyName & | _pn,
|  | bool | _swap
| ) |  |
| inline

Retore a property name

Parameters

  _is | Input MDSTk channel
  _pn | Property name to restore
  _swap | Swap byte flag

Returns
  Number of restored bytes

OpenMesh::IO::SIMPLE_BINARY_EXT | ( | bool |  | ) |

BinaryExt specialization for bool datatype

OpenMesh::IO::SIMPLE_BINARY_EXT | ( | float |  | ) |

BinaryExt specialization for float datatype

OpenMesh::IO::SIMPLE_BINARY_EXT | ( | double |  | ) |

BinaryExt specialization for double datatype

OpenMesh::IO::SIMPLE_BINARY_EXT | ( | long | double | ) |

BinaryExt specialization for long double datatype

OpenMesh::IO::SIMPLE_BINARY_EXT | ( | int8_t |  | ) |

BinaryExt specialization for int8_t datatype

OpenMesh::IO::SIMPLE_BINARY_EXT | ( | int16_t |  | ) |

BinaryExt specialization for int16_t datatype

OpenMesh::IO::SIMPLE_BINARY_EXT | ( | int32_t |  | ) |

BinaryExt specialization for int32_t datatype

OpenMesh::IO::SIMPLE_BINARY_EXT | ( | int64_t |  | ) |

BinaryExt specialization for int64_t datatype

OpenMesh::IO::SIMPLE_BINARY_EXT | ( | uint8_t |  | ) |

BinaryExt specialization for uint8_t datatype

OpenMesh::IO::SIMPLE_BINARY_EXT | ( | uint16_t |  | ) |

BinaryExt specialization for uint16_t datatype

OpenMesh::IO::SIMPLE_BINARY_EXT | ( | uint32_t |  | ) |

BinaryExt specialization for uint32_t datatype

OpenMesh::IO::SIMPLE_BINARY_EXT | ( | uint64_t |  | ) |

BinaryExt specialization for uint64_t datatype

template<typename T >

size_t OpenMesh::IO::store | ( | mds::mod::CChannel & | _os,
|  | const T & | _v,
|  | bool | _swap = `false`
| ) |  |
| inline

Store value into stream Output MDSTk channel Value to store Swap bytes flag

Returns
  Number of stored bytes

template<>

size_t OpenMesh::IO::store | ( | mds::mod::CChannel & | _os,
|  | const OMFormat::HeaderExt & | _hdr,
|  | bool | _swap
| ) |  |
| inline

Store OM format header into stream Output MDSTk channel Header to store Swap bytes flag

Returns
  Number of stored bytes

template<>

size_t OpenMesh::IO::store | ( | mds::mod::CChannel & | _os,
|  | const OMFormat::Chunk::Header & | _hdr,
|  | bool | _swap
| ) |  |
| inline

Store OM chunk header into stream Output MDSTk channel Header to store Swap bytes flag

Returns
  Number of stored bytes

template<typename T >

size_t OpenMesh::IO::store | ( | mds::mod::CChannel & | _os,
|  | const T & | _val,
|  | OMFormat::Chunk::Integer_Size | _b,
|  | bool | _swap,
|  | t_signed |
| ) |  |

Helper to store a an integer

Parameters

  _os | Output MDSTk channel
  _val | Value to store
  _b | Integer size
  _swap | Swap byte flag
  t_signed | Signed flag

Returns
  Number of saved bytes

template<typename T >

size_t OpenMesh::IO::store | ( | mds::mod::CChannel & | _os,
|  | const T & | _val,
|  | OMFormat::Chunk::Integer_Size | _b,
|  | bool | _swap,
|  | t_unsigned |
| ) |  |

Helper to store a an unsigned integer

Parameters

  _os | Output MDSTk channel
  _val | Value to store
  _b | Integer size
  _swap | Swap byte flag
  t_unsigned | Unsigned flag

Returns
  Number of saved bytes

template<typename T >

size_t OpenMesh::IO::store | ( | mds::mod::CChannel & | _os,
|  | const T & | _val,
|  | OMFormat::Chunk::Integer_Size | _b,
|  | bool | _swap
| ) |  |
| inline

Store an integer with a wanted number of bits

Parameters

  _os | Output MDSTk channel
  _val | Value to store
  _b | Integer size
  _swap | Swap byte flag

Returns
  Number of saved bytes

template<typename VecT >

size_t OpenMesh::IO::store | ( | mds::mod::CChannel & | _os,
|  | const VecT & | _vec,
|  | GenProg::Int2Type< 2 > | ,
|  | bool | _swap
| ) |  |
| inline

Helper to store a 2D vector

Parameters

  _os | Output MDSTk channel
  _vec | Vector to store
  _swap | Swap byte flag

Returns
  Number of saved bytes

template<typename VecT >

size_t OpenMesh::IO::store | ( | mds::mod::CChannel & | _os,
|  | const VecT & | _vec,
|  | GenProg::Int2Type< 3 > | ,
|  | bool | _swap
| ) |  |
| inline

Helper to store a 3D vector

Parameters

  _os | Output MDSTk channel
  _vec | Vector to store
  _swap | Swap byte flag

Returns
  Number of saved bytes

template<typename VecT >

size_t OpenMesh::IO::store | ( | mds::mod::CChannel & | _os,
|  | const VecT & | _vec,
|  | GenProg::Int2Type< 4 > | ,
|  | bool | _swap
| ) |  |
| inline

Helper to store a 4D vector

Parameters

  _os | Output MDSTk channel
  _vec | Vector to store
  _swap | Swap byte flag

Returns
  Number of saved bytes

template<typename VecT >

size_t OpenMesh::IO::store | ( | mds::mod::CChannel & | _os,
|  | const VecT & | _vec,
|  | GenProg::Int2Type< 1 > | ,
|  | bool | _swap
| ) |  |
| inline

Helper to store a 1D vector

Parameters

  _os | Output MDSTk channel
  _vec | Vector to store
  _swap | Swap byte flag

Returns
  Number of saved bytes

template<>

size_t OpenMesh::IO::store | ( | mds::mod::CChannel & | _os,
|  | const OMFormat::Chunk::PropertyName & | _pn,
|  | bool | _swap
| ) |  |
| inline

Store a property name

Parameters

  _os | Output MDSTk channel
  _pn | Property name to store
  _swap | Swap byte flag

Returns
  Number of saved bytes

template<typename VecT >

size_t OpenMesh::IO::vector_restore | ( | mds::mod::CChannel & | _is,
|  | VecT & | _vec,
|  | bool | _swap
| ) |  |
| inline

Restoring a vector type

Parameters

  _is | Input MDSTk channel
  _vec | Vector to restore
  _swap | Swap byte flag

Returns
  Number of restored bytes

template<typename VecT >

size_t OpenMesh::IO::vector_store | ( | mds::mod::CChannel & | _os,
|  | const VecT & | _vec,
|  | bool | _swap
| ) |  |
| inline

Storing a vector type

Parameters

  _os | Output MDSTk channel
  _vec | Vector to store
  _swap | Swap byte flag

Returns
  Number of saved bytes

OpenMesh::IO::VECTORTS_BINARY_EXT | ( | 1 |  | ) |

BinaryExt specialization for 1 dimensional vectors

OpenMesh::IO::VECTORTS_BINARY_EXT | ( | 2 |  | ) |

BinaryExt specialization for 2 dimensional vectors

OpenMesh::IO::VECTORTS_BINARY_EXT | ( | 3 |  | ) |

BinaryExt specialization for 3 dimensional vectors

OpenMesh::IO::VECTORTS_BINARY_EXT | ( | 4 |  | ) |

BinaryExt specialization for 4 dimensional vectors

OpenMesh::IO::VECTORTS_BINARY_EXT | ( | 6 |  | ) |

BinaryExt specialization for 6 dimensional vectors