Jpp  18.2.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
JACOUSTICS::JSydney::ids_t Struct Reference

List of object identifiers. More...

Inheritance diagram for JACOUSTICS::JSydney::ids_t:
std::set< int >

Public Member Functions

 ids_t ()
 Default constructor. More...
 
 ids_t (const std::vector< int > &buffer)
 Copy constructor. More...
 
 ids_t (const ids_t &A, const ids_t &B)
 Difference constructor. More...
 
void fix (const ids_t &B)
 Fix. More...
 

Friends

std::istream & operator>> (std::istream &in, ids_t &object)
 Read identifiers from input stream. More...
 
std::ostream & operator<< (std::ostream &out, const ids_t &object)
 Write identifiers to output stream. More...
 

Detailed Description

List of object identifiers.

Definition at line 140 of file JSydney.cc.

Constructor & Destructor Documentation

JACOUSTICS::JSydney::ids_t::ids_t ( )
inline

Default constructor.

Definition at line 146 of file JSydney.cc.

147  {}
JACOUSTICS::JSydney::ids_t::ids_t ( const std::vector< int > &  buffer)
inline

Copy constructor.

Parameters
bufferlist of identifiers

Definition at line 155 of file JSydney.cc.

155  :
156  std::set<int>(buffer.begin(), buffer.end())
157  {}
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
Alist of identifiers
Blist of identifiers

Definition at line 167 of file JSydney.cc.

169  {
170  std::set_difference(A.begin(), A.end(), B.begin(), B.end(), std::inserter(*this, this->begin()));
171  }
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A

Member Function Documentation

void JACOUSTICS::JSydney::ids_t::fix ( const ids_t B)
inline

Fix.

Keep list of object identifiers that are not in B.

Parameters
Blist of identifiers

Definition at line 180 of file JSydney.cc.

181  {
182  ids_t A;
183 
184  this->swap(A);
185 
186  std::set_difference(A.begin(), A.end(), B.begin(), B.end(), std::inserter(*this, this->begin()));
187  }
ids_t()
Default constructor.
Definition: JSydney.cc:146
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A

Friends And Related Function Documentation

std::istream& operator>> ( std::istream &  in,
ids_t object 
)
friend

Read identifiers from input stream.

Parameters
ininput stream
objectidentifiers
Returns
input stream

Definition at line 197 of file JSydney.cc.

198  {
199  for (int id; in >> id; ) {
200  object.insert(id);
201  }
202 
203  if (!in.bad()) {
204  in.clear();
205  }
206 
207  return in;
208  }
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
std::ostream& operator<< ( std::ostream &  out,
const ids_t object 
)
friend

Write identifiers to output stream.

Parameters
outoutput stream
objectidentifiers
Returns
output stream

Definition at line 218 of file JSydney.cc.

219  {
220  for (const int id : object) {
221  out << ' ' << id;
222  }
223 
224  return out;
225  }

The documentation for this struct was generated from the following file: