Public Member Functions | List of all members
FieldReader Class Reference

Public Member Functions

 FieldReader ()
 FieldReader (const char *fieldname_, const char *aci_, float minVal, float maxVal)
bool may_read () const
float calc_value (GBDATA *gb_item) const

Detailed Description

Definition at line 37 of file field_shader.cxx.

Constructor & Destructor Documentation

FieldReader::FieldReader ( )

Definition at line 62 of file field_shader.cxx.

FieldReader::FieldReader ( const char fieldname_,
const char aci_,
float  minVal,
float  maxVal 

Definition at line 64 of file field_shader.cxx.

References is_assert.

Member Function Documentation

bool FieldReader::may_read ( ) const

Definition at line 75 of file field_shader.cxx.

Referenced by MultiFieldReader::add_reader().

float FieldReader::calc_value ( GBDATA gb_item) const

reads one field from passed item.

Returns NAN in the following cases:

  • 'this' is a null-reader
  • no item passed
  • field is missing
  • STRING field contains no numeric data

Otherwise the value is scaled (but not limited) to the value range.

Definition at line 77 of file field_shader.cxx.

References aw_message(), GB_await_error(), GB_command_interpreter_in_env(), GB_entry(), GB_FIND, GB_FLOAT, GB_INT, GB_read_as_string(), GB_read_float(), GB_read_int(), GB_read_type(), GB_search(), is_assert, is_inf(), and NULp.

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