#include <size_nd.hpp>
Definition at line 190 of file size_nd.hpp.
◆ size_nd() [1/6]
◆ size_nd() [2/6]
◆ size_nd() [3/6]
◆ size_nd() [4/6]
◆ size_nd() [5/6]
Definition at line 205 of file size_nd.hpp.
206 {
207 for (const string& new_width : new_widths)
208 {
209 widths.push_back(stof(new_width));
210 }
211 }
◆ size_nd() [6/6]
Definition at line 213 of file size_nd.hpp.
214 {
216 }
void initialize_from_string(const string &init_size_nd)
◆ display()
Definition at line 312 of file size_nd.hpp.
313 {
315 {
316 ostringstream output;
319 {
320 for (
unsigned int i = 1; i <
widths.size(); i++)
321 {
323 }
324 }
325 return output.str();
326 }
327 else
328 {
329 return "[empty]";
330 }
331 }
string display_float(const float &value, int number_of_decimals)
◆ get_nd()
◆ get_volume_nd()
Definition at line 302 of file size_nd.hpp.
303 {
304 float new_value = 1;
305 for (
unsigned int i = 0; i <
widths.size(); i++)
306 {
308 }
309 return new_value;
310 }
◆ initialize_from_string()
Definition at line 336 of file size_nd.hpp.
337 {
339 vector<string> new_widths;
340 boost::split(new_widths,init_size_nd,boost::is_any_of("*"));
341 for (string& new_width : new_widths)
342 {
343 boost::trim(new_width);
344 widths.push_back(stof(new_width));
345 }
346 }
◆ is_nd()
◆ operator+()
Definition at line 246 of file size_nd.hpp.
247 {
248 if (
get_nd() == x.get_nd())
249 {
250 vector<float> new_widths =
widths;
251 for (unsigned int i = 0; i < new_widths.size(); i++)
252 {
253 new_widths[i] += x.widths[i];
254 }
255 return size_nd<float>(new_widths);
256 }
257 else
258 {
259 return size_nd<float>();
260 }
261 }
◆ operator+=()
Definition at line 280 of file size_nd.hpp.
281 {
282 if (
get_nd() == x.get_nd())
283 {
284 for (
unsigned int i = 0; i <
widths.size(); i++)
285 {
287 }
288 }
289 }
◆ operator-()
Definition at line 263 of file size_nd.hpp.
264 {
265 if (
get_nd() == x.get_nd())
266 {
267 vector<float> new_widths =
widths;
268 for (unsigned int i = 0; i < new_widths.size(); i++)
269 {
270 new_widths[i] -= x.widths[i];
271 }
272 return size_nd<float>(new_widths);
273 }
274 else
275 {
276 return size_nd<float>();
277 }
278 }
◆ operator-=()
Definition at line 291 of file size_nd.hpp.
292 {
293 if (
get_nd() == x.get_nd())
294 {
295 for (
unsigned int i = 0; i <
widths.size(); i++)
296 {
298 }
299 }
300 }
◆ operator=() [1/3]
Definition at line 218 of file size_nd.hpp.
219 {
221 return *this;
222 }
◆ operator=() [2/3]
Definition at line 230 of file size_nd.hpp.
231 {
233 return *this;
234 }
◆ operator=() [3/3]
Definition at line 224 of file size_nd.hpp.
225 {
226 widths = std::move(x.widths);
227 return *this;
228 }
◆ widths
The documentation for this class was generated from the following file: