diff --git a/docs/DataType_8h.html b/docs/DataType_8h.html index f232859..d16cae9 100644 --- a/docs/DataType_8h.html +++ b/docs/DataType_8h.html @@ -76,12 +76,23 @@ $(function() {
Namespaces | -Enumerations
+Enumerations | +Functions
DataType.h File Reference
-
+
#include <string>
+
+Include dependency graph for DataType.h:
+
+
+ + + + +
+
This graph shows which files directly or indirectly include this file:
@@ -128,11 +139,16 @@ Enumerations }  The different data types a paramater can be. More...
  + + + +

+Functions

static std::string Hazelnp::DataTypeToString (DATA_TYPE type)
 
diff --git a/docs/DataType_8h__incl.map b/docs/DataType_8h__incl.map new file mode 100644 index 0000000..acf7e2c --- /dev/null +++ b/docs/DataType_8h__incl.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/DataType_8h__incl.md5 b/docs/DataType_8h__incl.md5 new file mode 100644 index 0000000..81f3b38 --- /dev/null +++ b/docs/DataType_8h__incl.md5 @@ -0,0 +1 @@ +eab021d5766fc460a8e029af4cccd74b \ No newline at end of file diff --git a/docs/DataType_8h__incl.png b/docs/DataType_8h__incl.png new file mode 100644 index 0000000..0587040 Binary files /dev/null and b/docs/DataType_8h__incl.png differ diff --git a/docs/DataType_8h_source.html b/docs/DataType_8h_source.html index 26e6681..b3243b4 100644 --- a/docs/DataType_8h_source.html +++ b/docs/DataType_8h_source.html @@ -79,29 +79,54 @@ $(function() {
Go to the documentation of this file.
1 #pragma once
-
2 
-
3 namespace Hazelnp
-
4 {
-
7  enum class DATA_TYPE
-
8  {
-
9  VOID,
-
10  INT,
-
11  FLOAT,
-
12  STRING,
-
13  LIST
-
14  };
-
15 }
+
2 #include <string>
+
3 
+
4 namespace Hazelnp
+
5 {
+
8  enum class DATA_TYPE
+
9  {
+
10  VOID,
+
11  INT,
+
12  FLOAT,
+
13  STRING,
+
14  LIST
+
15  };
+
16 
+
17  static inline std::string DataTypeToString(DATA_TYPE type)
+
18  {
+
19  switch (type)
+
20  {
+
21  case DATA_TYPE::VOID:
+
22  return "VOID";
+
23 
+
24  case DATA_TYPE::INT:
+
25  return "INT";
+
26 
+
27  case DATA_TYPE::FLOAT:
+
28  return "FLOAT";
+
29 
+
30  case DATA_TYPE::STRING:
+
31  return "STRING";
+
32 
+
33  case DATA_TYPE::LIST:
+
34  return "LIST";
+
35  }
+
36 
+
37  return "";
+
38  }
+
39 }
- + -
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:7
+
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:8
+
static std::string DataTypeToString(DATA_TYPE type)
Definition: DataType.h:17
diff --git a/docs/Debug_2Hazelnupp_8vcxproj_8FileListAbsolute_8txt.html b/docs/Debug_2Hazelnupp_8vcxproj_8FileListAbsolute_8txt.html index 5f8a8c5..67a0465 100644 --- a/docs/Debug_2Hazelnupp_8vcxproj_8FileListAbsolute_8txt.html +++ b/docs/Debug_2Hazelnupp_8vcxproj_8FileListAbsolute_8txt.html @@ -77,7 +77,7 @@ $(function() {
diff --git a/docs/FloatValue_8cpp.html b/docs/FloatValue_8cpp.html index 1204ab5..ce06830 100644 --- a/docs/FloatValue_8cpp.html +++ b/docs/FloatValue_8cpp.html @@ -90,10 +90,11 @@ Include dependency graph for FloatValue.cpp:
- + +
@@ -102,7 +103,7 @@ Include dependency graph for FloatValue.cpp: diff --git a/docs/FloatValue_8cpp__incl.map b/docs/FloatValue_8cpp__incl.map index baf1876..b367697 100644 --- a/docs/FloatValue_8cpp__incl.map +++ b/docs/FloatValue_8cpp__incl.map @@ -1,11 +1,12 @@ - - - - + + + + - - + + + diff --git a/docs/FloatValue_8cpp__incl.md5 b/docs/FloatValue_8cpp__incl.md5 index ad58fce..265d55c 100644 --- a/docs/FloatValue_8cpp__incl.md5 +++ b/docs/FloatValue_8cpp__incl.md5 @@ -1 +1 @@ -b3f9cd4cf82115a6509a6170e6bc592c \ No newline at end of file +cf9c25b2b25e65f5d489ec898ffdb7b1 \ No newline at end of file diff --git a/docs/FloatValue_8cpp__incl.png b/docs/FloatValue_8cpp__incl.png index 27c12bd..692b3af 100644 Binary files a/docs/FloatValue_8cpp__incl.png and b/docs/FloatValue_8cpp__incl.png differ diff --git a/docs/FloatValue_8cpp_source.html b/docs/FloatValue_8cpp_source.html index c834e2b..434cb2b 100644 --- a/docs/FloatValue_8cpp_source.html +++ b/docs/FloatValue_8cpp_source.html @@ -156,7 +156,7 @@ $(function() {
Hazelnp::FloatValue::GetFloat64
long double GetFloat64() const override
Will return the data as a long double.
Definition: FloatValue.cpp:54
HazelnuppException.h
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::FloatValue::GetString
std::string GetString() const override
Will return the data as a string.
Definition: FloatValue.cpp:64
Hazelnp::FloatValue::GetList
const std::vector< Value * > & GetList() const override
Throws HazelnuppValueNotConvertibleException.
Definition: FloatValue.cpp:72
Hazelnp::FloatValue::GetInt64
long long int GetInt64() const override
Will return the data as a long long int.
Definition: FloatValue.cpp:44
@@ -167,13 +167,13 @@ $(function() {
Hazelnp::FloatValue::GetFloat32
double GetFloat32() const override
Will return the data as a double.
Definition: FloatValue.cpp:59
Hazelnp::DATA_TYPE::FLOAT
@ FLOAT
FloatValue.h
-
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:7
+
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:8
Hazelnp::FloatValue::FloatValue
FloatValue(const long double &value)
Definition: FloatValue.cpp:7
Hazelnp::HazelnuppValueNotConvertibleException
Gets thrown when an attempt is made to retrieve the wrong data type from a value, when the value not ...
Definition: HazelnuppException.h:35
Hazelnp::FloatValue::GetInt32
int GetInt32() const override
Will return the data as an int.
Definition: FloatValue.cpp:49
diff --git a/docs/FloatValue_8h.html b/docs/FloatValue_8h.html index c0399d0..17ceabc 100644 --- a/docs/FloatValue_8h.html +++ b/docs/FloatValue_8h.html @@ -93,6 +93,7 @@ Include dependency graph for FloatValue.h: +
@@ -122,7 +123,7 @@ Namespaces
diff --git a/docs/FloatValue_8h__incl.map b/docs/FloatValue_8h__incl.map index 387f7e7..a80b6c8 100644 --- a/docs/FloatValue_8h__incl.map +++ b/docs/FloatValue_8h__incl.map @@ -1,7 +1,8 @@ - + - + + diff --git a/docs/FloatValue_8h__incl.md5 b/docs/FloatValue_8h__incl.md5 index 1e74042..07d0c69 100644 --- a/docs/FloatValue_8h__incl.md5 +++ b/docs/FloatValue_8h__incl.md5 @@ -1 +1 @@ -9b604a14942d77e96210b43e148cde7d \ No newline at end of file +57518ea84d05060d1ecb612836c4662f \ No newline at end of file diff --git a/docs/FloatValue_8h__incl.png b/docs/FloatValue_8h__incl.png index 869b3b3..3f2294d 100644 Binary files a/docs/FloatValue_8h__incl.png and b/docs/FloatValue_8h__incl.png differ diff --git a/docs/FloatValue_8h_source.html b/docs/FloatValue_8h_source.html index d7f10f0..38ba77a 100644 --- a/docs/FloatValue_8h_source.html +++ b/docs/FloatValue_8h_source.html @@ -115,7 +115,7 @@ $(function() {
46 }
Hazelnp::FloatValue::GetFloat64
long double GetFloat64() const override
Will return the data as a long double.
Definition: FloatValue.cpp:54
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::FloatValue::~FloatValue
~FloatValue() override
Definition: FloatValue.h:13
Hazelnp::FloatValue::GetString
std::string GetString() const override
Will return the data as a string.
Definition: FloatValue.cpp:64
Hazelnp::FloatValue::GetList
const std::vector< Value * > & GetList() const override
Throws HazelnuppValueNotConvertibleException.
Definition: FloatValue.cpp:72
@@ -131,7 +131,7 @@ $(function() {
Hazelnp::FloatValue::GetInt32
int GetInt32() const override
Will return the data as an int.
Definition: FloatValue.cpp:49
diff --git a/docs/HazelnuppException_8h.html b/docs/HazelnuppException_8h.html index 882497d..27c1d7b 100644 --- a/docs/HazelnuppException_8h.html +++ b/docs/HazelnuppException_8h.html @@ -137,7 +137,7 @@ Namespaces diff --git a/docs/HazelnuppException_8h_source.html b/docs/HazelnuppException_8h_source.html index 4d3397d..7f0b744 100644 --- a/docs/HazelnuppException_8h_source.html +++ b/docs/HazelnuppException_8h_source.html @@ -134,7 +134,7 @@ $(function() {
67  };
68 }
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::HazelnuppInvalidKeyException::HazelnuppInvalidKeyException
HazelnuppInvalidKeyException(const std::string &msg)
Definition: HazelnuppException.h:30
Hazelnp::HazelnuppConstraintException::HazelnuppConstraintException
HazelnuppConstraintException()
Definition: HazelnuppException.h:47
Hazelnp::HazelnuppInvalidKeyException
Gets thrown when an non-existent key gets dereferenced.
Definition: HazelnuppException.h:26
@@ -157,7 +157,7 @@ $(function() {
Hazelnp::HazelnuppInvalidKeyException::HazelnuppInvalidKeyException
HazelnuppInvalidKeyException()
Definition: HazelnuppException.h:29
diff --git a/docs/Hazelnupp_8cpp.html b/docs/Hazelnupp_8cpp.html index 7441a3d..373178c 100644 --- a/docs/Hazelnupp_8cpp.html +++ b/docs/Hazelnupp_8cpp.html @@ -93,28 +93,28 @@ Include dependency graph for Hazelnupp.cpp:
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +
@@ -122,7 +122,7 @@ Include dependency graph for Hazelnupp.cpp: diff --git a/docs/Hazelnupp_8cpp__incl.map b/docs/Hazelnupp_8cpp__incl.map index b11c750..9aca4e3 100644 --- a/docs/Hazelnupp_8cpp__incl.map +++ b/docs/Hazelnupp_8cpp__incl.map @@ -1,24 +1,24 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/Hazelnupp_8cpp__incl.md5 b/docs/Hazelnupp_8cpp__incl.md5 index e8b2664..4fe7749 100644 --- a/docs/Hazelnupp_8cpp__incl.md5 +++ b/docs/Hazelnupp_8cpp__incl.md5 @@ -1 +1 @@ -4d63500dc473ffaa933a4e0479de4f4c \ No newline at end of file +c20f31e793f546287eb4f919b1cf5f58 \ No newline at end of file diff --git a/docs/Hazelnupp_8cpp__incl.png b/docs/Hazelnupp_8cpp__incl.png index a2a20a9..1371170 100644 Binary files a/docs/Hazelnupp_8cpp__incl.png and b/docs/Hazelnupp_8cpp__incl.png differ diff --git a/docs/Hazelnupp_8cpp_source.html b/docs/Hazelnupp_8cpp_source.html index 5432ce3..79dfd2c 100644 --- a/docs/Hazelnupp_8cpp_source.html +++ b/docs/Hazelnupp_8cpp_source.html @@ -140,389 +140,565 @@ $(function() {
60 
61  // Apply constraints such as default values, and required parameters.
62  // Types have already been enforced.
-
63  ApplyConstraints();
-
64  }
-
65  catch (const HazelnuppConstraintTypeMissmatch& hctm)
-
66  {
-
67  if (crashOnFail)
-
68  {
-
69  std::cerr << "Fatal error: Command-line parameter value-type mismatch at \"" << hctm.What() << "\"!";
-
70  quick_exit(-1009);
-
71  }
-
72  else
-
73  throw hctm; // yeet
-
74  }
-
75  catch (const HazelnuppConstraintMissingValue& hctm)
-
76  {
-
77  if (crashOnFail)
-
78  {
-
79  std::cerr << "Fatal error: Missing required command-line parameter \"" << hctm.What() << "\"!";
-
80  quick_exit(-1010);
-
81  }
-
82  else
-
83  throw hctm; // yeet
-
84  }
-
85 
-
86  return;
-
87 }
-
88 
-
89 std::size_t Hazelnupp::ParseNextParameter(const std::size_t parIndex, Parameter*& out_Par)
-
90 {
-
91  std::size_t i = parIndex;
-
92  const std::string key = rawArgs[parIndex];
-
93  std::vector<std::string> values;
-
94 
-
95  // Get values
-
96  for (i++; i < rawArgs.size(); i++)
-
97  // If not another parameter
-
98  if ((rawArgs[i].length() < 2) || (rawArgs[i].substr(0, 2) != "--"))
-
99  values.emplace_back(rawArgs[i]);
-
100  else
-
101  {
-
102  break;
-
103  }
-
104 
-
105  // Fetch constraint info
-
106  const ParamConstraint* pcn = GetConstraintForKey(key);
-
107 
-
108  Value* parsedVal = ParseValue(values, pcn);
-
109  if (parsedVal != nullptr)
-
110  {
-
111  out_Par = new Parameter(key, parsedVal);
-
112 
-
113  delete parsedVal;
-
114  parsedVal = nullptr;
-
115  }
-
116  else
-
117  throw std::runtime_error("Unable to parse parameter!");
+
63  // Dont apply constraints when we are just printind the param docs
+
64  if ((!catchHelp) || (!HasParam("--help")))
+
65  ApplyConstraints();
+
66  }
+
67  catch (const HazelnuppConstraintTypeMissmatch& hctm)
+
68  {
+
69  if (crashOnFail)
+
70  {
+
71  std::cout << GenerateDocumentation() << std::endl;
+
72  std::cerr << "Fatal error: Command-line parameter value-type mismatch at \"" << hctm.What() << "\"!";
+
73  quick_exit(-1009);
+
74  }
+
75  else
+
76  throw hctm; // yeet
+
77  }
+
78  catch (const HazelnuppConstraintMissingValue& hctm)
+
79  {
+
80  if (crashOnFail)
+
81  {
+
82  std::cout << GenerateDocumentation() << std::endl;
+
83  std::cerr << "Fatal error: Missing required command-line parameter \"" << hctm.What() << "\"!";
+
84  quick_exit(-1010);
+
85  }
+
86  else
+
87  throw hctm; // yeet
+
88  }
+
89 
+
90  // Catch --help parameter
+
91  if ((catchHelp) && (HasParam("--help")))
+
92  {
+
93  std::cout << GenerateDocumentation() << std::endl;
+
94  quick_exit(0);
+
95  }
+
96 
+
97  return;
+
98 }
+
99 
+
100 std::size_t Hazelnupp::ParseNextParameter(const std::size_t parIndex, Parameter*& out_Par)
+
101 {
+
102  std::size_t i = parIndex;
+
103  const std::string key = rawArgs[parIndex];
+
104  std::vector<std::string> values;
+
105 
+
106  // Get values
+
107  for (i++; i < rawArgs.size(); i++)
+
108  // If not another parameter
+
109  if ((rawArgs[i].length() < 2) || (rawArgs[i].substr(0, 2) != "--"))
+
110  values.emplace_back(rawArgs[i]);
+
111  else
+
112  {
+
113  break;
+
114  }
+
115 
+
116  // Fetch constraint info
+
117  const ParamConstraint* pcn = GetConstraintForKey(key);
118 
-
119  return i;
-
120 }
-
121 
-
122 void Hazelnupp::PopulateRawArgs(const int argc, const char* const* argv)
-
123 {
-
124  rawArgs.clear();
-
125  rawArgs.reserve(argc);
-
126 
-
127  for (int i = 0; i < argc; i++)
-
128  rawArgs.emplace_back(std::string(argv[i]));
+
119  Value* parsedVal = ParseValue(values, pcn);
+
120  if (parsedVal != nullptr)
+
121  {
+
122  out_Par = new Parameter(key, parsedVal);
+
123 
+
124  delete parsedVal;
+
125  parsedVal = nullptr;
+
126  }
+
127  else
+
128  throw std::runtime_error("Unable to parse parameter!");
129 
-
130  return;
+
130  return i;
131 }
132 
-
133 void Hazelnupp::ExpandAbbreviations()
+
133 void Hazelnupp::PopulateRawArgs(const int argc, const char* const* argv)
134 {
-
135  // Abort if no abbreviations
-
136  if (abbreviations.size() == 0)
-
137  return;
-
138 
-
139  for (std::string& arg : rawArgs)
-
140  {
-
141  // Is arg registered as an abbreviation?
-
142  auto abbr = abbreviations.find(arg);
-
143  if (abbr != abbreviations.end())
-
144  {
-
145  // Yes: replace arg with the long form
-
146  arg = abbr->second;
-
147  }
-
148  }
+
135  rawArgs.clear();
+
136  rawArgs.reserve(argc);
+
137 
+
138  for (int i = 0; i < argc; i++)
+
139  rawArgs.emplace_back(std::string(argv[i]));
+
140 
+
141  return;
+
142 }
+
143 
+
144 void Hazelnupp::ExpandAbbreviations()
+
145 {
+
146  // Abort if no abbreviations
+
147  if (abbreviations.size() == 0)
+
148  return;
149 
-
150  return;
-
151 }
-
152 
-
153 bool Hazelnupp::HasParam(const std::string& key) const
-
154 {
-
155  return parameters.find(key) != parameters.end();
-
156 }
-
157 
-
158 Value* Hazelnupp::ParseValue(const std::vector<std::string>& values, const ParamConstraint* constraint)
-
159 {
-
160  // Constraint values
-
161  const bool constrainType = (constraint != nullptr) && (constraint->constrainType);
-
162 
-
163  // Void-type
-
164  if (values.size() == 0)
-
165  {
-
166  // Is a list forced via a constraint? If yes, return an empty list
-
167  if ((constrainType) &&
-
168  (constraint->wantedType == DATA_TYPE::LIST))
-
169  return new ListValue();
-
170 
-
171  return new VoidValue;
-
172  }
+
150  for (std::string& arg : rawArgs)
+
151  {
+
152  // Is arg registered as an abbreviation?
+
153  auto abbr = abbreviations.find(arg);
+
154  if (abbr != abbreviations.end())
+
155  {
+
156  // Yes: replace arg with the long form
+
157  arg = abbr->second;
+
158  }
+
159  }
+
160 
+
161  return;
+
162 }
+
163 
+
164 bool Hazelnupp::HasParam(const std::string& key) const
+
165 {
+
166  return parameters.find(key) != parameters.end();
+
167 }
+
168 
+
169 Value* Hazelnupp::ParseValue(const std::vector<std::string>& values, const ParamConstraint* constraint)
+
170 {
+
171  // Constraint values
+
172  const bool constrainType = (constraint != nullptr) && (constraint->constrainType);
173 
-
174  // Force void type by constraint
-
175  if ((constrainType) &&
-
176  (constraint->wantedType == DATA_TYPE::VOID))
-
177  {
-
178  return new VoidValue;
-
179  }
-
180 
-
181  // List-type
-
182  else if (values.size() > 1)
-
183  {
-
184  // Should the type be something other than list?
-
185  if ((constrainType) &&
-
186  (constraint->wantedType != DATA_TYPE::LIST))
-
187  {
-
188  throw HazelnuppConstraintTypeMissmatch(values[0] + " " + values[1]);
-
189  }
-
190 
-
191  ListValue* newList = new ListValue();
-
192  for (const std::string& val : values)
-
193  {
-
194  Value* tmp = ParseValue({ val });
-
195  newList->AddValue(tmp);
-
196  delete tmp;
-
197  }
-
198  return newList;
-
199  }
-
200 
-
201  // Now we're only dealing with a single value
-
202  const std::string& val = values[0];
-
203 
-
204  // String
-
205  if (!StringTools::IsNumeric(val, true))
-
206  {
-
207  // Is the type not supposed to be a string?
-
208  // void and list are already sorted out
-
209  if ((constrainType) &&
-
210  (constraint->wantedType != DATA_TYPE::STRING))
-
211  {
-
212  // We can only force a list-value from here
-
213  if (constraint->wantedType == DATA_TYPE::LIST)
-
214  {
-
215  ListValue* list = new ListValue();
-
216  Value* tmp = ParseValue({ val });
-
217  list->AddValue(tmp);
-
218  delete tmp;
-
219  tmp = nullptr;
-
220  return list;
-
221  }
-
222  // Else it not possible to convert to a numeric
-
223  else
-
224  throw HazelnuppConstraintTypeMissmatch(val);
-
225  }
-
226 
-
227  return new StringValue(val);
-
228  }
-
229 
-
230  // In this case we have a numeric value.
-
231  // We should still produce a string if requested
-
232  if ((constrainType) &&
-
233  (constraint->wantedType == DATA_TYPE::STRING))
-
234  return new StringValue(val);
-
235 
-
236  // Numeric
-
237  bool isInt;
-
238  long double num;
-
239 
-
240  if (StringTools::ParseNumber(val, isInt, num))
-
241  {
-
242  // Is the type constrained?
-
243  // (only int and float left)
-
244  if (constrainType)
-
245  {
-
246  // Must it be an integer?
-
247  if (constraint->wantedType == DATA_TYPE::INT)
-
248  return new IntValue((long long int)num);
-
249  // Must it be a floating point?
-
250  else if (constraint->wantedType == DATA_TYPE::FLOAT)
-
251  return new FloatValue(num);
-
252  // Else it must be a List
-
253  else
-
254  {
-
255  ListValue* list = new ListValue();
-
256  Value* tmp = ParseValue({ val });
-
257  list->AddValue(tmp);
-
258  delete tmp;
-
259  tmp = nullptr;
-
260  return list;
-
261  }
-
262  }
-
263  // Type is not constrained
-
264  else
-
265  {
-
266  // Integer
-
267  if (isInt)
-
268  return new IntValue((long long int)num);
-
269 
-
270  // Double
-
271  return new FloatValue(num);
-
272  }
-
273  }
-
274 
-
275  // Failed
-
276  return nullptr;
-
277 }
-
278 
-
279 bool Hazelnupp::GetCrashOnFail() const
-
280 {
-
281  return crashOnFail;
-
282 }
-
283 
-
284 void Hazelnupp::ApplyConstraints()
-
285 {
-
286  // Enforce required parameters / default values
-
287  for (const auto& pc : constraints)
-
288  // Parameter in question is not supplied
-
289  if (!HasParam(pc.second.key))
-
290  {
-
291  // Do we have a default value?
-
292  if (pc.second.defaultValue.size() > 0)
-
293  {
-
294  // Then create it now, by its default value
-
295 
-
296  Value* tmp = ParseValue(pc.second.defaultValue, &pc.second);
-
297  parameters.insert(std::pair<std::string, Parameter*>(
-
298  pc.second.key,
-
299  new Parameter(pc.second.key, tmp)
-
300  ));
-
301 
-
302  delete tmp;
-
303  tmp = nullptr;
-
304  }
-
305  // So we do not have a default value...
-
306  else
-
307  {
-
308  // Is it important to have the missing parameter?
-
309  if (pc.second.required)
-
310  // Throw an error message then
-
311  throw HazelnuppConstraintMissingValue(pc.second.key);
-
312  }
-
313  }
-
314 
-
315  return;
-
316 }
-
317 
-
318 const std::string& Hazelnupp::GetExecutableName() const
-
319 {
-
320  return executableName;
+
174  // Void-type
+
175  if (values.size() == 0)
+
176  {
+
177  // Is a list forced via a constraint? If yes, return an empty list
+
178  if ((constrainType) &&
+
179  (constraint->wantedType == DATA_TYPE::LIST))
+
180  return new ListValue();
+
181 
+
182  return new VoidValue;
+
183  }
+
184 
+
185  // Force void type by constraint
+
186  if ((constrainType) &&
+
187  (constraint->wantedType == DATA_TYPE::VOID))
+
188  {
+
189  return new VoidValue;
+
190  }
+
191 
+
192  // List-type
+
193  else if (values.size() > 1)
+
194  {
+
195  // Should the type be something other than list?
+
196  if ((constrainType) &&
+
197  (constraint->wantedType != DATA_TYPE::LIST))
+
198  {
+
199  throw HazelnuppConstraintTypeMissmatch(values[0] + " " + values[1]);
+
200  }
+
201 
+
202  ListValue* newList = new ListValue();
+
203  for (const std::string& val : values)
+
204  {
+
205  Value* tmp = ParseValue({ val });
+
206  newList->AddValue(tmp);
+
207  delete tmp;
+
208  }
+
209  return newList;
+
210  }
+
211 
+
212  // Now we're only dealing with a single value
+
213  const std::string& val = values[0];
+
214 
+
215  // String
+
216  if (!StringTools::IsNumeric(val, true))
+
217  {
+
218  // Is the type not supposed to be a string?
+
219  // void and list are already sorted out
+
220  if ((constrainType) &&
+
221  (constraint->wantedType != DATA_TYPE::STRING))
+
222  {
+
223  // We can only force a list-value from here
+
224  if (constraint->wantedType == DATA_TYPE::LIST)
+
225  {
+
226  ListValue* list = new ListValue();
+
227  Value* tmp = ParseValue({ val });
+
228  list->AddValue(tmp);
+
229  delete tmp;
+
230  tmp = nullptr;
+
231  return list;
+
232  }
+
233  // Else it not possible to convert to a numeric
+
234  else
+
235  throw HazelnuppConstraintTypeMissmatch(val);
+
236  }
+
237 
+
238  return new StringValue(val);
+
239  }
+
240 
+
241  // In this case we have a numeric value.
+
242  // We should still produce a string if requested
+
243  if ((constrainType) &&
+
244  (constraint->wantedType == DATA_TYPE::STRING))
+
245  return new StringValue(val);
+
246 
+
247  // Numeric
+
248  bool isInt;
+
249  long double num;
+
250 
+
251  if (StringTools::ParseNumber(val, isInt, num))
+
252  {
+
253  // Is the type constrained?
+
254  // (only int and float left)
+
255  if (constrainType)
+
256  {
+
257  // Must it be an integer?
+
258  if (constraint->wantedType == DATA_TYPE::INT)
+
259  return new IntValue((long long int)num);
+
260  // Must it be a floating point?
+
261  else if (constraint->wantedType == DATA_TYPE::FLOAT)
+
262  return new FloatValue(num);
+
263  // Else it must be a List
+
264  else
+
265  {
+
266  ListValue* list = new ListValue();
+
267  Value* tmp = ParseValue({ val });
+
268  list->AddValue(tmp);
+
269  delete tmp;
+
270  tmp = nullptr;
+
271  return list;
+
272  }
+
273  }
+
274  // Type is not constrained
+
275  else
+
276  {
+
277  // Integer
+
278  if (isInt)
+
279  return new IntValue((long long int)num);
+
280 
+
281  // Double
+
282  return new FloatValue(num);
+
283  }
+
284  }
+
285 
+
286  // Failed
+
287  return nullptr;
+
288 }
+
289 
+
290 bool Hazelnupp::GetCrashOnFail() const
+
291 {
+
292  return crashOnFail;
+
293 }
+
294 
+
295 void Hazelnupp::SetCatchHelp(bool catchHelp)
+
296 {
+
297  this->catchHelp = catchHelp;
+
298  return;
+
299 }
+
300 
+
301 bool Hazelnupp::GetCatchHelp() const
+
302 {
+
303  return catchHelp;
+
304 }
+
305 
+
306 void Hazelnupp::SetBriefDescription(const std::string& description)
+
307 {
+
308  briefDescription = description;
+
309  return;
+
310 }
+
311 
+
312 const std::string& Hazelnupp::GetBriefDescription()
+
313 {
+
314  return briefDescription;
+
315 }
+
316 
+
317 void Hazelnp::Hazelnupp::RegisterDescription(const std::string& parameter, const std::string& description)
+
318 {
+
319  parameterDescriptions[parameter] = description;
+
320  return;
321 }
322 
-
323 const Value& Hazelnupp::operator[](const std::string& key) const
+
323 const std::string Hazelnp::Hazelnupp::GetDescription(const std::string& parameter) const
324 {
-
325  // Throw exception if param is unknown
-
326  if (!HasParam(key))
-
327  throw HazelnuppInvalidKeyException();
-
328 
-
329  return *parameters.find(key)->second->GetValue();
-
330 }
-
331 
-
332 void Hazelnupp::RegisterAbbreviation(const std::string& abbrev, const std::string& target)
-
333 {
-
334  abbreviations.insert(std::pair<std::string, std::string>(abbrev, target));
-
335  return;
-
336 }
-
337 
-
338 const std::string& Hazelnupp::GetAbbreviation(const std::string& abbrev) const
-
339 {
-
340  return abbreviations.find(abbrev)->second;
-
341 }
-
342 
-
343 bool Hazelnupp::HasAbbreviation(const std::string& abbrev) const
-
344 {
-
345  return abbreviations.find(abbrev) != abbreviations.end();
-
346 }
-
347 
-
348 void Hazelnupp::ClearAbbreviations()
-
349 {
-
350  abbreviations.clear();
-
351  return;
-
352 }
-
353 
-
354 void Hazelnupp::RegisterConstraints(const std::vector<ParamConstraint>& constraints)
-
355 {
-
356  for (const ParamConstraint& pc : constraints)
-
357  {
-
358  // Does this constraint already exist?
-
359  const auto constraint = this->constraints.find(pc.key);
-
360  // If yes, replace it.
-
361  if (constraint != this->constraints.end())
-
362  constraint->second = pc;
-
363 
-
364  // Else, create a new pair
-
365  else
-
366  this->constraints.insert(std::pair<std::string, ParamConstraint>(
-
367  pc.key,
-
368  pc
-
369  ));
-
370  }
-
371 
-
372  return;
-
373 }
-
374 
-
375 void Hazelnupp::ClearConstraints()
-
376 {
-
377  constraints.clear();
-
378  return;
-
379 }
-
380 
-
381 void Hazelnupp::SetCrashOnFail(bool crashOnFail)
-
382 {
-
383  this->crashOnFail = crashOnFail;
-
384  return;
-
385 }
-
386 
-
387 const ParamConstraint* Hazelnupp::GetConstraintForKey(const std::string& key) const
-
388 {
-
389  const auto constraint = constraints.find(key);
-
390 
-
391  if (constraint == constraints.end())
-
392  return nullptr;
-
393 
-
394  return &constraint->second;
-
395 }
+
325  // Do we already have a description for this parameter?
+
326  const auto par = parameterDescriptions.find(parameter);
+
327  if (par == parameterDescriptions.end())
+
328  // No? Then return ""
+
329  return "";
+
330 
+
331  // We do? Then return it
+
332  return par->second;
+
333 }
+
334 
+
335 void Hazelnp::Hazelnupp::ClearDescription(const std::string& parameter)
+
336 {
+
337  // This will just do nothing if the entry does not exist
+
338  parameterDescriptions.erase(parameter);
+
339  return;
+
340 }
+
341 
+
342 std::string Hazelnupp::GenerateDocumentation() const
+
343 {
+
344  std::stringstream ss;
+
345 
+
346  // Add brief, if available
+
347  if (briefDescription.length() > 0)
+
348  ss << briefDescription << std::endl;
+
349 
+
350  // Collect parameter information
+
351  struct ParamDocEntry
+
352  {
+
353  std::string abbreviation;
+
354  std::string description;
+
355  std::string type;
+
356  bool required = false;
+
357  bool typeIsForced = false;
+
358  std::string defaultVal;
+
359  };
+
360  std::unordered_map<std::string, ParamDocEntry> paramInfos;
+
361 
+
362  // Collect descriptions
+
363  for (const auto& it : parameterDescriptions)
+
364  {
+
365  // Do we already have that param in the paramInfo set?
+
366  if (paramInfos.find(it.first) == paramInfos.end())
+
367  // No? Create it.
+
368  paramInfos[it.first] = ParamDocEntry();
+
369 
+
370  paramInfos[it.first].description = it.second;
+
371  }
+
372 
+
373  // Collect abbreviations
+
374  // first value is abbreviation, second is long form
+
375  for (const auto& it : abbreviations)
+
376  {
+
377  // Do we already have that param in the paramInfo set?
+
378  if (paramInfos.find(it.second) == paramInfos.end())
+
379  // No? Create it.
+
380  paramInfos[it.second] = ParamDocEntry();
+
381 
+
382  paramInfos[it.second].abbreviation = it.first;
+
383  }
+
384 
+
385  // Collect constraints
+
386  for (const auto& it : constraints)
+
387  {
+
388  // Do we already have that param in the paramInfo set?
+
389  if (paramInfos.find(it.first) == paramInfos.end())
+
390  // No? Create it.
+
391  paramInfos[it.first] = ParamDocEntry();
+
392 
+
393  ParamDocEntry& cached = paramInfos[it.first];
+
394  cached.required = it.second.required;
+
395  cached.typeIsForced = it.second.constrainType;
+
396  cached.type = DataTypeToString(it.second.wantedType);
+
397 
+
398  std::stringstream defaultValueSs;
+
399  for (const std::string& s : it.second.defaultValue)
+
400  {
+
401  defaultValueSs << '\'' << s << '\'';
+
402 
+
403  // Add a space if we are not at the last entry
+
404  if ((void*)&s != (void*)&it.second.defaultValue.back())
+
405  defaultValueSs << " ";
+
406  }
+
407  cached.defaultVal = defaultValueSs.str();
+
408  }
+
409 
+
410  // Now generate the documentatino body
+
411  if (paramInfos.size() > 0)
+
412  {
+
413  ss << std::endl
+
414  << "==== AVAILABLE PARAMETERS ===="
+
415  << std::endl << std::endl;
+
416 
+
417  for (const auto& it : paramInfos)
+
418  {
+
419  const ParamDocEntry& pde = it.second;
+
420 
+
421  // Put name
+
422  ss << it.first << " ";
+
423 
+
424  // Put abbreviation
+
425  if (pde.abbreviation.length() > 0)
+
426  ss << pde.abbreviation << " ";
+
427 
+
428  // Put type
+
429  if (pde.typeIsForced)
+
430  ss << pde.type << " ";
+
431 
+
432  // Put default value
+
433  if (pde.defaultVal.length() > 0)
+
434  ss << "default=[" << pde.defaultVal << "] ";
+
435 
+
436  // Put required tag, but only if no default value
+
437  if ((pde.required) && (pde.defaultVal.length() == 0))
+
438  ss << "[[REQUIRED]] ";
+
439 
+
440  // Put brief description
+
441  if (pde.description.length() > 0)
+
442  ss << pde.description;
+
443 
+
444  ss << std::endl << std::endl;
+
445  }
+
446  }
+
447 
+
448  return ss.str();
+
449 }
+
450 
+
451 void Hazelnupp::ApplyConstraints()
+
452 {
+
453  // Enforce required parameters / default values
+
454  for (const auto& pc : constraints)
+
455  // Parameter in question is not supplied
+
456  if (!HasParam(pc.second.key))
+
457  {
+
458  // Do we have a default value?
+
459  if (pc.second.defaultValue.size() > 0)
+
460  {
+
461  // Then create it now, by its default value
+
462 
+
463  Value* tmp = ParseValue(pc.second.defaultValue, &pc.second);
+
464  parameters.insert(std::pair<std::string, Parameter*>(
+
465  pc.second.key,
+
466  new Parameter(pc.second.key, tmp)
+
467  ));
+
468 
+
469  delete tmp;
+
470  tmp = nullptr;
+
471  }
+
472  // So we do not have a default value...
+
473  else
+
474  {
+
475  // Is it important to have the missing parameter?
+
476  if (pc.second.required)
+
477  // Throw an error message then
+
478  throw HazelnuppConstraintMissingValue(pc.second.key);
+
479  }
+
480  }
+
481 
+
482  return;
+
483 }
+
484 
+
485 const std::string& Hazelnupp::GetExecutableName() const
+
486 {
+
487  return executableName;
+
488 }
+
489 
+
490 const Value& Hazelnupp::operator[](const std::string& key) const
+
491 {
+
492  // Throw exception if param is unknown
+
493  if (!HasParam(key))
+
494  throw HazelnuppInvalidKeyException();
+
495 
+
496  return *parameters.find(key)->second->GetValue();
+
497 }
+
498 
+
499 void Hazelnupp::RegisterAbbreviation(const std::string& abbrev, const std::string& target)
+
500 {
+
501  abbreviations.insert(std::pair<std::string, std::string>(abbrev, target));
+
502  return;
+
503 }
+
504 
+
505 const std::string& Hazelnupp::GetAbbreviation(const std::string& abbrev) const
+
506 {
+
507  return abbreviations.find(abbrev)->second;
+
508 }
+
509 
+
510 bool Hazelnupp::HasAbbreviation(const std::string& abbrev) const
+
511 {
+
512  return abbreviations.find(abbrev) != abbreviations.end();
+
513 }
+
514 
+
515 void Hazelnupp::ClearAbbreviations()
+
516 {
+
517  abbreviations.clear();
+
518  return;
+
519 }
+
520 
+
521 void Hazelnupp::RegisterConstraints(const std::vector<ParamConstraint>& constraints)
+
522 {
+
523  for (const ParamConstraint& pc : constraints)
+
524  {
+
525  // Does this constraint already exist?
+
526  const auto constraint = this->constraints.find(pc.key);
+
527  // If yes, replace it.
+
528  if (constraint != this->constraints.end())
+
529  constraint->second = pc;
+
530 
+
531  // Else, create a new pair
+
532  else
+
533  this->constraints.insert(std::pair<std::string, ParamConstraint>(
+
534  pc.key,
+
535  pc
+
536  ));
+
537  }
+
538 
+
539  return;
+
540 }
+
541 
+
542 void Hazelnupp::ClearConstraints()
+
543 {
+
544  constraints.clear();
+
545  return;
+
546 }
+
547 
+
548 void Hazelnupp::SetCrashOnFail(bool crashOnFail)
+
549 {
+
550  this->crashOnFail = crashOnFail;
+
551  return;
+
552 }
+
553 
+
554 const ParamConstraint* Hazelnupp::GetConstraintForKey(const std::string& key) const
+
555 {
+
556  const auto constraint = constraints.find(key);
+
557 
+
558  if (constraint == constraints.end())
+
559  return nullptr;
+
560 
+
561  return &constraint->second;
+
562 }
HazelnuppException.h
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::IntValue
Specializations for integer values (uses long long int)
Definition: IntValue.h:8
Hazelnp::StringTools::IsNumeric
static bool IsNumeric(const std::string &str, const bool allowDecimalPoint=false)
Will return true if the given string consists only of digits (including signage)
Definition: StringTools.cpp:56
Hazelnp::StringTools::ParseNumber
static bool ParseNumber(const std::string &str, bool &out_isInt, long double &out_number)
Will convert the number in str to a number.
Definition: StringTools.cpp:82
-
Hazelnp::Hazelnupp::ClearConstraints
void ClearConstraints()
Will delete all constraints.
Definition: Hazelnupp.cpp:375
+
Hazelnp::Hazelnupp::GetBriefDescription
const std::string & GetBriefDescription()
Returns the brief description of the application to be automatically added to the documentation.
Definition: Hazelnupp.cpp:312
+
Hazelnp::Hazelnupp::ClearConstraints
void ClearConstraints()
Will delete all constraints.
Definition: Hazelnupp.cpp:542
Hazelnp::HazelnuppInvalidKeyException
Gets thrown when an non-existent key gets dereferenced.
Definition: HazelnuppException.h:26
-
Hazelnp::Hazelnupp::GetExecutableName
const std::string & GetExecutableName() const
Will return argv[0], the name of the executable.
Definition: Hazelnupp.cpp:318
+
Hazelnp::Hazelnupp::GetExecutableName
const std::string & GetExecutableName() const
Will return argv[0], the name of the executable.
Definition: Hazelnupp.cpp:485
+
Hazelnp::Hazelnupp::GenerateDocumentation
std::string GenerateDocumentation() const
Will generate a text-based documentation suited to show the user, for example on –help.
Definition: Hazelnupp.cpp:342
Hazelnp::Hazelnupp::~Hazelnupp
~Hazelnupp()
Definition: Hazelnupp.cpp:25
-
Hazelnp::Hazelnupp::operator[]
const Value & operator[](const std::string &key) const
Will return the value given a key.
Definition: Hazelnupp.cpp:323
+
Hazelnp::Hazelnupp::operator[]
const Value & operator[](const std::string &key) const
Will return the value given a key.
Definition: Hazelnupp.cpp:490
StringValue.h
Hazelnp::HazelnuppException::What
const std::string & What() const
Will return an error message.
Definition: HazelnuppException.h:15
IntValue.h
Hazelnp::Hazelnupp::Hazelnupp
Hazelnupp()
Definition: Hazelnupp.cpp:14
-
Hazelnp::Hazelnupp::ClearAbbreviations
void ClearAbbreviations()
Will delete all abbreviations.
Definition: Hazelnupp.cpp:348
+
Hazelnp::Hazelnupp::ClearAbbreviations
void ClearAbbreviations()
Will delete all abbreviations.
Definition: Hazelnupp.cpp:515
Hazelnp::DATA_TYPE::VOID
@ VOID
Hazelnp::FloatValue
Specializations for floating point values (uses long double)
Definition: FloatValue.h:9
+
Hazelnp::Hazelnupp::SetBriefDescription
void SetBriefDescription(const std::string &description)
Sets a brief description of the application to be automatically added to the documentation.
Definition: Hazelnupp.cpp:306
Hazelnp::Value
Abstract class for values.
Definition: Value.h:10
-
Hazelnp::Hazelnupp::GetCrashOnFail
bool GetCrashOnFail() const
Gets whether the application crashes on an exception whilst parsing, and prints to stderr.
Definition: Hazelnupp.cpp:279
+
Hazelnp::Hazelnupp::GetCrashOnFail
bool GetCrashOnFail() const
Gets whether the application crashes on an exception whilst parsing, and prints to stderr.
Definition: Hazelnupp.cpp:290
+
Hazelnp::Hazelnupp::SetCatchHelp
void SetCatchHelp(bool catchHelp)
Sets whether the Hazelnupp should automatically catch the –help parameter, print the parameter docume...
Definition: Hazelnupp.cpp:295
+
Hazelnp::Hazelnupp::GetCatchHelp
bool GetCatchHelp() const
Retruns whether the Hazelnupp should automatically catch the –help parameter, print the parameter doc...
Definition: Hazelnupp.cpp:301
Hazelnp::DATA_TYPE::LIST
@ LIST
Hazelnp::Parameter
Definition: Parameter.h:8
Hazelnp::ParamConstraint::wantedType
DATA_TYPE wantedType
Constrain the parameter to this value. Requires constrainType to be set to true.
Definition: ParamConstraint.h:57
Hazelnp::ParamConstraint
Definition: ParamConstraint.h:8
-
Hazelnp::Hazelnupp::HasParam
bool HasParam(const std::string &key) const
Will check wether a parameter exists given a key, or not.
Definition: Hazelnupp.cpp:153
+
Hazelnp::Hazelnupp::HasParam
bool HasParam(const std::string &key) const
Will check wether a parameter exists given a key, or not.
Definition: Hazelnupp.cpp:164
Hazelnp::Hazelnupp::Parse
void Parse(const int argc, const char *const *argv)
Will parse command line arguments.
Definition: Hazelnupp.cpp:35
ListValue.h
Hazelnp::ParamConstraint::constrainType
bool constrainType
Should this parameter be forced to be of a certain type? Remember to set constrainTo to the wanted ...
Definition: ParamConstraint.h:54
Hazelnp::Parameter::Key
const std::string & Key() const
Will return the key of this parameter.
Definition: Parameter.cpp:21
Hazelnp::HazelnuppConstraintMissingValue
Gets thrown when a parameter constrained to be required is not provided, and has no default value set...
Definition: HazelnuppException.h:62
-
Hazelnp::Hazelnupp::RegisterAbbreviation
void RegisterAbbreviation(const std::string &abbrev, const std::string &target)
Will register an abbreviation (like -f for –force)
Definition: Hazelnupp.cpp:332
+
Hazelnp::Hazelnupp::RegisterAbbreviation
void RegisterAbbreviation(const std::string &abbrev, const std::string &target)
Will register an abbreviation (like -f for –force)
Definition: Hazelnupp.cpp:499
Hazelnp::HazelnuppConstraintTypeMissmatch
Gets thrown when a parameter is of a type that does not match the required type, and is not convertib...
Definition: HazelnuppException.h:53
VoidValue.h
-
Hazelnp::Hazelnupp::RegisterConstraints
void RegisterConstraints(const std::vector< ParamConstraint > &constraints)
Will register parameter constraints.
Definition: Hazelnupp.cpp:354
-
Hazelnp::Hazelnupp::GetAbbreviation
const std::string & GetAbbreviation(const std::string &abbrev) const
Will return the long form of an abbreviation (like –force for -f)
Definition: Hazelnupp.cpp:338
+
Hazelnp::Hazelnupp::RegisterConstraints
void RegisterConstraints(const std::vector< ParamConstraint > &constraints)
Will register parameter constraints.
Definition: Hazelnupp.cpp:521
+
Hazelnp::Hazelnupp::GetAbbreviation
const std::string & GetAbbreviation(const std::string &abbrev) const
Will return the long form of an abbreviation (like –force for -f)
Definition: Hazelnupp.cpp:505
Hazelnupp.h
Hazelnp::ListValue::AddValue
void AddValue(const Value *value)
Will add this value to the list.
Definition: ListValue.cpp:33
Hazelnp::VoidValue
Specializations for void values.
Definition: VoidValue.h:8
Hazelnp::DATA_TYPE::FLOAT
@ FLOAT
Hazelnp::DATA_TYPE::INT
@ INT
+
Hazelnp::Hazelnupp::ClearDescription
void ClearDescription(const std::string &parameter)
Will delete the description of a parameter if it exists.
Definition: Hazelnupp.cpp:335
FloatValue.h
-
Hazelnp::Hazelnupp::HasAbbreviation
bool HasAbbreviation(const std::string &abbrev) const
Will check wether or not an abbreviation is registered.
Definition: Hazelnupp.cpp:343
+
Hazelnp::Hazelnupp::HasAbbreviation
bool HasAbbreviation(const std::string &abbrev) const
Will check wether or not an abbreviation is registered.
Definition: Hazelnupp.cpp:510
Hazelnp::DATA_TYPE::STRING
@ STRING
-
Hazelnp::Hazelnupp::SetCrashOnFail
void SetCrashOnFail(bool crashOnFail)
Sets whether to crash the application, and print to stderr, when an exception is raised whilst parsin...
Definition: Hazelnupp.cpp:381
+
Hazelnp::Hazelnupp::SetCrashOnFail
void SetCrashOnFail(bool crashOnFail)
Sets whether to crash the application, and print to stderr, when an exception is raised whilst parsin...
Definition: Hazelnupp.cpp:548
+
Hazelnp::Hazelnupp::RegisterDescription
void RegisterDescription(const std::string &parameter, const std::string &description)
Willl register a short description for a parameter.
Definition: Hazelnupp.cpp:317
+
Hazelnp::Hazelnupp::GetDescription
const std::string GetDescription(const std::string &parameter) const
Will return a short description for a parameter, if it exists.
Definition: Hazelnupp.cpp:323
+
Hazelnp::DataTypeToString
static std::string DataTypeToString(DATA_TYPE type)
Definition: DataType.h:17
Hazelnp::ListValue
Specializations for list values (uses std::vector<Value*>)
Definition: ListValue.h:9
Hazelnp::StringValue
Specializations for string values (uses std::string)
Definition: StringValue.h:9
StringTools.h
diff --git a/docs/Hazelnupp_8h.html b/docs/Hazelnupp_8h.html index cc03848..d242aa6 100644 --- a/docs/Hazelnupp_8h.html +++ b/docs/Hazelnupp_8h.html @@ -90,15 +90,15 @@ Include dependency graph for Hazelnupp.h:
- - - - - - - - - + + + + + + + + +
@@ -128,7 +128,7 @@ Namespaces
diff --git a/docs/Hazelnupp_8h__incl.map b/docs/Hazelnupp_8h__incl.map index e2be8dd..3538a54 100644 --- a/docs/Hazelnupp_8h__incl.map +++ b/docs/Hazelnupp_8h__incl.map @@ -1,11 +1,11 @@ - - - - - - - - - + + + + + + + + + diff --git a/docs/Hazelnupp_8h__incl.md5 b/docs/Hazelnupp_8h__incl.md5 index f39864f..49dadf1 100644 --- a/docs/Hazelnupp_8h__incl.md5 +++ b/docs/Hazelnupp_8h__incl.md5 @@ -1 +1 @@ -1ce9845c7ab32e24bfb9df598b5bdad8 \ No newline at end of file +845ac1274f12c8f52f49584ce1233b40 \ No newline at end of file diff --git a/docs/Hazelnupp_8h__incl.png b/docs/Hazelnupp_8h__incl.png index 483b066..ab8c762 100644 Binary files a/docs/Hazelnupp_8h__incl.png and b/docs/Hazelnupp_8h__incl.png differ diff --git a/docs/Hazelnupp_8h_source.html b/docs/Hazelnupp_8h_source.html index d47518c..e412ce3 100644 --- a/docs/Hazelnupp_8h_source.html +++ b/docs/Hazelnupp_8h_source.html @@ -119,58 +119,86 @@ $(function() {
53 
55  bool GetCrashOnFail() const;
56 
-
57  private:
-
59  void PopulateRawArgs(const int argc, const char* const* argv);
-
60 
-
62  void ExpandAbbreviations();
-
63 
-
65  std::size_t ParseNextParameter(const std::size_t parIndex, Parameter*& out_Par);
-
66 
-
68  Value* ParseValue(const std::vector<std::string>& values, const ParamConstraint* constraint = nullptr);
-
69 
-
71  void ApplyConstraints();
+
58  void SetCatchHelp(bool catchHelp);
+
59 
+
61  bool GetCatchHelp() const;
+
62 
+
64  void SetBriefDescription(const std::string& description);
+
65 
+
67  const std::string& GetBriefDescription();
+
68 
+
71  void RegisterDescription(const std::string& parameter, const std::string& description);
72 
-
74  const ParamConstraint* GetConstraintForKey(const std::string& key) const;
-
75 
-
76  std::string executableName;
-
77  std::unordered_map<std::string, Parameter*> parameters;
-
78 
-
79  // These are abbreviations. Like, -f for --force.
-
80  std::unordered_map<std::string, std::string> abbreviations;
-
81 
-
82  // Parameter constraints, mapped to keys
-
83  std::unordered_map<std::string, ParamConstraint> constraints;
-
84 
-
85  std::vector<std::string> rawArgs;
+
75  const std::string GetDescription(const std::string& parameter) const;
+
76 
+
78  void ClearDescription(const std::string& parameter);
+
79 
+
81  std::string GenerateDocumentation() const;
+
82 
+
83  private:
+
85  void PopulateRawArgs(const int argc, const char* const* argv);
86 
-
88  bool crashOnFail = true;
-
89  };
-
90 }
+
88  void ExpandAbbreviations();
+
89 
+
91  std::size_t ParseNextParameter(const std::size_t parIndex, Parameter*& out_Par);
+
92 
+
94  Value* ParseValue(const std::vector<std::string>& values, const ParamConstraint* constraint = nullptr);
+
95 
+
97  void ApplyConstraints();
+
98 
+
100  const ParamConstraint* GetConstraintForKey(const std::string& key) const;
+
101 
+
102  std::string executableName;
+
103  std::unordered_map<std::string, Parameter*> parameters;
+
104 
+
106  std::unordered_map<std::string, std::string> abbreviations;
+
107 
+
109  std::unordered_map<std::string, ParamConstraint> constraints;
+
110 
+
112  std::vector<std::string> rawArgs;
+
113 
+
115  std::unordered_map<std::string, std::string> parameterDescriptions;
+
116 
+
118  std::string briefDescription;
+
119 
+
121  bool catchHelp = true;
+
122 
+
124  bool crashOnFail = true;
+
125  };
+
126 }
-
Hazelnp
Definition: DataType.h:3
-
Hazelnp::Hazelnupp::ClearConstraints
void ClearConstraints()
Will delete all constraints.
Definition: Hazelnupp.cpp:375
-
Hazelnp::Hazelnupp::GetExecutableName
const std::string & GetExecutableName() const
Will return argv[0], the name of the executable.
Definition: Hazelnupp.cpp:318
+
Hazelnp
Definition: DataType.h:4
+
Hazelnp::Hazelnupp::GetBriefDescription
const std::string & GetBriefDescription()
Returns the brief description of the application to be automatically added to the documentation.
Definition: Hazelnupp.cpp:312
+
Hazelnp::Hazelnupp::ClearConstraints
void ClearConstraints()
Will delete all constraints.
Definition: Hazelnupp.cpp:542
+
Hazelnp::Hazelnupp::GetExecutableName
const std::string & GetExecutableName() const
Will return argv[0], the name of the executable.
Definition: Hazelnupp.cpp:485
+
Hazelnp::Hazelnupp::GenerateDocumentation
std::string GenerateDocumentation() const
Will generate a text-based documentation suited to show the user, for example on –help.
Definition: Hazelnupp.cpp:342
Hazelnp::Hazelnupp::~Hazelnupp
~Hazelnupp()
Definition: Hazelnupp.cpp:25
-
Hazelnp::Hazelnupp::operator[]
const Value & operator[](const std::string &key) const
Will return the value given a key.
Definition: Hazelnupp.cpp:323
+
Hazelnp::Hazelnupp::operator[]
const Value & operator[](const std::string &key) const
Will return the value given a key.
Definition: Hazelnupp.cpp:490
Hazelnp::Hazelnupp
The main class to interface with.
Definition: Hazelnupp.h:11
Hazelnp::Hazelnupp::Hazelnupp
Hazelnupp()
Definition: Hazelnupp.cpp:14
-
Hazelnp::Hazelnupp::ClearAbbreviations
void ClearAbbreviations()
Will delete all abbreviations.
Definition: Hazelnupp.cpp:348
+
Hazelnp::Hazelnupp::ClearAbbreviations
void ClearAbbreviations()
Will delete all abbreviations.
Definition: Hazelnupp.cpp:515
+
Hazelnp::Hazelnupp::SetBriefDescription
void SetBriefDescription(const std::string &description)
Sets a brief description of the application to be automatically added to the documentation.
Definition: Hazelnupp.cpp:306
Hazelnp::Value
Abstract class for values.
Definition: Value.h:10
ParamConstraint.h
-
Hazelnp::Hazelnupp::GetCrashOnFail
bool GetCrashOnFail() const
Gets whether the application crashes on an exception whilst parsing, and prints to stderr.
Definition: Hazelnupp.cpp:279
+
Hazelnp::Hazelnupp::GetCrashOnFail
bool GetCrashOnFail() const
Gets whether the application crashes on an exception whilst parsing, and prints to stderr.
Definition: Hazelnupp.cpp:290
+
Hazelnp::Hazelnupp::SetCatchHelp
void SetCatchHelp(bool catchHelp)
Sets whether the Hazelnupp should automatically catch the –help parameter, print the parameter docume...
Definition: Hazelnupp.cpp:295
+
Hazelnp::Hazelnupp::GetCatchHelp
bool GetCatchHelp() const
Retruns whether the Hazelnupp should automatically catch the –help parameter, print the parameter doc...
Definition: Hazelnupp.cpp:301
Hazelnp::Parameter
Definition: Parameter.h:8
Hazelnp::ParamConstraint
Definition: ParamConstraint.h:8
-
Hazelnp::Hazelnupp::HasParam
bool HasParam(const std::string &key) const
Will check wether a parameter exists given a key, or not.
Definition: Hazelnupp.cpp:153
+
Hazelnp::Hazelnupp::HasParam
bool HasParam(const std::string &key) const
Will check wether a parameter exists given a key, or not.
Definition: Hazelnupp.cpp:164
Hazelnp::Hazelnupp::Parse
void Parse(const int argc, const char *const *argv)
Will parse command line arguments.
Definition: Hazelnupp.cpp:35
-
Hazelnp::Hazelnupp::RegisterAbbreviation
void RegisterAbbreviation(const std::string &abbrev, const std::string &target)
Will register an abbreviation (like -f for –force)
Definition: Hazelnupp.cpp:332
-
Hazelnp::Hazelnupp::RegisterConstraints
void RegisterConstraints(const std::vector< ParamConstraint > &constraints)
Will register parameter constraints.
Definition: Hazelnupp.cpp:354
-
Hazelnp::Hazelnupp::GetAbbreviation
const std::string & GetAbbreviation(const std::string &abbrev) const
Will return the long form of an abbreviation (like –force for -f)
Definition: Hazelnupp.cpp:338
+
Hazelnp::Hazelnupp::RegisterAbbreviation
void RegisterAbbreviation(const std::string &abbrev, const std::string &target)
Will register an abbreviation (like -f for –force)
Definition: Hazelnupp.cpp:499
+
Hazelnp::Hazelnupp::RegisterConstraints
void RegisterConstraints(const std::vector< ParamConstraint > &constraints)
Will register parameter constraints.
Definition: Hazelnupp.cpp:521
+
Hazelnp::Hazelnupp::GetAbbreviation
const std::string & GetAbbreviation(const std::string &abbrev) const
Will return the long form of an abbreviation (like –force for -f)
Definition: Hazelnupp.cpp:505
Parameter.h
-
Hazelnp::Hazelnupp::HasAbbreviation
bool HasAbbreviation(const std::string &abbrev) const
Will check wether or not an abbreviation is registered.
Definition: Hazelnupp.cpp:343
-
Hazelnp::Hazelnupp::SetCrashOnFail
void SetCrashOnFail(bool crashOnFail)
Sets whether to crash the application, and print to stderr, when an exception is raised whilst parsin...
Definition: Hazelnupp.cpp:381
+
Hazelnp::Hazelnupp::ClearDescription
void ClearDescription(const std::string &parameter)
Will delete the description of a parameter if it exists.
Definition: Hazelnupp.cpp:335
+
Hazelnp::Hazelnupp::HasAbbreviation
bool HasAbbreviation(const std::string &abbrev) const
Will check wether or not an abbreviation is registered.
Definition: Hazelnupp.cpp:510
+
Hazelnp::Hazelnupp::SetCrashOnFail
void SetCrashOnFail(bool crashOnFail)
Sets whether to crash the application, and print to stderr, when an exception is raised whilst parsin...
Definition: Hazelnupp.cpp:548
+
Hazelnp::Hazelnupp::RegisterDescription
void RegisterDescription(const std::string &parameter, const std::string &description)
Willl register a short description for a parameter.
Definition: Hazelnupp.cpp:317
+
Hazelnp::Hazelnupp::GetDescription
const std::string GetDescription(const std::string &parameter) const
Will return a short description for a parameter, if it exists.
Definition: Hazelnupp.cpp:323
diff --git a/docs/IntValue_8cpp.html b/docs/IntValue_8cpp.html index c01f930..c2dc074 100644 --- a/docs/IntValue_8cpp.html +++ b/docs/IntValue_8cpp.html @@ -94,6 +94,7 @@ Include dependency graph for IntValue.cpp: + @@ -102,7 +103,7 @@ Include dependency graph for IntValue.cpp: diff --git a/docs/IntValue_8cpp__incl.map b/docs/IntValue_8cpp__incl.map index 287f93f..361a645 100644 --- a/docs/IntValue_8cpp__incl.map +++ b/docs/IntValue_8cpp__incl.map @@ -1,11 +1,12 @@ - - + + - - - + + + + diff --git a/docs/IntValue_8cpp__incl.md5 b/docs/IntValue_8cpp__incl.md5 index ca0299a..4549b7e 100644 --- a/docs/IntValue_8cpp__incl.md5 +++ b/docs/IntValue_8cpp__incl.md5 @@ -1 +1 @@ -a513bf2aa6a8c4f9e291d3f6fb3798e4 \ No newline at end of file +46b201dfccb538f85488eed18fcb495b \ No newline at end of file diff --git a/docs/IntValue_8cpp__incl.png b/docs/IntValue_8cpp__incl.png index 5f5a94f..5ee0247 100644 Binary files a/docs/IntValue_8cpp__incl.png and b/docs/IntValue_8cpp__incl.png differ diff --git a/docs/IntValue_8cpp_source.html b/docs/IntValue_8cpp_source.html index 08da8d4..03c62c5 100644 --- a/docs/IntValue_8cpp_source.html +++ b/docs/IntValue_8cpp_source.html @@ -156,7 +156,7 @@ $(function() {
HazelnuppException.h
Hazelnp::IntValue::GetAsOsString
std::string GetAsOsString() const override
Will return a string suitable for an std::ostream;.
Definition: IntValue.cpp:20
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::IntValue::GetFloat32
double GetFloat32() const override
Will return the data as a double.
Definition: IntValue.cpp:59
IntValue.h
Hazelnp::IntValue::IntValue
IntValue(const long long int &value)
Definition: IntValue.cpp:7
@@ -169,11 +169,11 @@ $(function() {
Hazelnp::IntValue::GetValue
const long long int & GetValue() const
Will return the raw value.
Definition: IntValue.cpp:27
Hazelnp::IntValue::Deepcopy
Value * Deepcopy() const override
Will return a deeopopy of this object.
Definition: IntValue.cpp:15
Hazelnp::DATA_TYPE::INT
@ INT
-
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:7
+
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:8
Hazelnp::HazelnuppValueNotConvertibleException
Gets thrown when an attempt is made to retrieve the wrong data type from a value, when the value not ...
Definition: HazelnuppException.h:35
diff --git a/docs/IntValue_8h.html b/docs/IntValue_8h.html index c2f4ee5..1d03d80 100644 --- a/docs/IntValue_8h.html +++ b/docs/IntValue_8h.html @@ -92,6 +92,7 @@ Include dependency graph for IntValue.h: +
@@ -122,7 +123,7 @@ Namespaces
diff --git a/docs/IntValue_8h__incl.map b/docs/IntValue_8h__incl.map index b98a5c5..b246bc4 100644 --- a/docs/IntValue_8h__incl.map +++ b/docs/IntValue_8h__incl.map @@ -2,6 +2,7 @@ - - + + + diff --git a/docs/IntValue_8h__incl.md5 b/docs/IntValue_8h__incl.md5 index 4f49589..0173fa1 100644 --- a/docs/IntValue_8h__incl.md5 +++ b/docs/IntValue_8h__incl.md5 @@ -1 +1 @@ -caf40a9d83fa450c538f6eb146b29652 \ No newline at end of file +01877cbc4116c27e4712daf7947a4545 \ No newline at end of file diff --git a/docs/IntValue_8h__incl.png b/docs/IntValue_8h__incl.png index c565f06..c562779 100644 Binary files a/docs/IntValue_8h__incl.png and b/docs/IntValue_8h__incl.png differ diff --git a/docs/IntValue_8h_source.html b/docs/IntValue_8h_source.html index e08a2cd..79b3f18 100644 --- a/docs/IntValue_8h_source.html +++ b/docs/IntValue_8h_source.html @@ -115,7 +115,7 @@ $(function() {
46 }
Hazelnp::IntValue::GetAsOsString
std::string GetAsOsString() const override
Will return a string suitable for an std::ostream;.
Definition: IntValue.cpp:20
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::IntValue
Specializations for integer values (uses long long int)
Definition: IntValue.h:8
Hazelnp::IntValue::GetFloat32
double GetFloat32() const override
Will return the data as a double.
Definition: IntValue.cpp:59
Hazelnp::IntValue::~IntValue
~IntValue() override
Definition: IntValue.h:12
@@ -131,7 +131,7 @@ $(function() {
Value.h
diff --git a/docs/ListValue_8cpp.html b/docs/ListValue_8cpp.html index 604b6ac..f6b980c 100644 --- a/docs/ListValue_8cpp.html +++ b/docs/ListValue_8cpp.html @@ -94,6 +94,7 @@ Include dependency graph for ListValue.cpp: + @@ -102,7 +103,7 @@ Include dependency graph for ListValue.cpp: diff --git a/docs/ListValue_8cpp__incl.map b/docs/ListValue_8cpp__incl.map index b0c8d9b..b4fb33b 100644 --- a/docs/ListValue_8cpp__incl.map +++ b/docs/ListValue_8cpp__incl.map @@ -1,11 +1,12 @@ - - + + - + - - + + + diff --git a/docs/ListValue_8cpp__incl.md5 b/docs/ListValue_8cpp__incl.md5 index 1d088a2..06a7458 100644 --- a/docs/ListValue_8cpp__incl.md5 +++ b/docs/ListValue_8cpp__incl.md5 @@ -1 +1 @@ -12fd1618e97deaecd680b70f119f5cac \ No newline at end of file +a0b55bdc8f1790e8ef890579e14f3ea9 \ No newline at end of file diff --git a/docs/ListValue_8cpp__incl.png b/docs/ListValue_8cpp__incl.png index 441db2b..90240b4 100644 Binary files a/docs/ListValue_8cpp__incl.png and b/docs/ListValue_8cpp__incl.png differ diff --git a/docs/ListValue_8cpp_source.html b/docs/ListValue_8cpp_source.html index 87d96b2..1198024 100644 --- a/docs/ListValue_8cpp_source.html +++ b/docs/ListValue_8cpp_source.html @@ -178,7 +178,7 @@ $(function() {
Hazelnp::ListValue::GetAsOsString
std::string GetAsOsString() const override
Will return a string suitable for an std::ostream;.
Definition: ListValue.cpp:44
HazelnuppException.h
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::ListValue::GetFloat32
double GetFloat32() const override
Throws HazelnuppValueNotConvertibleException.
Definition: ListValue.cpp:84
Hazelnp::ListValue::GetString
std::string GetString() const override
Throws HazelnuppValueNotConvertibleException.
Definition: ListValue.cpp:89
Hazelnp::ListValue::GetList
const std::vector< Value * > & GetList() const override
Will return this values list.
Definition: ListValue.cpp:94
@@ -190,7 +190,7 @@ $(function() {
ListValue.h
Hazelnp::ListValue::AddValue
void AddValue(const Value *value)
Will add this value to the list.
Definition: ListValue.cpp:33
Hazelnp::ListValue::~ListValue
~ListValue() override
Definition: ListValue.cpp:13
-
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:7
+
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:8
Hazelnp::ListValue::ListValue
ListValue()
Definition: ListValue.cpp:7
Hazelnp::ListValue::Deepcopy
Value * Deepcopy() const override
Will return a deeopopy of this object.
Definition: ListValue.cpp:23
Hazelnp::Value::Deepcopy
virtual Value * Deepcopy() const =0
Will return a deeopopy of this object.
@@ -199,7 +199,7 @@ $(function() {
Hazelnp::HazelnuppValueNotConvertibleException
Gets thrown when an attempt is made to retrieve the wrong data type from a value, when the value not ...
Definition: HazelnuppException.h:35
diff --git a/docs/ListValue_8h.html b/docs/ListValue_8h.html index 2eb1c1f..163c4b2 100644 --- a/docs/ListValue_8h.html +++ b/docs/ListValue_8h.html @@ -93,6 +93,7 @@ Include dependency graph for ListValue.h: +
@@ -122,7 +123,7 @@ Namespaces
diff --git a/docs/ListValue_8h__incl.map b/docs/ListValue_8h__incl.map index 9cefd6a..34f16d6 100644 --- a/docs/ListValue_8h__incl.map +++ b/docs/ListValue_8h__incl.map @@ -1,7 +1,8 @@ - + - + + diff --git a/docs/ListValue_8h__incl.md5 b/docs/ListValue_8h__incl.md5 index 50099b1..2334444 100644 --- a/docs/ListValue_8h__incl.md5 +++ b/docs/ListValue_8h__incl.md5 @@ -1 +1 @@ -1f357c8bbe0826b683d0428f992ad690 \ No newline at end of file +1ba6aca83c254dd89645ea4110f26a39 \ No newline at end of file diff --git a/docs/ListValue_8h__incl.png b/docs/ListValue_8h__incl.png index 32cc822..9a90276 100644 Binary files a/docs/ListValue_8h__incl.png and b/docs/ListValue_8h__incl.png differ diff --git a/docs/ListValue_8h_source.html b/docs/ListValue_8h_source.html index 7eed798..1eca1aa 100644 --- a/docs/ListValue_8h_source.html +++ b/docs/ListValue_8h_source.html @@ -116,7 +116,7 @@ $(function() {
48 }
Hazelnp::ListValue::GetAsOsString
std::string GetAsOsString() const override
Will return a string suitable for an std::ostream;.
Definition: ListValue.cpp:44
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::ListValue::GetFloat32
double GetFloat32() const override
Throws HazelnuppValueNotConvertibleException.
Definition: ListValue.cpp:84
Hazelnp::ListValue::GetString
std::string GetString() const override
Throws HazelnuppValueNotConvertibleException.
Definition: ListValue.cpp:89
Hazelnp::ListValue::GetList
const std::vector< Value * > & GetList() const override
Will return this values list.
Definition: ListValue.cpp:94
@@ -133,7 +133,7 @@ $(function() {
Value.h
diff --git a/docs/ParamConstraint_8h.html b/docs/ParamConstraint_8h.html index d1c6680..44610d7 100644 --- a/docs/ParamConstraint_8h.html +++ b/docs/ParamConstraint_8h.html @@ -89,10 +89,10 @@ Include dependency graph for ParamConstraint.h:
- + - - + +
@@ -122,7 +122,7 @@ Namespaces
diff --git a/docs/ParamConstraint_8h__incl.map b/docs/ParamConstraint_8h__incl.map index 0db6788..99d5b17 100644 --- a/docs/ParamConstraint_8h__incl.map +++ b/docs/ParamConstraint_8h__incl.map @@ -1,6 +1,6 @@ - + - - + + diff --git a/docs/ParamConstraint_8h__incl.md5 b/docs/ParamConstraint_8h__incl.md5 index e1a5448..e70d106 100644 --- a/docs/ParamConstraint_8h__incl.md5 +++ b/docs/ParamConstraint_8h__incl.md5 @@ -1 +1 @@ -112e8f880b838c8ff96327d435079d1f \ No newline at end of file +9d9204c024bc0136e4ef70b1bdecc7c4 \ No newline at end of file diff --git a/docs/ParamConstraint_8h__incl.png b/docs/ParamConstraint_8h__incl.png index 6c428db..9bbfeb8 100644 Binary files a/docs/ParamConstraint_8h__incl.png and b/docs/ParamConstraint_8h__incl.png differ diff --git a/docs/ParamConstraint_8h_source.html b/docs/ParamConstraint_8h_source.html index 71b48a9..a013063 100644 --- a/docs/ParamConstraint_8h_source.html +++ b/docs/ParamConstraint_8h_source.html @@ -133,7 +133,7 @@ $(function() {
67  };
68 }
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
DataType.h
Hazelnp::DATA_TYPE::VOID
@ VOID
Hazelnp::ParamConstraint::wantedType
DATA_TYPE wantedType
Constrain the parameter to this value. Requires constrainType to be set to true.
Definition: ParamConstraint.h:57
@@ -145,11 +145,11 @@ $(function() {
Hazelnp::ParamConstraint::Require
static ParamConstraint Require(const std::string &key, const std::vector< std::string > &defaultValue={}, bool required=true)
Constructs a require constraint.
Definition: ParamConstraint.h:16
Hazelnp::ParamConstraint::ParamConstraint
ParamConstraint(const std::string &key, bool constrainType, DATA_TYPE wantedType, const std::vector< std::string > &defaultValue, bool required)
Whole constructor.
Definition: ParamConstraint.h:38
Hazelnp::ParamConstraint::TypeSafety
static ParamConstraint TypeSafety(const std::string &key, DATA_TYPE wantedType, bool constrainType=true)
Constructs a type-safety constraint.
Definition: ParamConstraint.h:27
-
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:7
+
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:8
Hazelnp::ParamConstraint::defaultValue
std::vector< std::string > defaultValue
The default value for this parameter.
Definition: ParamConstraint.h:62
diff --git a/docs/Parameter_8cpp.html b/docs/Parameter_8cpp.html index 54ac716..e637ec9 100644 --- a/docs/Parameter_8cpp.html +++ b/docs/Parameter_8cpp.html @@ -84,11 +84,11 @@ Include dependency graph for Parameter.cpp:
- - - + + + + - @@ -98,7 +98,7 @@ Include dependency graph for Parameter.cpp:
diff --git a/docs/Parameter_8cpp__incl.map b/docs/Parameter_8cpp__incl.map index 7376c9f..1e97d23 100644 --- a/docs/Parameter_8cpp__incl.map +++ b/docs/Parameter_8cpp__incl.map @@ -1,9 +1,9 @@ - - - - - + + + + + - + diff --git a/docs/Parameter_8cpp__incl.md5 b/docs/Parameter_8cpp__incl.md5 index 42ec160..2cbf985 100644 --- a/docs/Parameter_8cpp__incl.md5 +++ b/docs/Parameter_8cpp__incl.md5 @@ -1 +1 @@ -89588e764ed7b9e840675c3b459cf4bc \ No newline at end of file +eef9313956abb82e5769561d6009dfd6 \ No newline at end of file diff --git a/docs/Parameter_8cpp__incl.png b/docs/Parameter_8cpp__incl.png index 5f79f28..72f481d 100644 Binary files a/docs/Parameter_8cpp__incl.png and b/docs/Parameter_8cpp__incl.png differ diff --git a/docs/Parameter_8cpp_source.html b/docs/Parameter_8cpp_source.html index 7cbd6fa..6b2dda0 100644 --- a/docs/Parameter_8cpp_source.html +++ b/docs/Parameter_8cpp_source.html @@ -108,7 +108,7 @@ $(function() {
28  return value;
29 }
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::Parameter::~Parameter
~Parameter()
Definition: Parameter.cpp:13
Hazelnp::Parameter::GetValue
const Value * GetValue() const
Will return the value of this parameter.
Definition: Parameter.cpp:26
Hazelnp::Parameter::Key
const std::string & Key() const
Will return the key of this parameter.
Definition: Parameter.cpp:21
@@ -116,7 +116,7 @@ $(function() {
Parameter.h
diff --git a/docs/Parameter_8h.html b/docs/Parameter_8h.html index c50f4b8..8377551 100644 --- a/docs/Parameter_8h.html +++ b/docs/Parameter_8h.html @@ -89,10 +89,10 @@ Include dependency graph for Parameter.h:
- - + + + - @@ -125,7 +125,7 @@ Namespaces
diff --git a/docs/Parameter_8h__incl.map b/docs/Parameter_8h__incl.map index 48c4f23..fabe3ea 100644 --- a/docs/Parameter_8h__incl.map +++ b/docs/Parameter_8h__incl.map @@ -1,8 +1,8 @@ - - - - + + + + - + diff --git a/docs/Parameter_8h__incl.md5 b/docs/Parameter_8h__incl.md5 index dd474e6..9c6d55d 100644 --- a/docs/Parameter_8h__incl.md5 +++ b/docs/Parameter_8h__incl.md5 @@ -1 +1 @@ -5a29230ca588044835e12098cae44dbe \ No newline at end of file +240c281ba511f80f96f83cc0e81d73ac \ No newline at end of file diff --git a/docs/Parameter_8h__incl.png b/docs/Parameter_8h__incl.png index 2b19eb5..9b0c902 100644 Binary files a/docs/Parameter_8h__incl.png and b/docs/Parameter_8h__incl.png differ diff --git a/docs/Parameter_8h_source.html b/docs/Parameter_8h_source.html index 33cd300..18bceab 100644 --- a/docs/Parameter_8h_source.html +++ b/docs/Parameter_8h_source.html @@ -106,7 +106,7 @@ $(function() {
28  };
29 }
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::Parameter::~Parameter
~Parameter()
Definition: Parameter.cpp:13
Hazelnp::Value
Abstract class for values.
Definition: Value.h:10
Hazelnp::Parameter
Definition: Parameter.h:8
@@ -117,7 +117,7 @@ $(function() {
Value.h
diff --git a/docs/Release_2Hazelnupp_8vcxproj_8FileListAbsolute_8txt.html b/docs/Release_2Hazelnupp_8vcxproj_8FileListAbsolute_8txt.html index f6a0671..410b570 100644 --- a/docs/Release_2Hazelnupp_8vcxproj_8FileListAbsolute_8txt.html +++ b/docs/Release_2Hazelnupp_8vcxproj_8FileListAbsolute_8txt.html @@ -77,7 +77,7 @@ $(function() { diff --git a/docs/StringTools_8cpp.html b/docs/StringTools_8cpp.html index 2ef1743..ab7356a 100644 --- a/docs/StringTools_8cpp.html +++ b/docs/StringTools_8cpp.html @@ -97,7 +97,7 @@ Include dependency graph for StringTools.cpp: diff --git a/docs/StringTools_8cpp_source.html b/docs/StringTools_8cpp_source.html index d7abd85..73c769b 100644 --- a/docs/StringTools_8cpp_source.html +++ b/docs/StringTools_8cpp_source.html @@ -266,7 +266,7 @@ $(function() {
186 }
Hazelnp::StringTools::Replace
static std::string Replace(const std::string &str, const char find, const std::string &subst)
Will replace a part of a string with another string.
Definition: StringTools.cpp:14
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::StringTools::IsNumeric
static bool IsNumeric(const std::string &str, const bool allowDecimalPoint=false)
Will return true if the given string consists only of digits (including signage)
Definition: StringTools.cpp:56
Hazelnp::StringTools::ParseNumber
static bool ParseNumber(const std::string &str, bool &out_isInt, long double &out_number)
Will convert the number in str to a number.
Definition: StringTools.cpp:82
Hazelnp::StringTools::Contains
static bool Contains(const std::string &str, const char c)
Will return wether or not a given char is in a string.
Definition: StringTools.cpp:5
@@ -275,7 +275,7 @@ $(function() {
Hazelnp::StringTools::ToLower
static std::string ToLower(const std::string &str)
Will make a string all lower-case.
Definition: StringTools.cpp:173
diff --git a/docs/StringTools_8h.html b/docs/StringTools_8h.html index acec948..c50c859 100644 --- a/docs/StringTools_8h.html +++ b/docs/StringTools_8h.html @@ -124,7 +124,7 @@ Namespaces diff --git a/docs/StringTools_8h_source.html b/docs/StringTools_8h_source.html index fda1c7d..49bb4df 100644 --- a/docs/StringTools_8h_source.html +++ b/docs/StringTools_8h_source.html @@ -108,7 +108,7 @@ $(function() {
40 }
Hazelnp::StringTools::Replace
static std::string Replace(const std::string &str, const char find, const std::string &subst)
Will replace a part of a string with another string.
Definition: StringTools.cpp:14
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::StringTools::IsNumeric
static bool IsNumeric(const std::string &str, const bool allowDecimalPoint=false)
Will return true if the given string consists only of digits (including signage)
Definition: StringTools.cpp:56
Hazelnp::StringTools::ParseNumber
static bool ParseNumber(const std::string &str, bool &out_isInt, long double &out_number)
Will convert the number in str to a number.
Definition: StringTools.cpp:82
Hazelnp::StringTools::Contains
static bool Contains(const std::string &str, const char c)
Will return wether or not a given char is in a string.
Definition: StringTools.cpp:5
@@ -117,7 +117,7 @@ $(function() {
Hazelnp::StringTools::ToLower
static std::string ToLower(const std::string &str)
Will make a string all lower-case.
Definition: StringTools.cpp:173
diff --git a/docs/StringValue_8cpp.html b/docs/StringValue_8cpp.html index aa80e76..67ef4cf 100644 --- a/docs/StringValue_8cpp.html +++ b/docs/StringValue_8cpp.html @@ -86,16 +86,16 @@ Include dependency graph for StringValue.cpp:
- - - - - - + + + + + + - +
@@ -103,7 +103,7 @@ Include dependency graph for StringValue.cpp: diff --git a/docs/StringValue_8cpp__incl.map b/docs/StringValue_8cpp__incl.map index cecdb13..824f3db 100644 --- a/docs/StringValue_8cpp__incl.map +++ b/docs/StringValue_8cpp__incl.map @@ -1,12 +1,12 @@ - - - - - - + + + + + + - - - + + + diff --git a/docs/StringValue_8cpp__incl.md5 b/docs/StringValue_8cpp__incl.md5 index c059726..0c3e1fc 100644 --- a/docs/StringValue_8cpp__incl.md5 +++ b/docs/StringValue_8cpp__incl.md5 @@ -1 +1 @@ -ba78d6fa329f3f88ca5a096174459af0 \ No newline at end of file +e3cce6d82cdc470c304a4c2f3aad7a1b \ No newline at end of file diff --git a/docs/StringValue_8cpp__incl.png b/docs/StringValue_8cpp__incl.png index 03913b0..5e8fa6e 100644 Binary files a/docs/StringValue_8cpp__incl.png and b/docs/StringValue_8cpp__incl.png differ diff --git a/docs/StringValue_8cpp_source.html b/docs/StringValue_8cpp_source.html index 2a49e8d..322eef8 100644 --- a/docs/StringValue_8cpp_source.html +++ b/docs/StringValue_8cpp_source.html @@ -147,7 +147,7 @@ $(function() {
67 }
HazelnuppException.h
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::StringValue::GetInt32
int GetInt32() const override
Throws HazelnuppValueNotConvertibleException.
Definition: StringValue.cpp:44
Hazelnp::StringValue::GetAsOsString
std::string GetAsOsString() const override
Will return a string suitable for an std::ostream;.
Definition: StringValue.cpp:20
Hazelnp::StringValue::StringValue
StringValue(const std::string &value)
Definition: StringValue.cpp:7
@@ -156,7 +156,7 @@ $(function() {
Hazelnp::StringValue::GetInt64
long long int GetInt64() const override
Throws HazelnuppValueNotConvertibleException.
Definition: StringValue.cpp:39
Hazelnp::StringValue::GetString
std::string GetString() const override
Will return this value as a string.
Definition: StringValue.cpp:59
Hazelnp::StringValue::GetFloat32
double GetFloat32() const override
Throws HazelnuppValueNotConvertibleException.
Definition: StringValue.cpp:54
-
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:7
+
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:8
Hazelnp::StringValue::Deepcopy
Value * Deepcopy() const override
Will return a deeopopy of this object.
Definition: StringValue.cpp:15
Hazelnp::DATA_TYPE::STRING
@ STRING
Hazelnp::StringValue::GetFloat64
long double GetFloat64() const override
Throws HazelnuppValueNotConvertibleException.
Definition: StringValue.cpp:49
@@ -165,7 +165,7 @@ $(function() {
Hazelnp::HazelnuppValueNotConvertibleException
Gets thrown when an attempt is made to retrieve the wrong data type from a value, when the value not ...
Definition: HazelnuppException.h:35
diff --git a/docs/StringValue_8h.html b/docs/StringValue_8h.html index 76c3edf..e414ed1 100644 --- a/docs/StringValue_8h.html +++ b/docs/StringValue_8h.html @@ -88,9 +88,9 @@ Include dependency graph for StringValue.h:
- - - + + + @@ -123,7 +123,7 @@ Namespaces
diff --git a/docs/StringValue_8h__incl.map b/docs/StringValue_8h__incl.map index 702afe8..d07717d 100644 --- a/docs/StringValue_8h__incl.map +++ b/docs/StringValue_8h__incl.map @@ -1,8 +1,8 @@ - - - + + + - - + + diff --git a/docs/StringValue_8h__incl.md5 b/docs/StringValue_8h__incl.md5 index faf7bf4..7016e1f 100644 --- a/docs/StringValue_8h__incl.md5 +++ b/docs/StringValue_8h__incl.md5 @@ -1 +1 @@ -e31f647cc6d6c07de8c0bf958d89e76c \ No newline at end of file +3091c398edee9f2e3c943dafdcded410 \ No newline at end of file diff --git a/docs/StringValue_8h__incl.png b/docs/StringValue_8h__incl.png index c3f7534..66f8e57 100644 Binary files a/docs/StringValue_8h__incl.png and b/docs/StringValue_8h__incl.png differ diff --git a/docs/StringValue_8h_source.html b/docs/StringValue_8h_source.html index 0b364a9..ce5f07a 100644 --- a/docs/StringValue_8h_source.html +++ b/docs/StringValue_8h_source.html @@ -113,7 +113,7 @@ $(function() {
44  };
45 }
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::StringValue::GetInt32
int GetInt32() const override
Throws HazelnuppValueNotConvertibleException.
Definition: StringValue.cpp:44
Hazelnp::StringValue::GetAsOsString
std::string GetAsOsString() const override
Will return a string suitable for an std::ostream;.
Definition: StringValue.cpp:20
Hazelnp::StringValue::StringValue
StringValue(const std::string &value)
Definition: StringValue.cpp:7
@@ -130,7 +130,7 @@ $(function() {
Value.h
diff --git a/docs/Value_8cpp.html b/docs/Value_8cpp.html index c55a566..beaf04e 100644 --- a/docs/Value_8cpp.html +++ b/docs/Value_8cpp.html @@ -89,6 +89,7 @@ Include dependency graph for Value.cpp: + @@ -96,7 +97,7 @@ Include dependency graph for Value.cpp: diff --git a/docs/Value_8cpp__incl.map b/docs/Value_8cpp__incl.map index 86cce41..c2c1829 100644 --- a/docs/Value_8cpp__incl.map +++ b/docs/Value_8cpp__incl.map @@ -2,6 +2,7 @@ - - + + + diff --git a/docs/Value_8cpp__incl.md5 b/docs/Value_8cpp__incl.md5 index 584f279..1c22e19 100644 --- a/docs/Value_8cpp__incl.md5 +++ b/docs/Value_8cpp__incl.md5 @@ -1 +1 @@ -69da090fe7fb4635fabe3680d01e5670 \ No newline at end of file +4cc537f22df28748abb702e213edf12b \ No newline at end of file diff --git a/docs/Value_8cpp__incl.png b/docs/Value_8cpp__incl.png index 3f235fd..57faa48 100644 Binary files a/docs/Value_8cpp__incl.png and b/docs/Value_8cpp__incl.png differ diff --git a/docs/Value_8cpp_source.html b/docs/Value_8cpp_source.html index 7197f78..c2731a5 100644 --- a/docs/Value_8cpp_source.html +++ b/docs/Value_8cpp_source.html @@ -94,15 +94,15 @@ $(function() {
14  return type;
15 }
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::Value::Value
Value(DATA_TYPE type)
Definition: Value.cpp:5
Hazelnp::Value::GetDataType
DATA_TYPE GetDataType() const
Will return the data type of this value.
Definition: Value.cpp:12
-
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:7
+
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:8
Hazelnp::Value::type
DATA_TYPE type
Definition: Value.h:48
Value.h
diff --git a/docs/Value_8h.html b/docs/Value_8h.html index 4fa9b9d..9cb24d0 100644 --- a/docs/Value_8h.html +++ b/docs/Value_8h.html @@ -93,6 +93,7 @@ Include dependency graph for Value.h: +
@@ -136,7 +137,7 @@ Namespaces
diff --git a/docs/Value_8h__incl.map b/docs/Value_8h__incl.map index be86f8e..b99434a 100644 --- a/docs/Value_8h__incl.map +++ b/docs/Value_8h__incl.map @@ -1,6 +1,7 @@ - - + + + diff --git a/docs/Value_8h__incl.md5 b/docs/Value_8h__incl.md5 index 8446cdf..16be7d7 100644 --- a/docs/Value_8h__incl.md5 +++ b/docs/Value_8h__incl.md5 @@ -1 +1 @@ -7bb92e5fe6cfc0f580f1f9e08772dd2c \ No newline at end of file +8a865d27021023f3bf0f841e7e4f7839 \ No newline at end of file diff --git a/docs/Value_8h__incl.png b/docs/Value_8h__incl.png index 5c98c28..462fd8a 100644 Binary files a/docs/Value_8h__incl.png and b/docs/Value_8h__incl.png differ diff --git a/docs/Value_8h_source.html b/docs/Value_8h_source.html index a856147..5d4b43a 100644 --- a/docs/Value_8h_source.html +++ b/docs/Value_8h_source.html @@ -118,7 +118,7 @@ $(function() {
49  };
50 }
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
DataType.h
Hazelnp::Value::GetFloat32
virtual double GetFloat32() const =0
Will attempt to return the floating-point data (double)
Hazelnp::Value
Abstract class for values.
Definition: Value.h:10
@@ -131,13 +131,13 @@ $(function() {
Hazelnp::Value::GetAsOsString
virtual std::string GetAsOsString() const =0
Will return a string suitable for an std::ostream.
Hazelnp::Value::GetList
virtual const std::vector< Value * > & GetList() const =0
Will attempt to return the list-data.
Hazelnp::Value::operator<<
friend std::ostream & operator<<(std::ostream &os, const Value &v)
Definition: Value.h:24
-
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:7
+
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:8
Hazelnp::Value::type
DATA_TYPE type
Definition: Value.h:48
Hazelnp::Value::Deepcopy
virtual Value * Deepcopy() const =0
Will return a deeopopy of this object.
Hazelnp::Value::GetFloat64
virtual long double GetFloat64() const =0
Will attempt to return the floating-point data (long double)
diff --git a/docs/VoidValue_8cpp.html b/docs/VoidValue_8cpp.html index 1fbc9c7..ced54f7 100644 --- a/docs/VoidValue_8cpp.html +++ b/docs/VoidValue_8cpp.html @@ -92,6 +92,7 @@ Include dependency graph for VoidValue.cpp: + @@ -100,7 +101,7 @@ Include dependency graph for VoidValue.cpp: diff --git a/docs/VoidValue_8cpp__incl.map b/docs/VoidValue_8cpp__incl.map index 7d66c73..19cc824 100644 --- a/docs/VoidValue_8cpp__incl.map +++ b/docs/VoidValue_8cpp__incl.map @@ -1,10 +1,11 @@ - + - - - + + + + diff --git a/docs/VoidValue_8cpp__incl.md5 b/docs/VoidValue_8cpp__incl.md5 index 778315c..2591bc5 100644 --- a/docs/VoidValue_8cpp__incl.md5 +++ b/docs/VoidValue_8cpp__incl.md5 @@ -1 +1 @@ -88a7c0ddfe48e0a540dc2f75215c7748 \ No newline at end of file +2fec468eae574bfc8c7374516d9bed26 \ No newline at end of file diff --git a/docs/VoidValue_8cpp__incl.png b/docs/VoidValue_8cpp__incl.png index cea727e..6869425 100644 Binary files a/docs/VoidValue_8cpp__incl.png and b/docs/VoidValue_8cpp__incl.png differ diff --git a/docs/VoidValue_8cpp_source.html b/docs/VoidValue_8cpp_source.html index e25bb9d..2c88f6a 100644 --- a/docs/VoidValue_8cpp_source.html +++ b/docs/VoidValue_8cpp_source.html @@ -133,7 +133,7 @@ $(function() {
53 }
HazelnuppException.h
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::VoidValue::GetInt64
long long int GetInt64() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:25
Hazelnp::VoidValue::GetFloat64
long double GetFloat64() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:35
Hazelnp::DATA_TYPE::VOID
@ VOID
@@ -144,13 +144,13 @@ $(function() {
VoidValue.h
Hazelnp::VoidValue::Deepcopy
Value * Deepcopy() const override
Will return a deeopopy of this object.
Definition: VoidValue.cpp:13
Hazelnp::VoidValue::GetString
std::string GetString() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:45
-
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:7
+
Hazelnp::DATA_TYPE
DATA_TYPE
The different data types a paramater can be.
Definition: DataType.h:8
Hazelnp::VoidValue::GetFloat32
double GetFloat32() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:40
Hazelnp::VoidValue::VoidValue
VoidValue()
Definition: VoidValue.cpp:6
Hazelnp::HazelnuppValueNotConvertibleException
Gets thrown when an attempt is made to retrieve the wrong data type from a value, when the value not ...
Definition: HazelnuppException.h:35
diff --git a/docs/VoidValue_8h.html b/docs/VoidValue_8h.html index 6b088c8..4dbcf80 100644 --- a/docs/VoidValue_8h.html +++ b/docs/VoidValue_8h.html @@ -92,6 +92,7 @@ Include dependency graph for VoidValue.h: +
@@ -121,7 +122,7 @@ Namespaces
diff --git a/docs/VoidValue_8h__incl.map b/docs/VoidValue_8h__incl.map index 5997110..8150295 100644 --- a/docs/VoidValue_8h__incl.map +++ b/docs/VoidValue_8h__incl.map @@ -2,6 +2,7 @@ - - + + + diff --git a/docs/VoidValue_8h__incl.md5 b/docs/VoidValue_8h__incl.md5 index 4713dc5..7483fb9 100644 --- a/docs/VoidValue_8h__incl.md5 +++ b/docs/VoidValue_8h__incl.md5 @@ -1 +1 @@ -2fe8fe9fabcd58d433f9b82392834b5c \ No newline at end of file +64107a9642900c322c5205ad2d9c1aed \ No newline at end of file diff --git a/docs/VoidValue_8h__incl.png b/docs/VoidValue_8h__incl.png index 886ddce..1138ac2 100644 Binary files a/docs/VoidValue_8h__incl.png and b/docs/VoidValue_8h__incl.png differ diff --git a/docs/VoidValue_8h_source.html b/docs/VoidValue_8h_source.html index fb8e9cc..5365c94 100644 --- a/docs/VoidValue_8h_source.html +++ b/docs/VoidValue_8h_source.html @@ -105,7 +105,7 @@ $(function() {
35  };
36 }
-
Hazelnp
Definition: DataType.h:3
+
Hazelnp
Definition: DataType.h:4
Hazelnp::VoidValue::GetInt64
long long int GetInt64() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:25
Hazelnp::VoidValue::~VoidValue
~VoidValue() override
Definition: VoidValue.h:12
Hazelnp::VoidValue::GetFloat64
long double GetFloat64() const override
Throws HazelnuppValueNotConvertibleException.
Definition: VoidValue.cpp:35
@@ -121,7 +121,7 @@ $(function() {
Value.h
diff --git a/docs/annotated.html b/docs/annotated.html index eb84b51..5d16ae9 100644 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -98,7 +98,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1FloatValue-members.html b/docs/classHazelnp_1_1FloatValue-members.html index 6201384..1a4767b 100644 --- a/docs/classHazelnp_1_1FloatValue-members.html +++ b/docs/classHazelnp_1_1FloatValue-members.html @@ -101,7 +101,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1FloatValue.html b/docs/classHazelnp_1_1FloatValue.html index da0a248..9f5628b 100644 --- a/docs/classHazelnp_1_1FloatValue.html +++ b/docs/classHazelnp_1_1FloatValue.html @@ -574,7 +574,7 @@ Additional Inherited Members
Hazelnp::HazelnuppValueNotConvertibleException
Gets thrown when an attempt is made to retrieve the wrong data type from a value, when the value not ...
Definition: HazelnuppException.h:35
diff --git a/docs/classHazelnp_1_1Hazelnupp-members.html b/docs/classHazelnp_1_1Hazelnupp-members.html index 4d20c44..2dc6c49 100644 --- a/docs/classHazelnp_1_1Hazelnupp-members.html +++ b/docs/classHazelnp_1_1Hazelnupp-members.html @@ -83,23 +83,31 @@ $(function() { + + + + - - - - - - - - - + + + + + + + + + + + + +
ClearAbbreviations()Hazelnp::Hazelnupp
ClearConstraints()Hazelnp::Hazelnupp
ClearDescription(const std::string &parameter)Hazelnp::Hazelnupp
GenerateDocumentation() constHazelnp::Hazelnupp
GetAbbreviation(const std::string &abbrev) constHazelnp::Hazelnupp
GetBriefDescription()Hazelnp::Hazelnupp
GetCatchHelp() constHazelnp::Hazelnupp
GetCrashOnFail() constHazelnp::Hazelnupp
GetExecutableName() constHazelnp::Hazelnupp
HasAbbreviation(const std::string &abbrev) constHazelnp::Hazelnupp
HasParam(const std::string &key) constHazelnp::Hazelnupp
Hazelnupp()Hazelnp::Hazelnupp
Hazelnupp(const int argc, const char *const *argv)Hazelnp::Hazelnupp
operator[](const std::string &key) constHazelnp::Hazelnupp
Parse(const int argc, const char *const *argv)Hazelnp::Hazelnupp
RegisterAbbreviation(const std::string &abbrev, const std::string &target)Hazelnp::Hazelnupp
RegisterConstraints(const std::vector< ParamConstraint > &constraints)Hazelnp::Hazelnupp
GetDescription(const std::string &parameter) constHazelnp::Hazelnupp
GetExecutableName() constHazelnp::Hazelnupp
HasAbbreviation(const std::string &abbrev) constHazelnp::Hazelnupp
HasParam(const std::string &key) constHazelnp::Hazelnupp
Hazelnupp()Hazelnp::Hazelnupp
Hazelnupp(const int argc, const char *const *argv)Hazelnp::Hazelnupp
operator[](const std::string &key) constHazelnp::Hazelnupp
Parse(const int argc, const char *const *argv)Hazelnp::Hazelnupp
RegisterAbbreviation(const std::string &abbrev, const std::string &target)Hazelnp::Hazelnupp
RegisterConstraints(const std::vector< ParamConstraint > &constraints)Hazelnp::Hazelnupp
RegisterDescription(const std::string &parameter, const std::string &description)Hazelnp::Hazelnupp
SetBriefDescription(const std::string &description)Hazelnp::Hazelnupp
SetCatchHelp(bool catchHelp)Hazelnp::Hazelnupp
SetCrashOnFail(bool crashOnFail)Hazelnp::Hazelnupp
~Hazelnupp()Hazelnp::Hazelnupp
diff --git a/docs/classHazelnp_1_1Hazelnupp.html b/docs/classHazelnp_1_1Hazelnupp.html index a994aa5..dfc6619 100644 --- a/docs/classHazelnp_1_1Hazelnupp.html +++ b/docs/classHazelnp_1_1Hazelnupp.html @@ -131,6 +131,30 @@ Public Member Functions bool GetCrashOnFail () const  Gets whether the application crashes on an exception whilst parsing, and prints to stderr. More...
  +void SetCatchHelp (bool catchHelp) + Sets whether the Hazelnupp should automatically catch the –help parameter, print the parameter documentation to stdout, and exit or not. More...
+  +bool GetCatchHelp () const + Retruns whether the Hazelnupp should automatically catch the –help parameter, print the parameter documentation to stdout, and exit or not. More...
+  +void SetBriefDescription (const std::string &description) + Sets a brief description of the application to be automatically added to the documentation. More...
+  +const std::string & GetBriefDescription () + Returns the brief description of the application to be automatically added to the documentation. More...
+  +void RegisterDescription (const std::string &parameter, const std::string &description) + Willl register a short description for a parameter. More...
+  +const std::string GetDescription (const std::string &parameter) const + Will return a short description for a parameter, if it exists. More...
+  +void ClearDescription (const std::string &parameter) + Will delete the description of a parameter if it exists. More...
+  +std::string GenerateDocumentation () const + Will generate a text-based documentation suited to show the user, for example on –help. More...

Detailed Description

The main class to interface with.

@@ -238,11 +262,11 @@ Public Member Functions

Will delete all abbreviations.

-

Definition at line 348 of file Hazelnupp.cpp.

-
349 {
-
350  abbreviations.clear();
-
351  return;
-
352 }
+

Definition at line 515 of file Hazelnupp.cpp.

+
516 {
+
517  abbreviations.clear();
+
518  return;
+
519 }
@@ -263,11 +287,166 @@ Public Member Functions

Will delete all constraints.

-

Definition at line 375 of file Hazelnupp.cpp.

-
376 {
-
377  constraints.clear();
-
378  return;
-
379 }
+

Definition at line 542 of file Hazelnupp.cpp.

+
543 {
+
544  constraints.clear();
+
545  return;
+
546 }
+
+
+ + +

◆ ClearDescription()

+ +
+
+ + + + + + + + +
void Hazelnp::Hazelnupp::ClearDescription (const std::string & parameter)
+
+ +

Will delete the description of a parameter if it exists.

+ +

Definition at line 335 of file Hazelnupp.cpp.

+
336 {
+
337  // This will just do nothing if the entry does not exist
+
338  parameterDescriptions.erase(parameter);
+
339  return;
+
340 }
+
+
+
+ +

◆ GenerateDocumentation()

+ +
+
+ + + + + + + +
std::string Hazelnupp::GenerateDocumentation () const
+
+ +

Will generate a text-based documentation suited to show the user, for example on –help.

+ +

Definition at line 342 of file Hazelnupp.cpp.

+
343 {
+
344  std::stringstream ss;
+
345 
+
346  // Add brief, if available
+
347  if (briefDescription.length() > 0)
+
348  ss << briefDescription << std::endl;
+
349 
+
350  // Collect parameter information
+
351  struct ParamDocEntry
+
352  {
+
353  std::string abbreviation;
+
354  std::string description;
+
355  std::string type;
+
356  bool required = false;
+
357  bool typeIsForced = false;
+
358  std::string defaultVal;
+
359  };
+
360  std::unordered_map<std::string, ParamDocEntry> paramInfos;
+
361 
+
362  // Collect descriptions
+
363  for (const auto& it : parameterDescriptions)
+
364  {
+
365  // Do we already have that param in the paramInfo set?
+
366  if (paramInfos.find(it.first) == paramInfos.end())
+
367  // No? Create it.
+
368  paramInfos[it.first] = ParamDocEntry();
+
369 
+
370  paramInfos[it.first].description = it.second;
+
371  }
+
372 
+
373  // Collect abbreviations
+
374  // first value is abbreviation, second is long form
+
375  for (const auto& it : abbreviations)
+
376  {
+
377  // Do we already have that param in the paramInfo set?
+
378  if (paramInfos.find(it.second) == paramInfos.end())
+
379  // No? Create it.
+
380  paramInfos[it.second] = ParamDocEntry();
+
381 
+
382  paramInfos[it.second].abbreviation = it.first;
+
383  }
+
384 
+
385  // Collect constraints
+
386  for (const auto& it : constraints)
+
387  {
+
388  // Do we already have that param in the paramInfo set?
+
389  if (paramInfos.find(it.first) == paramInfos.end())
+
390  // No? Create it.
+
391  paramInfos[it.first] = ParamDocEntry();
+
392 
+
393  ParamDocEntry& cached = paramInfos[it.first];
+
394  cached.required = it.second.required;
+
395  cached.typeIsForced = it.second.constrainType;
+
396  cached.type = DataTypeToString(it.second.wantedType);
+
397 
+
398  std::stringstream defaultValueSs;
+
399  for (const std::string& s : it.second.defaultValue)
+
400  {
+
401  defaultValueSs << '\'' << s << '\'';
+
402 
+
403  // Add a space if we are not at the last entry
+
404  if ((void*)&s != (void*)&it.second.defaultValue.back())
+
405  defaultValueSs << " ";
+
406  }
+
407  cached.defaultVal = defaultValueSs.str();
+
408  }
+
409 
+
410  // Now generate the documentatino body
+
411  if (paramInfos.size() > 0)
+
412  {
+
413  ss << std::endl
+
414  << "==== AVAILABLE PARAMETERS ===="
+
415  << std::endl << std::endl;
+
416 
+
417  for (const auto& it : paramInfos)
+
418  {
+
419  const ParamDocEntry& pde = it.second;
+
420 
+
421  // Put name
+
422  ss << it.first << " ";
+
423 
+
424  // Put abbreviation
+
425  if (pde.abbreviation.length() > 0)
+
426  ss << pde.abbreviation << " ";
+
427 
+
428  // Put type
+
429  if (pde.typeIsForced)
+
430  ss << pde.type << " ";
+
431 
+
432  // Put default value
+
433  if (pde.defaultVal.length() > 0)
+
434  ss << "default=[" << pde.defaultVal << "] ";
+
435 
+
436  // Put required tag, but only if no default value
+
437  if ((pde.required) && (pde.defaultVal.length() == 0))
+
438  ss << "[[REQUIRED]] ";
+
439 
+
440  // Put brief description
+
441  if (pde.description.length() > 0)
+
442  ss << pde.description;
+
443 
+
444  ss << std::endl << std::endl;
+
445  }
+
446  }
+
447 
+
448  return ss.str();
+
449 }
@@ -289,10 +468,58 @@ Public Member Functions

Will return the long form of an abbreviation (like –force for -f)

-

Definition at line 338 of file Hazelnupp.cpp.

-
339 {
-
340  return abbreviations.find(abbrev)->second;
-
341 }
+

Definition at line 505 of file Hazelnupp.cpp.

+
506 {
+
507  return abbreviations.find(abbrev)->second;
+
508 }
+
+
+ + +

◆ GetBriefDescription()

+ +
+
+ + + + + + + +
const std::string & Hazelnupp::GetBriefDescription ()
+
+ +

Returns the brief description of the application to be automatically added to the documentation.

+ +

Definition at line 312 of file Hazelnupp.cpp.

+
313 {
+
314  return briefDescription;
+
315 }
+
+
+
+ +

◆ GetCatchHelp()

+ +
+
+ + + + + + + +
bool Hazelnupp::GetCatchHelp () const
+
+ +

Retruns whether the Hazelnupp should automatically catch the –help parameter, print the parameter documentation to stdout, and exit or not.

+ +

Definition at line 301 of file Hazelnupp.cpp.

+
302 {
+
303  return catchHelp;
+
304 }
@@ -313,10 +540,44 @@ Public Member Functions

Gets whether the application crashes on an exception whilst parsing, and prints to stderr.

-

Definition at line 279 of file Hazelnupp.cpp.

-
280 {
-
281  return crashOnFail;
-
282 }
+

Definition at line 290 of file Hazelnupp.cpp.

+
291 {
+
292  return crashOnFail;
+
293 }
+
+
+ + +

◆ GetDescription()

+ +
+
+ + + + + + + + +
const std::string Hazelnp::Hazelnupp::GetDescription (const std::string & parameter) const
+
+ +

Will return a short description for a parameter, if it exists.

+


+ Empty string if it does not exist.

+ +

Definition at line 323 of file Hazelnupp.cpp.

+
324 {
+
325  // Do we already have a description for this parameter?
+
326  const auto par = parameterDescriptions.find(parameter);
+
327  if (par == parameterDescriptions.end())
+
328  // No? Then return ""
+
329  return "";
+
330 
+
331  // We do? Then return it
+
332  return par->second;
+
333 }
@@ -337,10 +598,10 @@ Public Member Functions

Will return argv[0], the name of the executable.

-

Definition at line 318 of file Hazelnupp.cpp.

-
319 {
-
320  return executableName;
-
321 }
+

Definition at line 485 of file Hazelnupp.cpp.

+
486 {
+
487  return executableName;
+
488 }
@@ -362,10 +623,10 @@ Public Member Functions

Will check wether or not an abbreviation is registered.

-

Definition at line 343 of file Hazelnupp.cpp.

-
344 {
-
345  return abbreviations.find(abbrev) != abbreviations.end();
-
346 }
+

Definition at line 510 of file Hazelnupp.cpp.

+
511 {
+
512  return abbreviations.find(abbrev) != abbreviations.end();
+
513 }
@@ -387,10 +648,10 @@ Public Member Functions

Will check wether a parameter exists given a key, or not.

-

Definition at line 153 of file Hazelnupp.cpp.

-
154 {
-
155  return parameters.find(key) != parameters.end();
-
156 }
+

Definition at line 164 of file Hazelnupp.cpp.

+
165 {
+
166  return parameters.find(key) != parameters.end();
+
167 }
@@ -412,14 +673,14 @@ Public Member Functions

Will return the value given a key.

-

Definition at line 323 of file Hazelnupp.cpp.

-
324 {
-
325  // Throw exception if param is unknown
-
326  if (!HasParam(key))
-
327  throw HazelnuppInvalidKeyException();
-
328 
-
329  return *parameters.find(key)->second->GetValue();
-
330 }
+

Definition at line 490 of file Hazelnupp.cpp.

+
491 {
+
492  // Throw exception if param is unknown
+
493  if (!HasParam(key))
+ +
495 
+
496  return *parameters.find(key)->second->GetValue();
+
497 }
@@ -479,31 +740,42 @@ Public Member Functions
60 
61  // Apply constraints such as default values, and required parameters.
62  // Types have already been enforced.
-
63  ApplyConstraints();
-
64  }
-
65  catch (const HazelnuppConstraintTypeMissmatch& hctm)
-
66  {
-
67  if (crashOnFail)
-
68  {
-
69  std::cerr << "Fatal error: Command-line parameter value-type mismatch at \"" << hctm.What() << "\"!";
-
70  quick_exit(-1009);
-
71  }
-
72  else
-
73  throw hctm; // yeet
-
74  }
-
75  catch (const HazelnuppConstraintMissingValue& hctm)
-
76  {
-
77  if (crashOnFail)
-
78  {
-
79  std::cerr << "Fatal error: Missing required command-line parameter \"" << hctm.What() << "\"!";
-
80  quick_exit(-1010);
-
81  }
-
82  else
-
83  throw hctm; // yeet
-
84  }
-
85 
-
86  return;
-
87 }
+
63  // Dont apply constraints when we are just printind the param docs
+
64  if ((!catchHelp) || (!HasParam("--help")))
+
65  ApplyConstraints();
+
66  }
+
67  catch (const HazelnuppConstraintTypeMissmatch& hctm)
+
68  {
+
69  if (crashOnFail)
+
70  {
+
71  std::cout << GenerateDocumentation() << std::endl;
+
72  std::cerr << "Fatal error: Command-line parameter value-type mismatch at \"" << hctm.What() << "\"!";
+
73  quick_exit(-1009);
+
74  }
+
75  else
+
76  throw hctm; // yeet
+
77  }
+
78  catch (const HazelnuppConstraintMissingValue& hctm)
+
79  {
+
80  if (crashOnFail)
+
81  {
+
82  std::cout << GenerateDocumentation() << std::endl;
+
83  std::cerr << "Fatal error: Missing required command-line parameter \"" << hctm.What() << "\"!";
+
84  quick_exit(-1010);
+
85  }
+
86  else
+
87  throw hctm; // yeet
+
88  }
+
89 
+
90  // Catch --help parameter
+
91  if ((catchHelp) && (HasParam("--help")))
+
92  {
+
93  std::cout << GenerateDocumentation() << std::endl;
+
94  quick_exit(0);
+
95  }
+
96 
+
97  return;
+
98 }
@@ -535,11 +807,11 @@ Public Member Functions

Will register an abbreviation (like -f for –force)

-

Definition at line 332 of file Hazelnupp.cpp.

-
333 {
-
334  abbreviations.insert(std::pair<std::string, std::string>(abbrev, target));
-
335  return;
-
336 }
+

Definition at line 499 of file Hazelnupp.cpp.

+
500 {
+
501  abbreviations.insert(std::pair<std::string, std::string>(abbrev, target));
+
502  return;
+
503 }
@@ -561,26 +833,116 @@ Public Member Functions

Will register parameter constraints.

-

Definition at line 354 of file Hazelnupp.cpp.

-
355 {
-
356  for (const ParamConstraint& pc : constraints)
-
357  {
-
358  // Does this constraint already exist?
-
359  const auto constraint = this->constraints.find(pc.key);
-
360  // If yes, replace it.
-
361  if (constraint != this->constraints.end())
-
362  constraint->second = pc;
-
363 
-
364  // Else, create a new pair
-
365  else
-
366  this->constraints.insert(std::pair<std::string, ParamConstraint>(
-
367  pc.key,
-
368  pc
-
369  ));
-
370  }
-
371 
-
372  return;
-
373 }
+

Definition at line 521 of file Hazelnupp.cpp.

+
522 {
+
523  for (const ParamConstraint& pc : constraints)
+
524  {
+
525  // Does this constraint already exist?
+
526  const auto constraint = this->constraints.find(pc.key);
+
527  // If yes, replace it.
+
528  if (constraint != this->constraints.end())
+
529  constraint->second = pc;
+
530 
+
531  // Else, create a new pair
+
532  else
+
533  this->constraints.insert(std::pair<std::string, ParamConstraint>(
+
534  pc.key,
+
535  pc
+
536  ));
+
537  }
+
538 
+
539  return;
+
540 }
+
+
+ + +

◆ RegisterDescription()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void Hazelnp::Hazelnupp::RegisterDescription (const std::string & parameter,
const std::string & description 
)
+
+ +

Willl register a short description for a parameter.

+


+ Will overwrite existing descriptions for that parameter.

+ +

Definition at line 317 of file Hazelnupp.cpp.

+
318 {
+
319  parameterDescriptions[parameter] = description;
+
320  return;
+
321 }
+
+
+
+ +

◆ SetBriefDescription()

+ +
+
+ + + + + + + + +
void Hazelnupp::SetBriefDescription (const std::string & description)
+
+ +

Sets a brief description of the application to be automatically added to the documentation.

+ +

Definition at line 306 of file Hazelnupp.cpp.

+
307 {
+
308  briefDescription = description;
+
309  return;
+
310 }
+
+
+
+ +

◆ SetCatchHelp()

+ +
+
+ + + + + + + + +
void Hazelnupp::SetCatchHelp (bool catchHelp)
+
+ +

Sets whether the Hazelnupp should automatically catch the –help parameter, print the parameter documentation to stdout, and exit or not.

+ +

Definition at line 295 of file Hazelnupp.cpp.

+
296 {
+
297  this->catchHelp = catchHelp;
+
298  return;
+
299 }
@@ -602,11 +964,11 @@ Public Member Functions

Sets whether to crash the application, and print to stderr, when an exception is raised whilst parsing, or not.

-

Definition at line 381 of file Hazelnupp.cpp.

-
382 {
-
383  this->crashOnFail = crashOnFail;
-
384  return;
-
385 }
+

Definition at line 548 of file Hazelnupp.cpp.

+
549 {
+
550  this->crashOnFail = crashOnFail;
+
551  return;
+
552 }
@@ -616,17 +978,19 @@ Public Member Functions
Hazelnp::HazelnuppInvalidKeyException
Gets thrown when an non-existent key gets dereferenced.
Definition: HazelnuppException.h:26
+
Hazelnp::Hazelnupp::GenerateDocumentation
std::string GenerateDocumentation() const
Will generate a text-based documentation suited to show the user, for example on –help.
Definition: Hazelnupp.cpp:342
Hazelnp::HazelnuppException::What
const std::string & What() const
Will return an error message.
Definition: HazelnuppException.h:15
Hazelnp::Parameter
Definition: Parameter.h:8
Hazelnp::ParamConstraint
Definition: ParamConstraint.h:8
-
Hazelnp::Hazelnupp::HasParam
bool HasParam(const std::string &key) const
Will check wether a parameter exists given a key, or not.
Definition: Hazelnupp.cpp:153
+
Hazelnp::Hazelnupp::HasParam
bool HasParam(const std::string &key) const
Will check wether a parameter exists given a key, or not.
Definition: Hazelnupp.cpp:164
Hazelnp::Hazelnupp::Parse
void Parse(const int argc, const char *const *argv)
Will parse command line arguments.
Definition: Hazelnupp.cpp:35
Hazelnp::Parameter::Key
const std::string & Key() const
Will return the key of this parameter.
Definition: Parameter.cpp:21
Hazelnp::HazelnuppConstraintMissingValue
Gets thrown when a parameter constrained to be required is not provided, and has no default value set...
Definition: HazelnuppException.h:62
Hazelnp::HazelnuppConstraintTypeMissmatch
Gets thrown when a parameter is of a type that does not match the required type, and is not convertib...
Definition: HazelnuppException.h:53
+
Hazelnp::DataTypeToString
static std::string DataTypeToString(DATA_TYPE type)
Definition: DataType.h:17
diff --git a/docs/classHazelnp_1_1HazelnuppConstraintException-members.html b/docs/classHazelnp_1_1HazelnuppConstraintException-members.html index 95a4b95..b1efee6 100644 --- a/docs/classHazelnp_1_1HazelnuppConstraintException-members.html +++ b/docs/classHazelnp_1_1HazelnuppConstraintException-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1HazelnuppConstraintException.html b/docs/classHazelnp_1_1HazelnuppConstraintException.html index f29ce23..afd4dbb 100644 --- a/docs/classHazelnp_1_1HazelnuppConstraintException.html +++ b/docs/classHazelnp_1_1HazelnuppConstraintException.html @@ -201,7 +201,7 @@ Additional Inherited Members
Hazelnp::HazelnuppException::HazelnuppException
HazelnuppException()
Definition: HazelnuppException.h:11
diff --git a/docs/classHazelnp_1_1HazelnuppConstraintMissingValue-members.html b/docs/classHazelnp_1_1HazelnuppConstraintMissingValue-members.html index 7de5e22..744bec8 100644 --- a/docs/classHazelnp_1_1HazelnuppConstraintMissingValue-members.html +++ b/docs/classHazelnp_1_1HazelnuppConstraintMissingValue-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1HazelnuppConstraintMissingValue.html b/docs/classHazelnp_1_1HazelnuppConstraintMissingValue.html index 7e5f5ca..cdc67fc 100644 --- a/docs/classHazelnp_1_1HazelnuppConstraintMissingValue.html +++ b/docs/classHazelnp_1_1HazelnuppConstraintMissingValue.html @@ -206,7 +206,7 @@ Additional Inherited Members
Hazelnp::HazelnuppConstraintException::HazelnuppConstraintException
HazelnuppConstraintException()
Definition: HazelnuppException.h:47
diff --git a/docs/classHazelnp_1_1HazelnuppConstraintTypeMissmatch-members.html b/docs/classHazelnp_1_1HazelnuppConstraintTypeMissmatch-members.html index 843e262..78ddfa3 100644 --- a/docs/classHazelnp_1_1HazelnuppConstraintTypeMissmatch-members.html +++ b/docs/classHazelnp_1_1HazelnuppConstraintTypeMissmatch-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1HazelnuppConstraintTypeMissmatch.html b/docs/classHazelnp_1_1HazelnuppConstraintTypeMissmatch.html index 5c02c1d..888cc11 100644 --- a/docs/classHazelnp_1_1HazelnuppConstraintTypeMissmatch.html +++ b/docs/classHazelnp_1_1HazelnuppConstraintTypeMissmatch.html @@ -206,7 +206,7 @@ Additional Inherited Members
Hazelnp::HazelnuppConstraintException::HazelnuppConstraintException
HazelnuppConstraintException()
Definition: HazelnuppException.h:47
diff --git a/docs/classHazelnp_1_1HazelnuppException-members.html b/docs/classHazelnp_1_1HazelnuppException-members.html index 8774b9c..c8d7305 100644 --- a/docs/classHazelnp_1_1HazelnuppException-members.html +++ b/docs/classHazelnp_1_1HazelnuppException-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1HazelnuppException.html b/docs/classHazelnp_1_1HazelnuppException.html index 9250bc7..879394a 100644 --- a/docs/classHazelnp_1_1HazelnuppException.html +++ b/docs/classHazelnp_1_1HazelnuppException.html @@ -255,7 +255,7 @@ Protected Attributes
Hazelnp::HazelnuppException::message
std::string message
Definition: HazelnuppException.h:21
diff --git a/docs/classHazelnp_1_1HazelnuppInvalidKeyException-members.html b/docs/classHazelnp_1_1HazelnuppInvalidKeyException-members.html index 663e00d..6a55205 100644 --- a/docs/classHazelnp_1_1HazelnuppInvalidKeyException-members.html +++ b/docs/classHazelnp_1_1HazelnuppInvalidKeyException-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1HazelnuppInvalidKeyException.html b/docs/classHazelnp_1_1HazelnuppInvalidKeyException.html index 5d4c3ce..aae8483 100644 --- a/docs/classHazelnp_1_1HazelnuppInvalidKeyException.html +++ b/docs/classHazelnp_1_1HazelnuppInvalidKeyException.html @@ -199,7 +199,7 @@ Additional Inherited Members
Hazelnp::HazelnuppException::HazelnuppException
HazelnuppException()
Definition: HazelnuppException.h:11
diff --git a/docs/classHazelnp_1_1HazelnuppValueNotConvertibleException-members.html b/docs/classHazelnp_1_1HazelnuppValueNotConvertibleException-members.html index b64b2b6..c846359 100644 --- a/docs/classHazelnp_1_1HazelnuppValueNotConvertibleException-members.html +++ b/docs/classHazelnp_1_1HazelnuppValueNotConvertibleException-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1HazelnuppValueNotConvertibleException.html b/docs/classHazelnp_1_1HazelnuppValueNotConvertibleException.html index 96ec003..3192a0c 100644 --- a/docs/classHazelnp_1_1HazelnuppValueNotConvertibleException.html +++ b/docs/classHazelnp_1_1HazelnuppValueNotConvertibleException.html @@ -199,7 +199,7 @@ Additional Inherited Members
Hazelnp::HazelnuppException::HazelnuppException
HazelnuppException()
Definition: HazelnuppException.h:11
diff --git a/docs/classHazelnp_1_1IntValue-members.html b/docs/classHazelnp_1_1IntValue-members.html index 71c9449..f5e5585 100644 --- a/docs/classHazelnp_1_1IntValue-members.html +++ b/docs/classHazelnp_1_1IntValue-members.html @@ -101,7 +101,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1IntValue.html b/docs/classHazelnp_1_1IntValue.html index 570173b..1d41758 100644 --- a/docs/classHazelnp_1_1IntValue.html +++ b/docs/classHazelnp_1_1IntValue.html @@ -574,7 +574,7 @@ Additional Inherited Members
Hazelnp::HazelnuppValueNotConvertibleException
Gets thrown when an attempt is made to retrieve the wrong data type from a value, when the value not ...
Definition: HazelnuppException.h:35
diff --git a/docs/classHazelnp_1_1ListValue-members.html b/docs/classHazelnp_1_1ListValue-members.html index 730c50c..05f84c4 100644 --- a/docs/classHazelnp_1_1ListValue-members.html +++ b/docs/classHazelnp_1_1ListValue-members.html @@ -101,7 +101,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1ListValue.html b/docs/classHazelnp_1_1ListValue.html index cf1533d..7008bb1 100644 --- a/docs/classHazelnp_1_1ListValue.html +++ b/docs/classHazelnp_1_1ListValue.html @@ -601,7 +601,7 @@ Additional Inherited Members
Hazelnp::HazelnuppValueNotConvertibleException
Gets thrown when an attempt is made to retrieve the wrong data type from a value, when the value not ...
Definition: HazelnuppException.h:35
diff --git a/docs/classHazelnp_1_1Parameter-members.html b/docs/classHazelnp_1_1Parameter-members.html index 962f802..8bf582b 100644 --- a/docs/classHazelnp_1_1Parameter-members.html +++ b/docs/classHazelnp_1_1Parameter-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1Parameter.html b/docs/classHazelnp_1_1Parameter.html index 58b40ee..95a3e67 100644 --- a/docs/classHazelnp_1_1Parameter.html +++ b/docs/classHazelnp_1_1Parameter.html @@ -275,7 +275,7 @@ Friends
Hazelnp::Value::Deepcopy
virtual Value * Deepcopy() const =0
Will return a deeopopy of this object.
diff --git a/docs/classHazelnp_1_1StringTools-members.html b/docs/classHazelnp_1_1StringTools-members.html index 42f8541..8644a9c 100644 --- a/docs/classHazelnp_1_1StringTools-members.html +++ b/docs/classHazelnp_1_1StringTools-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1StringTools.html b/docs/classHazelnp_1_1StringTools.html index a2237ba..9ac1828 100644 --- a/docs/classHazelnp_1_1StringTools.html +++ b/docs/classHazelnp_1_1StringTools.html @@ -626,7 +626,7 @@ Static Public Member Functions
Hazelnp::StringTools::SplitString
static std::vector< std::string > SplitString(const std::string &str, const char delimiter)
Will split a string by a delimiter char. The delimiter will be excluded!
Definition: StringTools.cpp:125
diff --git a/docs/classHazelnp_1_1StringValue-members.html b/docs/classHazelnp_1_1StringValue-members.html index 6db77e5..7229ea5 100644 --- a/docs/classHazelnp_1_1StringValue-members.html +++ b/docs/classHazelnp_1_1StringValue-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1StringValue.html b/docs/classHazelnp_1_1StringValue.html index a660cfa..84e593b 100644 --- a/docs/classHazelnp_1_1StringValue.html +++ b/docs/classHazelnp_1_1StringValue.html @@ -547,7 +547,7 @@ Additional Inherited Members
Hazelnp::HazelnuppValueNotConvertibleException
Gets thrown when an attempt is made to retrieve the wrong data type from a value, when the value not ...
Definition: HazelnuppException.h:35
diff --git a/docs/classHazelnp_1_1Value-members.html b/docs/classHazelnp_1_1Value-members.html index a498717..1c48222 100644 --- a/docs/classHazelnp_1_1Value-members.html +++ b/docs/classHazelnp_1_1Value-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1Value.html b/docs/classHazelnp_1_1Value.html index 65272bc..5600e9c 100644 --- a/docs/classHazelnp_1_1Value.html +++ b/docs/classHazelnp_1_1Value.html @@ -548,7 +548,7 @@ Friends
Hazelnp::Value::type
DATA_TYPE type
Definition: Value.h:48
diff --git a/docs/classHazelnp_1_1VoidValue-members.html b/docs/classHazelnp_1_1VoidValue-members.html index c75d443..d65f14e 100644 --- a/docs/classHazelnp_1_1VoidValue-members.html +++ b/docs/classHazelnp_1_1VoidValue-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/docs/classHazelnp_1_1VoidValue.html b/docs/classHazelnp_1_1VoidValue.html index 96561e7..785bb81 100644 --- a/docs/classHazelnp_1_1VoidValue.html +++ b/docs/classHazelnp_1_1VoidValue.html @@ -493,7 +493,7 @@ Additional Inherited Members
Hazelnp::HazelnuppValueNotConvertibleException
Gets thrown when an attempt is made to retrieve the wrong data type from a value, when the value not ...
Definition: HazelnuppException.h:35
diff --git a/docs/classes.html b/docs/classes.html index 698cc02..7b3a688 100644 --- a/docs/classes.html +++ b/docs/classes.html @@ -119,7 +119,7 @@ $(function() { diff --git a/docs/dir_0202e1e26df2e040f4dc3d434eecf04c.html b/docs/dir_0202e1e26df2e040f4dc3d434eecf04c.html index 9e40212..f652f08 100644 --- a/docs/dir_0202e1e26df2e040f4dc3d434eecf04c.html +++ b/docs/dir_0202e1e26df2e040f4dc3d434eecf04c.html @@ -136,7 +136,7 @@ Files diff --git a/docs/dir_0cc5f59b28c403d42cc56800132eb975.html b/docs/dir_0cc5f59b28c403d42cc56800132eb975.html index ffcbc4d..bc920b7 100644 --- a/docs/dir_0cc5f59b28c403d42cc56800132eb975.html +++ b/docs/dir_0cc5f59b28c403d42cc56800132eb975.html @@ -81,7 +81,7 @@ $(function() { diff --git a/docs/dir_1148ebc2b25b55095aebf6f4cbb6efca.html b/docs/dir_1148ebc2b25b55095aebf6f4cbb6efca.html index 57ed724..6b457e1 100644 --- a/docs/dir_1148ebc2b25b55095aebf6f4cbb6efca.html +++ b/docs/dir_1148ebc2b25b55095aebf6f4cbb6efca.html @@ -81,7 +81,7 @@ $(function() { diff --git a/docs/dir_a8cffda729361e9d9637effa362fcea9.html b/docs/dir_a8cffda729361e9d9637effa362fcea9.html index 3355d50..83c0ced 100644 --- a/docs/dir_a8cffda729361e9d9637effa362fcea9.html +++ b/docs/dir_a8cffda729361e9d9637effa362fcea9.html @@ -81,7 +81,7 @@ $(function() { diff --git a/docs/files.html b/docs/files.html index 40b4d33..caefd56 100644 --- a/docs/files.html +++ b/docs/files.html @@ -107,7 +107,7 @@ $(function() { diff --git a/docs/functions.html b/docs/functions.html index 6fa5030..15f95e7 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -86,6 +86,9 @@ $(function() {
  • ClearConstraints() : Hazelnp::Hazelnupp
  • +
  • ClearDescription() +: Hazelnp::Hazelnupp +
  • constrainType : Hazelnp::ParamConstraint
  • @@ -118,6 +121,9 @@ $(function() {

    - g -