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 196 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 217 of file JSydney.cc.
218 {
219 for (const int i : buffer) {
221 }
222 }
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 232 of file JSydney.cc.
233 :
235 {
237 }
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 245 of file JSydney.cc.
246 {
247 this->
insert(std::make_pair(
id, fit_t()));
248 }
◆ 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 256 of file JSydney.cc.
257 {
258 for (const auto& i : B) {
259 this->
erase(i.first);
260 }
261 }
◆ 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 271 of file JSydney.cc.
272 {
273 for (const auto i : B) {
274
276
277 if (p != this->end()) {
278 p->second.x = OP(p->second.x, i.second.x);
279 p->second.y = OP(p->second.y, i.second.y);
280 p->second.z = OP(p->second.z, i.second.z);
281 }
282 }
283 }
◆ 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 292 of file JSydney.cc.
293 {
294 for (
iterator i = this->begin(); i != this->end(); ++i) {
295 i->second.set(c, value);
296 }
297 }
◆ 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 307 of file JSydney.cc.
308 {
309 for (int id; in >> id; ) {
310 object.insert(id);
311 }
312
313 if (!in.bad()) {
314 in.clear();
315 }
316
317 return in;
318 }
◆ 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 328 of file JSydney.cc.
329 {
330 for (const auto& i : object) {
331 out << ' ' << i.first
332 << '.'
333 << (i.second.x ?
X_t :
' ')
334 << (i.second.y ?
Y_t :
' ')
335 << (i.second.z ?
Z_t :
' ');
336 }
337
338 return out;
339 }
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: