Implementations for class stir::KeyParser.
More...
#include "stir/KeyParser.h"
#include "stir/Succeeded.h"
#include "stir/RegisteredObjectBase.h"
#include "stir/interfile_keyword_functions.h"
#include "stir/stream.h"
#include "stir/is_null_ptr.h"
#include <boost/format.hpp>
#include "stir/error.h"
#include <typeinfo>
#include <fstream>
#include <sstream>
#include <cstring>
#include <cstdlib>
#include "stir/warning.h"
#include <strstream>
|
| stir |
| Namespace for the STIR library (and some/most of its applications)
|
|
| stir::detail |
| Namespace for the implementation details of the STIR library.
|
|
|
#define | KP_case_assign(KeyArgumentValue, type) |
|
#define | KP_case_assign(KeyArgumentValue, type) |
|
#define | KP_case_to_stream(KeyArgumentValue, type) |
|
#define | KP_case_to_stream(KeyArgumentValue, type) |
|
|
template<> |
Succeeded | stir::get_param_from_string (string ¶m, const string &s) |
|
template<> |
Succeeded | stir::get_vparam_from_string (vector< string > ¶m, const string &s) |
|
Implementations for class stir::KeyParser.
- Author
- Patrick Valente
-
Kris Thielemans
-
PARAPET project
◆ KP_case_assign [1/2]
#define KP_case_assign |
( |
|
KeyArgumentValue, |
|
|
|
type |
|
) |
| |
Value:case KeyArgumentValue: \
*reinterpret_cast<type*>(current->p_object_variable) = *boost::any_cast<type>(&this->parameter); \
break
◆ KP_case_assign [2/2]
#define KP_case_assign |
( |
|
KeyArgumentValue, |
|
|
|
type |
|
) |
| |
Value:case KeyArgumentValue: \
assign_to_list(*reinterpret_cast<std::vector<type>*>(current->p_object_variable), \
*boost::any_cast<type>(&this->parameter), \
current_index, \
keyword); \
break
◆ KP_case_to_stream [1/2]
#define KP_case_to_stream |
( |
|
KeyArgumentValue, |
|
|
|
type |
|
) |
| |
Value:case KeyArgumentValue: \
s << *reinterpret_cast<const type*>(element.p_object_variable); \
break
◆ KP_case_to_stream [2/2]
#define KP_case_to_stream |
( |
|
KeyArgumentValue, |
|
|
|
type |
|
) |
| |
Value:case KeyArgumentValue: { \
auto vect = *reinterpret_cast<const std::vector<type>*>(element.p_object_variable); \
for (unsigned current_index = 1; current_index <= vect.size(); ++current_index) \
s << keyword << '[' << current_index << "] := " << vect[current_index - 1] << '\n'; \
} \
break