openETCS
case study for the European Train Control System developed for the authors dissertation
VMgenerator.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_VMGENERATOR_H__
26 #define __OETCS_GEN_VMGENERATOR_H__
27 
28 
29 #include <chrono>
30 #include <iomanip>
31 #include <sstream>
32 
33 #include "Generator.h"
34 #include <ostream>
35 #include "Error/ExceptionTypes.h"
36 
37 
38 namespace DSM { class CSyntaxTree; }
39 
40 
41 namespace oETCS {
42 
43 namespace GEN {
44 
45 
46 /*!
47  * \brief generator for virtual machine configuration for Xen hypervisior
48  */
50 {
51  public:
52  /*!
53  * \brief checks, if syntax tree model has a PSM part
54  *
55  * \return true, if PSM is included
56  */
57  bool HasPSM(::DSM::CSyntaxTree * const pSyntaxTree) throw();
58 
59 
60 
61  /*!
62  * \brief generation method
63  *
64  * Generates from a syntax tree the corresponding output.
65  * \remark only generates the PIM configuration
66  *
67  * \param[in] pTree pointer to the syntax tree used for generation
68  * \param[in] OutStream Stream object used for output
69  */
70  virtual void Generate(::DSM::CSyntaxTree * const pSyntaxTree, ::std::ostream & OutStream) throw(::oETCS::GEN::Error::CException);
71 
72 
73 
74  /*!
75  * \brief generation method
76  *
77  * Generates from a syntax tree the corresponding output.
78  * \remark only generates the PSM configuration, if applicable
79  *
80  * \param[in] pTree pointer to the syntax tree used for generation
81  * \param[in] OutStream Stream object used for output
82  */
83  virtual void GeneratePSM(::DSM::CSyntaxTree * const pSyntaxTree, ::std::ostream & OutStream) throw(::oETCS::GEN::Error::CException);
84 
85 
86 
87 
88 }; // class CVMGenerator : public oETCS::GEN::CGenerator
89 
90 
91 
92 
93 
94 } // namespace oETCS::GEN
95 
96 } // namespace oETCS
97 
98 #endif // __ OETCS_GEN_VMGENERATOR_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/.