Developer Documentation

Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
OpenMesh::IO::Options Class Reference

Set options for reader/writer modules. More...

`#include <OpenFlipper/libs_required/OpenMesh/src/OpenMesh/Core/IO/Options.hh>`

## Public Types
enum | Flag { Default = 0x0000, Binary = 0x0001, MSB = 0x0002, LSB = 0x0004, Swap = 0x0008, VertexNormal = 0x0010, VertexColor = 0x0020, VertexTexCoord = 0x0040, EdgeColor = 0x0080, FaceNormal = 0x0100, FaceColor = 0x0200, FaceTexCoord = 0x0400, ColorAlpha = 0x0800, ColorFloat = 0x1000, Custom = 0x2000, Status = 0x4000 }
typedef int | enum_type
typedef enum_type | value_type

## Public Member Functions
| Options ()
| Default constructor.
| Options (const Options &_opt)
| Copy constructor.
| Options (Flag _flg)
| Initializing constructor setting a single option.
| Options (const value_type _flgs)
| Initializing constructor setting multiple options.
void | cleanup (void)
| Restore state after default constructor.
void | clear (void)
| Clear all bits.
bool | is_empty (void) const
| Returns true if all bits are zero.
bool | check (const value_type _rhs) const
bool | is_binary () const
bool | vertex_has_normal () const
bool | vertex_has_color () const
bool | vertex_has_texcoord () const
bool | vertex_has_status () const
bool | edge_has_color () const
bool | edge_has_status () const
bool | halfedge_has_status () const
bool | face_has_normal () const
bool | face_has_color () const
bool | face_has_texcoord () const
bool | face_has_status () const
bool | color_has_alpha () const
bool | color_is_float () const
bool | operator== (const value_type _rhs) const
| Returns true if _rhs has the same options enabled.
bool | operator!= (const value_type _rhs) const
| Returns true if _rhs does not have the same options enabled.
| operator value_type () const
| Returns the option set.
Options & | operator= (const Options &_rhs)
| Copy options defined in _rhs.
Options & | operator= (const value_type _rhs)
| Copy options defined in _rhs.
Options & | operator-= (const value_type _rhs)
| Unset options defined in _rhs.
Options & | unset (const value_type _rhs)
| Unset options defined in _rhs.
Options & | operator+= (const value_type _rhs)
| Set options defined in _rhs.
Options & | set (const value_type _rhs)
| Set options defined in _rhs.

## Private Member Functions
bool | operator&& (const value_type _rhs) const

## Private Attributes
value_type | flags_

## Detailed Description

Set options for reader/writer modules.

The class is used in a twofold way.

1. In combination with reader modules the class is used
   - to pass hints to the reading module, whether the input is binary and what byte ordering the binary data has
   - to retrieve information about the file contents after succesful reading.
2. In combination with write modules the class gives directions to the writer module, whether to
   - use binary mode or not and what byte order to use
   - store one of the standard properties.

The option are defined in `Options::Flag` as bit values and stored in an `int` value as a bitset.

Definition at line 90 of file Options.hh.

## Member Enumeration Documentation

## ◆ Flag

enum OpenMesh::IO::Options::Flag

Definitions of Options for reading and writing. The options can be or'ed.

Enumerator
Default | No options.
Binary | Set binary mode for r/w.
MSB | Assume big endian byte ordering.
LSB | Assume little endian byte ordering.
Swap | Swap byte order in binary mode.
VertexNormal | Has (r) / store (w) vertex normals.
VertexColor | Has (r) / store (w) vertex colors.
VertexTexCoord | Has (r) / store (w) texture coordinates.
EdgeColor | Has (r) / store (w) edge colors.
FaceNormal | Has (r) / store (w) face normals.
FaceColor | Has (r) / store (w) face colors.
FaceTexCoord | Has (r) / store (w) face texture coordinates.
ColorAlpha | Has (r) / store (w) alpha values for colors.
ColorFloat | Has (r) / store (w) float values for colors (currently only implemented for PLY and OFF files)
Custom | Has (r) custom properties (currently only implemented in PLY Reader ASCII version)
Status | Has (r) / store (w) status properties.

Definition at line 98 of file Options.hh.

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

- OpenFlipper/libs_required/OpenMesh/src/OpenMesh/Core/IO/Options.hh