OpenMesh::IO::Options Class Reference

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

#include <Options.hh>

List of all members.

Public Types

typedef int enum_type
enum  Flag {
  Default = 0x0000, Binary = 0x0001, MSB = 0x0002, LSB = 0x0004,
  Swap = 0x0006, VertexNormal = 0x0010, VertexColor = 0x0020, VertexTexCoord = 0x0040,
  EdgeColor = 0x0080, FaceNormal = 0x0100, FaceColor = 0x0200, ColorAlpha = 0x0400
}
typedef enum_type value_type

Public Member Functions

bool check (const value_type _rhs) const
void cleanup (void)
 Restore state after default constructor.
void clear (void)
 Clear all bits.
bool color_has_alpha () const
bool edge_has_color () const
bool face_has_color () const
bool face_has_normal () const
bool is_binary () const
bool is_empty (void) const
 Returns true if all bits are zero.
 operator value_type () const
 Returns the option set.
bool operator!= (const value_type _rhs) const
 Returns true if _rhs does not have the same options enabled.
bool operator== (const value_type _rhs) const
 Returns true if _rhs has the same options enabled.
 Options (const value_type _flgs)
 Initializing constructor setting multiple options.
 Options (Flag _flg)
 Initializing constructor setting a single option.
 Options (const Options &_opt)
 Copy constructor.
 Options ()
 Default constructor.
bool vertex_has_color () const
bool vertex_has_normal () const
bool vertex_has_texcoord () const
 ~Options ()

Optionsoperator+= (const value_type _rhs)
 Set options defined in _rhs.
Optionsset (const value_type _rhs)

Optionsoperator-= (const value_type _rhs)
 Unset options defined in _rhs.
Optionsunset (const value_type _rhs)

Optionsoperator= (const value_type _rhs)
Optionsoperator= (const Options &_rhs)
 Copy 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 88 of file Options.hh.


Member Typedef Documentation

Definition at line 91 of file Options.hh.

Definition at line 92 of file Options.hh.


Member Enumeration Documentation

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.

ColorAlpha 

Has (r) / store (w) alpha values for colors.

Definition at line 96 of file Options.hh.


Constructor & Destructor Documentation

OpenMesh::IO::Options::Options (  )  [inline]

Default constructor.

Definition at line 114 of file Options.hh.

OpenMesh::IO::Options::Options ( const Options _opt  )  [inline]

Copy constructor.

Definition at line 119 of file Options.hh.

OpenMesh::IO::Options::Options ( Flag  _flg  )  [inline]

Initializing constructor setting a single option.

Definition at line 124 of file Options.hh.

OpenMesh::IO::Options::Options ( const value_type  _flgs  )  [inline]

Initializing constructor setting multiple options.

Definition at line 129 of file Options.hh.

OpenMesh::IO::Options::~Options (  )  [inline]

Definition at line 133 of file Options.hh.


Member Function Documentation

bool OpenMesh::IO::Options::check ( const value_type  _rhs  )  const [inline]

Definition at line 190 of file Options.hh.

void OpenMesh::IO::Options::cleanup ( void   )  [inline]

Restore state after default constructor.

Definition at line 137 of file Options.hh.

void OpenMesh::IO::Options::clear ( void   )  [inline]

Clear all bits.

Definition at line 141 of file Options.hh.

bool OpenMesh::IO::Options::color_has_alpha (  )  const [inline]

Definition at line 202 of file Options.hh.

bool OpenMesh::IO::Options::edge_has_color (  )  const [inline]

Definition at line 199 of file Options.hh.

bool OpenMesh::IO::Options::face_has_color (  )  const [inline]

Definition at line 201 of file Options.hh.

bool OpenMesh::IO::Options::face_has_normal (  )  const [inline]

Definition at line 200 of file Options.hh.

bool OpenMesh::IO::Options::is_binary (  )  const [inline]

Definition at line 195 of file Options.hh.

bool OpenMesh::IO::Options::is_empty ( void   )  const [inline]

Returns true if all bits are zero.

Definition at line 145 of file Options.hh.

OpenMesh::IO::Options::operator value_type (  )  const [inline]

Returns the option set.

Definition at line 216 of file Options.hh.

bool OpenMesh::IO::Options::operator!= ( const value_type  _rhs  )  const [inline]

Returns true if _rhs does not have the same options enabled.

Definition at line 211 of file Options.hh.

bool OpenMesh::IO::Options::operator&& ( const value_type  _rhs  )  const [private]
Options& OpenMesh::IO::Options::operator+= ( const value_type  _rhs  )  [inline]

Set options defined in _rhs.

Definition at line 178 of file Options.hh.

Options& OpenMesh::IO::Options::operator-= ( const value_type  _rhs  )  [inline]

Unset options defined in _rhs.

Definition at line 165 of file Options.hh.

Options& OpenMesh::IO::Options::operator= ( const value_type  _rhs  )  [inline]

Definition at line 156 of file Options.hh.

Options& OpenMesh::IO::Options::operator= ( const Options _rhs  )  [inline]

Copy options defined in _rhs.

Definition at line 153 of file Options.hh.

bool OpenMesh::IO::Options::operator== ( const value_type  _rhs  )  const [inline]

Returns true if _rhs has the same options enabled.

Definition at line 206 of file Options.hh.

Options& OpenMesh::IO::Options::set ( const value_type  _rhs  )  [inline]

Definition at line 181 of file Options.hh.

Options& OpenMesh::IO::Options::unset ( const value_type  _rhs  )  [inline]

Definition at line 168 of file Options.hh.

bool OpenMesh::IO::Options::vertex_has_color (  )  const [inline]

Definition at line 197 of file Options.hh.

bool OpenMesh::IO::Options::vertex_has_normal (  )  const [inline]

Definition at line 196 of file Options.hh.

bool OpenMesh::IO::Options::vertex_has_texcoord (  )  const [inline]

Definition at line 198 of file Options.hh.


Member Data Documentation

Definition at line 222 of file Options.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


openmesh
Author(s): Benjamin Pitzer
autogenerated on Fri Jan 11 12:11:18 2013