Jpp  17.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
JTOOLS::JPair< JKey_t, JValue_t > Class Template Reference

Template specialisation for a pair of values. More...

#include <JPair.hh>

Inheritance diagram for JTOOLS::JPair< JKey_t, JValue_t >:
JTOOLS::JRange< counter_type > JTOOLS::JRange< double > JTOOLS::JRange< int > JTOOLS::JRange< JAbscissa_t > JTOOLS::JRange< JDAQHit::JTOT_t > JAANET::JRange_t JRECONSTRUCTION::JRange_t JTOOLS::JQuantiles JTOOLS::JAbstractHistogram< JAbscissa_t >

Public Types

typedef JKey_t key_type
 
typedef JValue_t mapped_type
 

Public Member Functions

 JPair ()
 Default constructor. More...
 
 JPair (typename JLANG::JClass< key_type >::argument_type key, typename JLANG::JClass< mapped_type >::argument_type value)
 Constructor. More...
 
const key_typegetKey () const
 
const mapped_typegetValue () const
 
mapped_typegetValue ()
 

Public Attributes

JKey_t first
 
JValue_t second
 

Friends

std::istream & operator>> (std::istream &in, JPair< JKey_t, JValue_t > &pair)
 Read pair from input. More...
 
std::ostream & operator<< (std::ostream &out, const JPair< JKey_t, JValue_t > &pair)
 Write pair to output. More...
 
JReaderoperator>> (JReader &in, JPair< JKey_t, JValue_t > &pair)
 Read pair from input. More...
 
JWriteroperator<< (JWriter &out, const JPair< JKey_t, JValue_t > &pair)
 Write pair to output. More...
 

Detailed Description

template<class JKey_t, class JValue_t>
class JTOOLS::JPair< JKey_t, JValue_t >

Template specialisation for a pair of values.

Definition at line 28 of file JPair.hh.

Member Typedef Documentation

template<class JKey_t, class JValue_t>
typedef JKey_t JTOOLS::JPair< JKey_t, JValue_t >::key_type

Definition at line 32 of file JPair.hh.

template<class JKey_t, class JValue_t>
typedef JValue_t JTOOLS::JPair< JKey_t, JValue_t >::mapped_type

Definition at line 33 of file JPair.hh.

Constructor & Destructor Documentation

template<class JKey_t, class JValue_t>
JTOOLS::JPair< JKey_t, JValue_t >::JPair ( )
inline

Default constructor.

Definition at line 39 of file JPair.hh.

39  :
40  first (),
41  second()
42  {}
JValue_t second
Definition: JPair.hh:129
JKey_t first
Definition: JPair.hh:128
template<class JKey_t, class JValue_t>
JTOOLS::JPair< JKey_t, JValue_t >::JPair ( typename JLANG::JClass< key_type >::argument_type  key,
typename JLANG::JClass< mapped_type >::argument_type  value 
)
inline

Constructor.

Parameters
keyJKey_t
valueJValue_t

Definition at line 51 of file JPair.hh.

52  :
53  first (key),
54  second(value)
55  {}
JValue_t second
Definition: JPair.hh:129
JKey_t first
Definition: JPair.hh:128

Member Function Documentation

template<class JKey_t, class JValue_t>
const key_type& JTOOLS::JPair< JKey_t, JValue_t >::getKey ( ) const
inline

Definition at line 123 of file JPair.hh.

123 { return this->first; }
JKey_t first
Definition: JPair.hh:128
template<class JKey_t, class JValue_t>
const mapped_type& JTOOLS::JPair< JKey_t, JValue_t >::getValue ( ) const
inline

Definition at line 124 of file JPair.hh.

124 { return this->second; }
JValue_t second
Definition: JPair.hh:129
template<class JKey_t, class JValue_t>
mapped_type& JTOOLS::JPair< JKey_t, JValue_t >::getValue ( )
inline

Definition at line 126 of file JPair.hh.

126 { return this->second; }
JValue_t second
Definition: JPair.hh:129

Friends And Related Function Documentation

template<class JKey_t, class JValue_t>
std::istream& operator>> ( std::istream &  in,
JPair< JKey_t, JValue_t > &  pair 
)
friend

Read pair from input.

Parameters
ininput stream
pairpair
Returns
input stream

Definition at line 65 of file JPair.hh.

66  {
67  in >> pair.first;
68  in >> pair.second;
69 
70  return in;
71  }
JValue_t second
Definition: JPair.hh:129
JKey_t first
Definition: JPair.hh:128
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
template<class JKey_t, class JValue_t>
std::ostream& operator<< ( std::ostream &  out,
const JPair< JKey_t, JValue_t > &  pair 
)
friend

Write pair to output.

Parameters
outoutput stream
pairpair
Returns
output stream

Definition at line 81 of file JPair.hh.

82  {
83  out << pair.first;
84  out << ' ';
85  out << pair.second;
86 
87  return out;
88  }
JValue_t second
Definition: JPair.hh:129
JKey_t first
Definition: JPair.hh:128
template<class JKey_t, class JValue_t>
JReader& operator>> ( JReader in,
JPair< JKey_t, JValue_t > &  pair 
)
friend

Read pair from input.

Parameters
inreader
pairpair
Returns
reader

Definition at line 98 of file JPair.hh.

99  {
100  in >> pair.first;
101  in >> pair.second;
102 
103  return in;
104  }
JValue_t second
Definition: JPair.hh:129
JKey_t first
Definition: JPair.hh:128
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
template<class JKey_t, class JValue_t>
JWriter& operator<< ( JWriter out,
const JPair< JKey_t, JValue_t > &  pair 
)
friend

Write pair to output.

Parameters
outwriter
pairpair
Returns
writer

Definition at line 114 of file JPair.hh.

115  {
116  out << pair.first;
117  out << pair.second;
118 
119  return out;
120  }
JValue_t second
Definition: JPair.hh:129
JKey_t first
Definition: JPair.hh:128

Member Data Documentation

template<class JKey_t, class JValue_t>
JKey_t JTOOLS::JPair< JKey_t, JValue_t >::first

Definition at line 128 of file JPair.hh.

template<class JKey_t, class JValue_t>
JValue_t JTOOLS::JPair< JKey_t, JValue_t >::second

Definition at line 129 of file JPair.hh.


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