List of object identifiers.
More...
|
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 to output stream.
|
|
List of object identifiers.
Definition at line 157 of file JSydney.cc.
◆ ids_t() [1/3]
JACOUSTICS::JSydney::ids_t::ids_t |
( |
| ) |
|
|
inline |
◆ ids_t() [2/3]
JACOUSTICS::JSydney::ids_t::ids_t |
( |
const std::vector< int > & | buffer | ) |
|
|
inline |
Copy constructor.
- Parameters
-
buffer | list of identifiers |
Definition at line 172 of file JSydney.cc.
◆ 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 184 of file JSydney.cc.
186 {
187 std::set_difference(A.begin(), A.end(), B.begin(), B.end(), std::inserter(*this, this->begin()));
188 }
◆ fix()
void JACOUSTICS::JSydney::ids_t::fix |
( |
const ids_t & | B | ) |
|
|
inline |
Fix.
Keep list of object identifiers that are not in B.
- Parameters
-
Definition at line 197 of file JSydney.cc.
198 {
200
201 this->swap(A);
202
203 std::set_difference(A.begin(), A.end(), B.begin(), B.end(), std::inserter(*this, this->begin()));
204 }
ids_t()
Default constructor.
◆ 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 214 of file JSydney.cc.
215 {
216 for (int id; in >> id; ) {
217 object.insert(id);
218 }
219
220 if (!in.bad()) {
221 in.clear();
222 }
223
224 return in;
225 }
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const ids_t & | object ) |
|
friend |
Write identifiers to output stream.
- Parameters
-
out | output stream |
object | identifiers |
- Returns
- output stream
Definition at line 235 of file JSydney.cc.
236 {
237 for (const int id : object) {
238 out << ' ' << id;
239 }
240
241 return out;
242 }
The documentation for this struct was generated from the following file: