VPTissue Reference Manual
ListSweep.h
Go to the documentation of this file.
1 #ifndef SIMPT_PAREX_LIST_SWEEP_H_
2 #define SIMPT_PAREX_LIST_SWEEP_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 "ISweep.h"
23 
24 namespace SimPT_Parex {
25 
29 class ListSweep : public ISweep
30 {
31 public:
33  ListSweep(const std::vector<std::string>& values);
34 
36  ListSweep(const boost::property_tree::ptree& pt);
37 
39  virtual ~ListSweep() {}
40 
42  virtual ListSweep *Clone() const { return new ListSweep(*this); }
43 
45  virtual unsigned int GetNumberOfValues() const;
46 
48  virtual std::string GetValue(unsigned int index) const;
49 
58  virtual boost::property_tree::ptree ToPtree() const;
59 
60 private:
65  void ReadPtree(const boost::property_tree::ptree& pt);
66 
67 private:
68  std::vector<std::string> m_values;
69 };
70 
71 } // namespace
72 
73 #endif // end-of-include-guard
virtual std::string GetValue(unsigned int index) const
Returns the value on the given index.
Definition: ListSweep.cpp:36
ListSweep(const std::vector< std::string > &values)
Constructor.
Definition: ListSweep.cpp:29
A sweep over a list of parameters.
Definition: ListSweep.h:29
virtual boost::property_tree::ptree ToPtree() const
Convert the list sweep to a ptree.
Definition: ListSweep.cpp:47
An interface class for a parameter sweep.
Definition: ISweep.h:31
virtual ListSweep * Clone() const
Polymorphic copy constructor.
Definition: ListSweep.h:42
virtual unsigned int GetNumberOfValues() const
Returns the number of values in the sweep.
Definition: ListSweep.cpp:42
Namespace for SimPT parameter explorer package.
Definition: Client.cpp:52
Interface class ISweep.