openETCS
case study for the European Train Control System developed for the authors dissertation
Generator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010-2011
3  Johannes Feuser <feuser@uni-bremen.de>
4  This file is part of the openETCS library.
5 
6  The openETCS library is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  any later version.
10 
11  The openETCS library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with the openETCS library. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 /*!
21  * \author Johannes Feuser <feuser@uni-bremen.de>
22  * \brief
23  */
24 
25 #ifndef __OETCS_GEN_GENERATOR_H__
26 #define __OETCS_GEN_GENERATOR_H__
27 
28 
29 
30 
31 #include <ostream>
32 #include "Error/ExceptionTypes.h"
33 #include "../../DSM/GOPPRRSyntaxTree.h"
34 #include "../../GOPPRR/Project.h"
35 #include "../../GOPPRR/Graph.h"
36 #include "Configuration.h"
37 #include "../../GOPPRR/Object.h"
38 #include "../../GOPPRR/Role.h"
39 #include "../../GOPPRR/Port.h"
40 #include "../../GOPPRR/Relationship.h"
41 #include "../../GOPPRR/Property.h"
42 
43 
44 namespace DSM { class CSyntaxTree; }
45 
46 
47 namespace oETCS {
48 
49 namespace GEN {
50 
51 
52 /*!
53  * \brief generator base class
54  */
55 class CGenerator
56 {
57  public:
58  /*!
59  * \brief generation method
60  *
61  * Generates from a syntax tree the corresponding output.
62  * \remark pure virtual method, which must be reimplemented by any
63  * inheriting class.
64  *
65  * \param[in] pTree pointer to the syntax tree used for generation
66  * \param[in] OutStream Stream object used for output
67  */
68  virtual void Generate(::DSM::CSyntaxTree * const pSyntaxTree, ::std::ostream & OutStream) throw(::oETCS::GEN::Error::CException) = 0;
69 
70 
71 
72 
73 }; // class CGenerator
74 
75 
76 
77 
78 
79 } // namespace oETCS::GEN
80 
81 } // namespace oETCS
82 
83 #endif // __ OETCS_GEN_GENERATOR_H__

Copyright (C) 2010-2012 Johannes Feuser (feuser@uni-bremen.de)
The openETCS library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
The openETCS library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the openETCS library. If not, see "http://www.gnu.org/licenses/.