openETCS
case study for the European Train Control System developed for the authors dissertation
ConstraintChecker.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010-2012
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 constraint checker file
23  */
24 
25 #ifndef __GOPPRR_CONSTRAINTCHECKER_H__
26 #define __GOPPRR_CONSTRAINTCHECKER_H__
27 
28 
29 #include <chrono>
30 #include <iomanip>
31 #include <sstream>
32 
33 #include "Project.h"
34 #include <string>
35 #include <ostream>
36 #include "Error/ExceptionTypes.h"
37 #include "Graph.h"
38 #include "Binding.h"
39 #include "GraphicalContainer.h"
40 
41 
42 
43 
44 
45 namespace GOPPRR {
46 
47 
48 /*!
49  * \brief OCL constraint checker for a GOPPRR model/project
50  */
52 {
53  public:
54  /*!
55  * \brief destructor
56  */
57  virtual ~CConstraintChecker() throw();
58 
59 
60 
61  /*!
62  * \brief checks a GOPPRR project for constraints
63  *
64  * Check a ::GOPPRR::CProject instance for constraint statements
65  * defined in OCL
66  *
67  * \param[in] pProject pointer to the project instance to be checked
68  * \param[in] OCLConstraints OCL constraint statements
69  * \param[in] pOutStream optional pointer to an outstream object for violation information
70  *
71  * \return true, if all constraints were met
72  */
73  bool Check(GOPPRR::CProject * const pProject, const ::std::string & OCLConstraints, ::std::ostream * const pOutStream = 0) const throw(::GOPPRR::Error::CException);
74 
75 
76 
77 
78 }; // class CConstraintChecker
79 
80 
81 
82 
83 
84 } // namespace GOPPRR
85 
86 #endif // __ GOPPRR_CONSTRAINTCHECKER_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/.