Fawkes API Fawkes Development Version
checker.h
1
2/***************************************************************************
3 * type_checker.h - Interface generator type checker
4 *
5 * Generated: Wed Oct 11 15:35:26 2006
6 * Copyright 2006 Tim Niemueller [www.niemueller.de]
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Library General Public License for more details.
19 *
20 * Read the full text in the LICENSE.GPL file in the doc directory.
21 */
22
23#ifndef _INTERFACES_GENERATOR_TYPE_CHECKER_H_
24#define _INTERFACES_GENERATOR_TYPE_CHECKER_H_
25
26#define __STDC_LIMIT_MACROS
27
28#include <interfaces/generator/enum_constant.h>
29
30#include <set>
31#include <string>
32#include <vector>
33
35{
36public:
37 static bool validType(const std::string & type,
38 std::vector<InterfaceEnumConstant> *enum_constants = 0);
39 static bool validValue(const std::string &type, const std::string &value);
40 static bool validName(const std::string &name, const std::set<std::string> &reserved_names);
41};
42
43const std::set<std::string> reserved_names_interface();
44const std::set<std::string> reserved_names_message();
45
46#endif
Check interface type and identifier validity.
Definition: checker.h:35
static bool validValue(const std::string &type, const std::string &value)
Check value validity for given type.
Definition: checker.cpp:88
static bool validName(const std::string &name, const std::set< std::string > &reserved_names)
Check identifiers.
Definition: checker.cpp:147
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 f...
Definition: checker.cpp:61