charon-core  0.3.1
Statement.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2012 Gerald Mwangi
2 
3  This file is part of Charon.
4 
5  Charon is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  Charon is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with Charon. If not, see <http://www.gnu.org/licenses/>.
17 */
26 #include "../include/charon-core/Statement.h"
27 
28 Statement::Statement(const std::string& name) :
30  "Statement", name,
31  "<h2>Statement module to be used in loops</h2><br>"
32  "Statement module to be used in loops. This plugin is intended "
33  "for loops (e.g. WhileGroup). It interfaces the loop with the "
34  "bool statement connected to it."
35  )
36 {
37  ParameteredObject::_setTags("charon-core") ;
38 
40  statement, "statement",
41  "Statement to interface to the external loop",
42  "bool");
43 
44  _statement=true;
45 }
46 
48  // your code goes here :-)
49  _statement=statement();
50 }
51 
54  create(const std::string& name, ParameteredObject::template_type) {
55  return new Statement(name);
56 }
57 
60  delete b;
61 }
62 
65 #ifdef _DEBUG
67 #else
69 #endif
70 }
71 
72 bool Statement::operator ()() const
73 {
74  return _statement;
75 }
Statement(const std::string &name="")
default constructor
Definition: Statement.cpp:28
Statement module to be used in loops.
Definition: Statement.h:47
build_type
defined build type
template_type
Integer which represents a template type.
Base class for serializable objects.
statement_DECLDIR void destroy(ParameteredObject *b)
Deletes an instance of the plugin.
Definition: Statement.cpp:59
Convenience file to iclude all ParameteredObject dependencies and Template functions.
virtual void execute()
Update object.
Definition: Statement.cpp:47
void _setTags(const std::string &tags)
Register additional tag names for grouping ParameteredObjects.
InputSlot< bool > statement
Statement to interface to the external loop.
Definition: Statement.h:54
the object was compiled in release mode
statement_DECLDIR ParameteredObject::build_type getBuildType()
Report build configuration to prevent linking of incompatibel runtime libs.
Definition: Statement.cpp:64
void _addInputSlot(Slot &slot, const std::string &name, const std::string &doc, const std::string &type="")
These functions needs to be called by the derived class in order to register all objects which can be...
statement_DECLDIR ParameteredObject * create(const std::string &name, ParameteredObject::template_type)
Creates an instance of the plugin.
Definition: Statement.cpp:54
#define statement_DECLDIR
Not needed without MSVC.
Definition: Statement.h:36
the object was compiled in debug mode