cgv
cgv::data Namespace Reference

namespace for data management components More...

Classes

class  ascii_read_reflection_handler
 
class  ascii_reflection_handler
 
class  ascii_write_reflection_handler
 
class  binary_read_reflection_handler
 
class  binary_reflection_handler
 
class  binary_write_reflection_handler
 
class  component_format
 
class  const_data_view
 
class  data_format
 
class  data_view
 
class  data_view_base
 
class  data_view_impl
 
class  dynamic_priority_queue
 
class  io_reflection_handler
 
class  packing_info
 
class  ref_counted
 
class  ref_ptr
 
class  ref_ptr_tag
 struct used to make ref pointers to ref_counted friends of ref_counted More...
 

Enumerations

enum  NamingConvention
 different naming conventions for member names
 
enum  ComponentFormat { ,
  CF_R, CF_G, CF_B, CF_A,
  CF_L, CF_I, CF_LA, CF_IA,
  CF_RG, CF_RGB, CF_RGBA, CF_BGR,
  CF_BGRA, CF_D, CF_S, CF_P2D,
  CF_P3D, CF_P4D, CF_N2D, CF_N3D,
  CF_T2D, CF_T3D, CF_T4D, CF_LAST
}
 
enum  ComponentIntegerInterpretation
 
enum  IOReflectionError
 different error codes
 

Functions

std::ostream & operator<< (std::ostream &os, const component_format &cf)
 define stream out operator More...
 
bool fmt1_compares_better (const component_format &fmt, const component_format &fmt1, const component_format &fmt2)
 default function to check whether fmt1 is a better match to fmt than fmt2
 
unsigned int find_best_match (const component_format &fmt, const char **format_descriptions, const component_format *fmt0, bool(*fmt1_better_match)(const component_format &fmt, const component_format &fmt1, const component_format &fmt2))
 
std::ostream & operator<< (std::ostream &os, const data_format &df)
 define stream out operator More...
 

Detailed Description

namespace for data management components

Enumeration Type Documentation

◆ ComponentFormat

define standard formats, which should be used to avoid wrong assignment of component names

Enumerator
CF_R 

undefinded format with no component

CF_G 

red channel of color format

CF_B 

green channel of color format

CF_A 

blue channel of color format

CF_L 

alpha format

CF_I 

color format with luminance component L

CF_LA 

color format with intensity component I

CF_IA 

color format with luminance and alpha components: L and A

CF_RG 

color format with intensity and alpha components: I and A

CF_RGB 

color format with two components R and G

CF_RGBA 

color format with components R, G and B

CF_BGR 

color format with components R, G, B and A

CF_BGRA 

color format with components B, G and R

CF_D 

color format with components B, G, R and A

CF_S 

depth component

CF_P2D 

stencil component

CF_P3D 

point format with components px and py

CF_P4D 

point format with components px, py and pz

CF_N2D 

point format with components px, py, pz and pw

CF_N3D 

normal format with components nx and ny

CF_T2D 

normal format with components nx, ny and nz

CF_T3D 

texture coordinats format with components ts and tt

CF_T4D 

texture coordinats format with components ts, tt and tr

CF_LAST 

texture coordinats format with components ts, tt, tr and tq

this is always the last entry in the component formats and used for iteration

◆ ComponentIntegerInterpretation

define different interpretations of integer components

Function Documentation

◆ find_best_match()

CGV_API unsigned int cgv::data::find_best_match ( const component_format fmt,
const char **  format_descriptions,
const component_format fmt0 = 0,
bool(*)(const component_format &fmt, const component_format &fmt1, const component_format &fmt2)  fmt1_better_match = fmt1_compares_better 
)

find the best matching format in a list of formats described by strings and return index of best match

◆ operator<<() [1/2]

CGV_API std::ostream & cgv::data::operator<< ( std::ostream &  os,
const component_format cf 
)

define stream out operator

stream out operator writes the component format in the syntax of description strings as defined in the docu of set_component_format().

◆ operator<<() [2/2]

CGV_API std::ostream & cgv::data::operator<< ( std::ostream &  os,
const data_format df 
)

define stream out operator

stream out operator writes the data format in the syntax of description strings as defined in the docu of set_data_format().