Fawkes API  Fawkes Development Version
InterfaceDataTypeChecker Class Reference

Type checker for interface types. More...

#include <>>

List of all members.

Static Public Member Functions

static bool validType (const std::string &type, std::vector< InterfaceEnumConstant > *enum_constants=0)
 Check type validity.
static bool validValue (const std::string &type, const std::string &value)
 Check value validity for given type.

Detailed Description

Type checker for interface types.

This classed is used by the generator to decide if a supplied type is correct and in the case of constants if the supplied value matches the field type.

Valid types are:

  • int
  • long int
  • unsigned int
  • unsigned long int
  • bool
  • float
  • double
  • byte (unsigned 8-bit number)
  • string

Member Function Documentation

bool InterfaceDataTypeChecker::validType ( const std::string type,
std::vector< InterfaceEnumConstant > *  enum_constants = 0 
) [static]

Check type validity.

Parameters:
typetype string to check
enum_constantsan optional vector of enumeration constants that are used for type validation.
Returns:
true, if type is valid, false otherwise

Definition at line 64 of file type_checker.cpp.

Referenced by InterfaceField::valid(), and InterfaceConstant::InterfaceConstant().

bool InterfaceDataTypeChecker::validValue ( const std::string type,
const std::string value 
) [static]

Check value validity for given type.

Parameters:
typetype if value
valuevalue to check
Returns:
true, if value is valid for type, false otherwise

Definition at line 101 of file type_checker.cpp.

Referenced by InterfaceField::valid(), and InterfaceConstant::InterfaceConstant().


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