TempReader Class Reference

#include <TempReader.h>

List of all members.

Public Member Functions

 TempReader ()
virtual ~TempReader ()
void AddTemps (std::string filename)
void AddTemps (const char *filename)
float GetTempFromTime (time_t time)
std::map< time_t, float > * GetTempsMap ()
std::map< time_t, float >::iterator GetTempBegin ()
std::map< time_t, float >::iterator GetTempEnd ()

Private Attributes

std::map< time_t, float > fTemperatures

Detailed Description

Definition at line 20 of file TempReader.h.


Constructor & Destructor Documentation

TempReader::TempReader (  ) 

Definition at line 22 of file TempReader.cxx.

00022                       :
00023   fTemperatures()
00024 {
00025 }

TempReader::~TempReader (  )  [virtual]

Definition at line 27 of file TempReader.cxx.

00028 {}


Member Function Documentation

void TempReader::AddTemps ( const char *  filename  ) 

Definition at line 30 of file TempReader.cxx.

References AddTemps(), and s().

00031 {
00032   string s(filename);
00033   AddTemps(s);
00034 }

void TempReader::AddTemps ( std::string  filename  ) 
std::map< time_t, float >::iterator TempReader::GetTempBegin (  )  [inline]

Definition at line 40 of file TempReader.h.

References fTemperatures.

00041 {return fTemperatures.begin();}

std::map< time_t, float >::iterator TempReader::GetTempEnd (  )  [inline]

Definition at line 42 of file TempReader.h.

References fTemperatures.

00043 {return fTemperatures.end();}

float TempReader::GetTempFromTime ( time_t  time  ) 

Definition at line 70 of file TempReader.cxx.

References fTemperatures, and it.

Referenced by UberHeader::ReadTemperature().

00071 {
00072   if(fTemperatures.size()<1){
00073     return -99.9;
00074   }
00075   map<time_t, float>::iterator it(fTemperatures.lower_bound(time));
00076   if(it==fTemperatures.end()){
00077     return -99.9;
00078   }
00079   if(it==fTemperatures.begin()){
00080     return -99.9;
00081   }
00082   return it->second;
00083 
00084 }//end GetTempFromTime

std::map< time_t, float > * TempReader::GetTempsMap (  )  [inline]

Definition at line 39 of file TempReader.h.

References fTemperatures.

00039 {return &fTemperatures;}


Member Data Documentation

std::map<time_t,float> TempReader::fTemperatures [private]

Definition at line 34 of file TempReader.h.

Referenced by GetTempBegin(), GetTempEnd(), GetTempFromTime(), and GetTempsMap().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1