Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Attributes | Friends | List of all members
JEEP::JContainer< T > Struct Template Reference

Auxiliary container for detector elements. More...

#include <JContainer.hh>

Inheritance diagram for JEEP::JContainer< T >:
std::vector< T >

Public Types

typedef std::vector< T >
::const_iterator 
const_iterator
 
typedef std::vector< T >::iterator iterator
 
typedef std::vector< T >
::const_reverse_iterator 
const_reverse_iterator
 
typedef std::vector< T >
::reverse_iterator 
reverse_iterator
 

Public Attributes

JComment comment
 

Friends

std::istream & operator>> (std::istream &in, JContainer &container)
 Read container from input. More...
 
std::ostream & operator<< (std::ostream &out, const JContainer &container)
 Write container to output. More...
 

Detailed Description

template<class T>
struct JEEP::JContainer< T >

Auxiliary container for detector elements.

Definition at line 29 of file JContainer.hh.

Member Typedef Documentation

template<class T>
typedef std::vector<T>::const_iterator JEEP::JContainer< T >::const_iterator

Definition at line 32 of file JContainer.hh.

template<class T>
typedef std::vector<T>::iterator JEEP::JContainer< T >::iterator

Definition at line 33 of file JContainer.hh.

Definition at line 34 of file JContainer.hh.

Definition at line 35 of file JContainer.hh.

Friends And Related Function Documentation

template<class T>
std::istream& operator>> ( std::istream &  in,
JContainer< T > &  container 
)
friend

Read container from input.

Parameters
ininput stream
containercontainer
Returns
input stream

Definition at line 45 of file JContainer.hh.

46  {
47  using namespace JPP;
48 
49  JStringStream is(in);
50 
51  if (getFileStatus(is.str().c_str())) {
52  is.load();
53  }
54 
55  is >> container.comment;
56 
57  for (T value; is >> value; ) {
58  container.push_back(value);
59  }
60 
61  return in;
62  }
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
is
Definition: JDAQCHSM.chsm:167
do set_variable OUTPUT_DIRECTORY $WORKDIR T
static JStat getFileStatus
Function object for file status.
Definition: JStat.hh:173
JComment comment
Definition: JContainer.hh:85
template<class T>
std::ostream& operator<< ( std::ostream &  out,
const JContainer< T > &  container 
)
friend

Write container to output.

Parameters
outoutput stream
containercontainer
Returns
output stream

Definition at line 72 of file JContainer.hh.

73  {
74  using namespace std;
75 
76  out << container.comment;
77 
78  for (JContainer::const_iterator i = container.begin(); i != container.end(); ++i) {
79  out << *i << endl;
80  }
81 
82  return out;
83  }
std::vector< T >::const_iterator const_iterator
Definition: JContainer.hh:32
JComment comment
Definition: JContainer.hh:85

Member Data Documentation

template<class T>
JComment JEEP::JContainer< T >::comment

Definition at line 85 of file JContainer.hh.


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