Map object identifiers to fit options.
More...
|
| | ids_t () |
| | Default constructor.
|
| |
| | ids_t (const array_type< int > &buffer) |
| | Copy constructor.
|
| |
| | ids_t (const ids_t &A, const ids_t &B) |
| | Difference constructor.
|
| |
| void | insert (const int id) |
| | Insert identifier.
|
| |
| void | erase (const ids_t &B) |
| | Erase elements that are in given list of identifiers.
|
| |
| template<class T > |
| void | set (const ids_t &B, const T &OP) |
| | Set fit options of elements to result of given logical operator combined with fit options in given list of identifiers.
|
| |
| void | set (const char c, const bool value) |
| | Set fit option of all elements for given coordinate.
|
| |
|
| std::istream & | operator>> (std::istream &in, ids_t &object) |
| | Read identifiers from input stream.
|
| |
| std::ostream & | operator<< (std::ostream &out, const ids_t &object) |
| | Write identifiers and fit options to output stream.
|
| |
Map object identifiers to fit options.
Definition at line 198 of file JSydney.cc.
◆ map_type
◆ ids_t() [1/3]
| JACOUSTICS::JSydney::ids_t::ids_t |
( |
| ) |
|
|
inline |
◆ ids_t() [2/3]
| JACOUSTICS::JSydney::ids_t::ids_t |
( |
const array_type< int > & | buffer | ) |
|
|
inline |
Copy constructor.
- Parameters
-
| buffer | list of identifiers |
Definition at line 219 of file JSydney.cc.
220 {
221 for (const int i : buffer) {
223 }
224 }
void insert(const int id)
Insert identifier.
◆ ids_t() [3/3]
| JACOUSTICS::JSydney::ids_t::ids_t |
( |
const ids_t & | A, |
|
|
const ids_t & | B ) |
|
inline |
Difference constructor.
Make list of all object identifiers in A that are not in B.
- Parameters
-
| A | list of identifiers |
| B | list of identifiers |
Definition at line 234 of file JSydney.cc.
235 :
237 {
239 }
void erase(const ids_t &B)
Erase elements that are in given list of identifiers.
ids_t()
Default constructor.
◆ insert()
| void JACOUSTICS::JSydney::ids_t::insert |
( |
const int | id | ) |
|
|
inline |
Insert identifier.
- Parameters
-
Definition at line 247 of file JSydney.cc.
248 {
249 this->
insert(std::make_pair(
id, fit_t()));
250 }
◆ erase()
| void JACOUSTICS::JSydney::ids_t::erase |
( |
const ids_t & | B | ) |
|
|
inline |
Erase elements that are in given list of identifiers.
- Parameters
-
Definition at line 258 of file JSydney.cc.
259 {
260 for (const auto& i : B) {
261 this->
erase(i.first);
262 }
263 }
◆ set() [1/2]
template<class T >
| void JACOUSTICS::JSydney::ids_t::set |
( |
const ids_t & | B, |
|
|
const T & | OP ) |
|
inline |
Set fit options of elements to result of given logical operator combined with fit options in given list of identifiers.
- Parameters
-
| B | list of identifiers |
| OP | operator |
Definition at line 273 of file JSydney.cc.
274 {
275 for (const auto i : B) {
276
278
279 if (p != this->end()) {
280 p->second.x = OP(p->second.x, i.second.x);
281 p->second.y = OP(p->second.y, i.second.y);
282 p->second.z = OP(p->second.z, i.second.z);
283 }
284 }
285 }
◆ set() [2/2]
| void JACOUSTICS::JSydney::ids_t::set |
( |
const char | c, |
|
|
const bool | value ) |
|
inline |
Set fit option of all elements for given coordinate.
- Parameters
-
Definition at line 294 of file JSydney.cc.
295 {
296 for (
iterator i = this->begin(); i != this->end(); ++i) {
297 i->second.set(c, value);
298 }
299 }
◆ operator>>
| std::istream & operator>> |
( |
std::istream & | in, |
|
|
ids_t & | object ) |
|
friend |
Read identifiers from input stream.
- Parameters
-
| in | input stream |
| object | identifiers |
- Returns
- input stream
Definition at line 309 of file JSydney.cc.
310 {
311 for (int id; in >> id; ) {
312 object.insert(id);
313 }
314
315 if (!in.bad()) {
316 in.clear();
317 }
318
319 return in;
320 }
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const ids_t & | object ) |
|
friend |
Write identifiers and fit options to output stream.
- Parameters
-
| out | output stream |
| object | identifiers |
- Returns
- output stream
Definition at line 330 of file JSydney.cc.
331 {
332 for (const auto& i : object) {
333 out << ' ' << i.first
334 << '.'
335 << (i.second.x ?
X_t :
' ')
336 << (i.second.y ?
Y_t :
' ')
337 << (i.second.z ?
Z_t :
' ');
338 }
339
340 return out;
341 }
static const char Z_t
set z-coordinate
static const char Y_t
set y-coordinate
static const char X_t
set x-coordinate
The documentation for this struct was generated from the following file: