VPTissue Reference Manual
Exploration.h
Go to the documentation of this file.
1 #ifndef SIMPT_PAREX_EXPLORATION_H_
2 #define SIMPT_PAREX_EXPLORATION_H_
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include "SimTask.h"
23 
24 #include <boost/property_tree/ptree.hpp>
25 #include <string>
26 #include <vector>
27 
28 namespace SimPT_Parex {
29 
34 {
35 public:
41  Exploration(const std::string& name, const boost::property_tree::ptree& preferences);
42 
48  Exploration(const boost::property_tree::ptree& pt);
49 
53  Exploration(const Exploration& other);
54 
58  Exploration &operator=(const Exploration& other);
59 
63  virtual ~Exploration() {};
64 
68  virtual Exploration* Clone() const = 0;
69 
74  void SetName(const std::string& name) { m_name = name; }
75 
79  const std::string& GetName() const { return m_name; }
80 
84  const boost::property_tree::ptree& GetPreferences() const { return m_preferences; };
85 
89  virtual std::vector<std::string> GetParameters() const = 0;
90 
96  virtual std::vector<std::string> GetValues(unsigned int index) const = 0;
97 
101  virtual unsigned int GetNumberOfTasks() const = 0;
102 
107  virtual SimTask* CreateTask(unsigned int index) const = 0;
108 
118  virtual boost::property_tree::ptree ToPtree() const;
119 
120 private:
125  virtual void ReadPtree(const boost::property_tree::ptree& pt);
126 
127 protected:
128  std::string m_name;
129  boost::property_tree::ptree m_preferences;
130 };
131 
132 } // namespace
133 
134 #endif // end-of-include-guard
void SetName(const std::string &name)
Changes the name of the exploration.
Definition: Exploration.h:74
virtual unsigned int GetNumberOfTasks() const =0
Returns the number of tasks the exploration currently contains.
virtual ~Exploration()
Destructor.
Definition: Exploration.h:63
virtual std::vector< std::string > GetValues(unsigned int index) const =0
Return the values of a certain task.
Exploration(const std::string &name, const boost::property_tree::ptree &preferences)
Constructor.
virtual Exploration * Clone() const =0
Clone function.
virtual boost::property_tree::ptree ToPtree() const
Convert the exploration to a ptree.
Definition: Exploration.cpp:51
virtual std::vector< std::string > GetParameters() const =0
Returns all the parameters in the exploration.
virtual SimTask * CreateTask(unsigned int index) const =0
Creates a task with the parameters on the given index.
const std::string & GetName() const
Returns the name of the exploration.
Definition: Exploration.h:79
Exploration & operator=(const Exploration &other)
Assignment operator.
Definition: Exploration.cpp:41
Interface for SimTask.
const boost::property_tree::ptree & GetPreferences() const
Returns the preferences of the exploration.
Definition: Exploration.h:84
Namespace for SimPT parameter explorer package.
Definition: Client.cpp:52
Contains all information needed for a transmitable simulation task.
Definition: SimTask.h:31
Class describing a generic exploration.
Definition: Exploration.h:33