Anp::KeyPair< T > Class Template Reference

#include <KeyPair.h>

List of all members.

Public Member Functions

 KeyPair ()
 KeyPair (const T key1, const T key2)
 ~KeyPair ()
bool SetKeys (const T key1, const T key2)
const T Key1 () const
const T Key2 () const
bool operator< (const KeyPair &rhs) const
void Print () const
void Print (std::ostream &o) const

Private Attributes

bool fInit
fKey1
fKey2

Detailed Description

template<typename T>
class Anp::KeyPair< T >

Definition at line 9 of file KeyPair.h.


Constructor & Destructor Documentation

template<typename T >
Anp::KeyPair< T >::KeyPair (  )  [inline]

Definition at line 39 of file KeyPair.h.

00040       :fInit(false), fKey1(), fKey2()
00041    {
00042    }

template<typename T >
Anp::KeyPair< T >::KeyPair ( const T  key1,
const T  key2 
) [inline]

Definition at line 46 of file KeyPair.h.

00047       :fInit(true), fKey1(key1), fKey2(key2)
00048    {
00049    }

template<typename T >
Anp::KeyPair< T >::~KeyPair (  )  [inline]

Definition at line 15 of file KeyPair.h.

00015 {}


Member Function Documentation

template<typename T >
const T Anp::KeyPair< T >::Key1 (  )  const [inline]

Definition at line 19 of file KeyPair.h.

References Anp::KeyPair< T >::fKey1.

Referenced by Anp::Plot::Data::Fill().

00019 { return fKey1; }

template<typename T >
const T Anp::KeyPair< T >::Key2 (  )  const [inline]

Definition at line 20 of file KeyPair.h.

References Anp::KeyPair< T >::fKey2.

Referenced by Anp::Plot::Data::Fill().

00020 { return fKey2; }

template<typename T >
bool Anp::KeyPair< T >::operator< ( const KeyPair< T > &  rhs  )  const [inline]

Definition at line 68 of file KeyPair.h.

References Anp::KeyPair< T >::fKey1, and Anp::KeyPair< T >::fKey2.

00069    {
00070       if(fKey1 < rhs.fKey1)
00071       {
00072          return true;
00073       }
00074       else if(rhs.fKey1 < fKey1)
00075       {
00076          return false;
00077       }
00078       else if(fKey2 < rhs.fKey2)
00079       {
00080          return true;
00081       }
00082 
00083       return false;
00084    }

template<typename T >
void Anp::KeyPair< T >::Print ( std::ostream &  o  )  const [inline]

Definition at line 88 of file KeyPair.h.

References Anp::KeyPair< T >::fKey1, and Anp::KeyPair< T >::fKey2.

00089    {
00090       o << "KeyPair: key 1 = " << fKey1 << " and key 2 = " << fKey2 << std::endl;
00091    }

template<typename T >
void Anp::KeyPair< T >::Print ( void   )  const [inline]

Definition at line 95 of file KeyPair.h.

00096    {
00097       this -> Print(std::cout);
00098    }

template<typename T >
bool Anp::KeyPair< T >::SetKeys ( const T  key1,
const T  key2 
) [inline]

Definition at line 54 of file KeyPair.h.

References Anp::KeyPair< T >::fInit, Anp::KeyPair< T >::fKey1, and Anp::KeyPair< T >::fKey2.

00055    {
00056       if(!fInit)
00057       {
00058          fInit = true; fKey1 = key1; fKey2 = key2;
00059          return true;
00060       }
00061 
00062       std::cerr << "This KeyPair is already set" << std::endl;
00063       return false;
00064    }


Member Data Documentation

template<typename T >
bool Anp::KeyPair< T >::fInit [private]

Definition at line 29 of file KeyPair.h.

Referenced by Anp::KeyPair< T >::SetKeys().

template<typename T >
T Anp::KeyPair< T >::fKey1 [private]
template<typename T >
T Anp::KeyPair< T >::fKey2 [private]

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

Generated on 3 Dec 2018 for loon by  doxygen 1.6.1