Fawkes API
Fawkes Development Version
|
Check interface type and identifier validity. More...
#include <>>
Static Public Member Functions | |
static bool | validType (const std::string &type, std::vector< InterfaceEnumConstant > *enum_constants=0) |
Decide if a supplied type is correct and in the case of constants if the supplied value matches the field type. More... | |
static bool | validValue (const std::string &type, const std::string &value) |
Check value validity for given type. More... | |
static bool | validName (const std::string &name, const std::set< std::string > &reserved_names) |
Check identifiers. More... | |
|
static |
Check identifiers.
Identifiers that are used by the implementation and cannot be used as field or message names are rejected.
name | identifier to check |
reserved_names | reserved names to reject |
Definition at line 147 of file checker.cpp.
Referenced by InterfaceEnumConstant::add_item(), InterfaceConstant::InterfaceConstant(), InterfaceEnumConstant::InterfaceEnumConstant(), and InterfaceField::valid().
|
static |
Decide if a supplied type is correct and in the case of constants if the supplied value matches the field type.
Valid types are:
type | type string to check |
enum_constants | an optional vector of enumeration constants that are used for type validation. |
Definition at line 61 of file checker.cpp.
Referenced by InterfaceConstant::InterfaceConstant(), and InterfaceField::valid().
|
static |
Check value validity for given type.
type | type if value |
value | value to check |
Definition at line 88 of file checker.cpp.
Referenced by InterfaceConstant::InterfaceConstant(), and InterfaceField::valid().