source: src/Parser/ParserTypes.hpp@ 0e894a

Action_Thermostats Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.1 ChemicalSpaceEvaluator Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph Fix_Verbose_Codepatterns ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion Gui_displays_atomic_force_velocity JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool PythonUI_with_named_parameters Recreated_GuiChecks StoppableMakroAction TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps
Last change on this file since 0e894a was aa91de0, checked in by Frederik Heber <frederik.heber@…>, 8 years ago

FIX: size_t definition missing and other fixes.

  • cstddef defines both size_t and NULL.
  • also string include missing.
  • this is in preparation for removing MemDebug include.
  • Property mode set to 100644
File size: 1.5 KB
RevLine 
[9a6b76e]1/** \file ParserTypes.hpp
2 *
3 * date: Sep, 27 2011
4 * author: heber
5 *
6 */
7
8#ifndef PARSERTYPES_HPP_
9#define PARSERTYPES_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
[aa91de0]16#include <cstddef>
17
[765f16]18#include <boost/preprocessor/seq/elem.hpp>
19#include <boost/preprocessor/seq/seq.hpp>
20#include <boost/preprocessor/seq/size.hpp>
21#include <boost/preprocessor/iteration/local.hpp>
22
23
24#include "ParserTypes.def"
25
26//!> function to print each member of the sequence in the enumeration
27#define sequence_print(z,n,seq) \
28 BOOST_PP_SEQ_ELEM(n, seq) ,
29
30//!> Enumeration of all known parsers
31enum ParserTypes {
32// some proprocessor magic to generate the body from the above sequence
33#if defined ParserTypes_END // do we have parameters at all?
34#define BOOST_PP_LOCAL_MACRO(n) sequence_print(~, n, PARSERSEQUENCE)
35#define BOOST_PP_LOCAL_LIMITS (0, ParserTypes_END-1)
36#include BOOST_PP_LOCAL_ITERATE()
37#undef BOOST_PP_LOCAL_MACRO
38#undef BOOST_PP_LOCAL_LIMITS
39#endif
40 ParserTypes_end = ParserTypes_END,
41 ParserTypes_begin = BOOST_PP_SEQ_HEAD(PARSERSEQUENCE)
42};
43
44#undef sequence_print
45
46//!> Number of known ParserTypes
47const size_t ParserTypesMax = ParserTypes_END;
48
49#include "ParserTypes.undef"
50
51//!> Typedef for enumeration to ease its use
[9a6b76e]52typedef enum ParserTypes ParserTypes;
53
[765f16]54/** Increment operator for the enumeration ParserTypes to allow loops.
55 * \param &type value
56 * \return value incremented by one
57 */
58ParserTypes &operator++(ParserTypes &type);
59
[9a6b76e]60#endif /* PARSERTYPES_HPP_ */
61
Note: See TracBrowser for help on using the repository browser.