emcConfigurationFile Class Reference

#include <emcConfigurationFile.h>

Inherits emcManageable.

Inheritance diagram for emcConfigurationFile:

Inheritance graph
[legend]
List of all members.

Detailed Description

A wrapper for an ASCII buffer that can be passed to the DataManager.

Definition at line 14 of file emcConfigurationFile.h.

Public Member Functions

 emcConfigurationFile ()
 default ctor.
 emcConfigurationFile (const char *filename)
 ctor from a file.
virtual ~emcConfigurationFile ()
 dtor. does nothing.
const PHTimeStamp & GetStartValTime (void) const
 Get the start of validity period of this object.
const PHTimeStamp & GetEndValTime (void) const
 Get the end of validity period of this object.
size_t GetSize (void) const
 How many characters in this (string) objects.
bool IsValid (void) const
 Tells if this object is OK or not.
bool IsValid (const PHTimeStamp &when) const
 Tells if this object is valid for a given time.
virtual const char * GetCategory (void) const
 Category = "CONFIG".
void SetValidityPeriod (const PHTimeStamp &t1, const PHTimeStamp &t2)
 Set the validity period of this object.
void SetContent (const char *content)
 Replace the (string) content.
const char * GetContent (void) const
 Get the content.
virtual void Reset (void)
 Reset (i.e. SetContent("")).
void Rewind (void)
 Rewind the internal character buffer.
bool GetLine (char *s, int size)
 Get the next line from the internal char buffer.

Private Attributes

int fCurrent
bool fIsValid
std::string fContent
PHTimeStamp fStart
PHTimeStamp fEnd


Constructor & Destructor Documentation

emcConfigurationFile::emcConfigurationFile  )  [inline]
 

default ctor.

Definition at line 19 of file emcConfigurationFile.h.

References fEnd.

emcConfigurationFile::emcConfigurationFile const char *  filename  ) 
 

ctor from a file.

Definition at line 5 of file emcConfigurationFile.C.

References fContent, fEnd, and fIsValid.

virtual emcConfigurationFile::~emcConfigurationFile  )  [inline, virtual]
 

dtor. does nothing.

Definition at line 26 of file emcConfigurationFile.h.


Member Function Documentation

virtual const char* emcConfigurationFile::GetCategory void   )  const [inline, virtual]
 

Category = "CONFIG".

Implements emcManageable.

Definition at line 44 of file emcConfigurationFile.h.

const char* emcConfigurationFile::GetContent void   )  const [inline]
 

Get the content.

Definition at line 55 of file emcConfigurationFile.h.

References fContent.

const PHTimeStamp& emcConfigurationFile::GetEndValTime void   )  const [inline]
 

Get the end of validity period of this object.

Definition at line 32 of file emcConfigurationFile.h.

References fEnd.

bool emcConfigurationFile::GetLine char *  s,
int  size
 

Get the next line from the internal char buffer.

Definition at line 32 of file emcConfigurationFile.C.

References fCurrent, and GetSize().

Referenced by EmcDynamicData::ParseConfigurationFile().

size_t emcConfigurationFile::GetSize void   )  const [inline]
 

How many characters in this (string) objects.

Definition at line 35 of file emcConfigurationFile.h.

References fContent.

Referenced by GetLine().

const PHTimeStamp& emcConfigurationFile::GetStartValTime void   )  const [inline]
 

Get the start of validity period of this object.

Definition at line 29 of file emcConfigurationFile.h.

References fStart.

bool emcConfigurationFile::IsValid const PHTimeStamp &  when  )  const [virtual]
 

Tells if this object is valid for a given time.

Reimplemented from emcManageable.

Definition at line 26 of file emcConfigurationFile.C.

References fEnd, fIsValid, and fStart.

bool emcConfigurationFile::IsValid void   )  const [inline]
 

Tells if this object is OK or not.

Definition at line 38 of file emcConfigurationFile.h.

References fIsValid.

Referenced by EmcDynamicData::EmcDynamicData().

virtual void emcConfigurationFile::Reset void   )  [inline, virtual]
 

Reset (i.e. SetContent("")).

Reimplemented from emcManageable.

Definition at line 58 of file emcConfigurationFile.h.

References fContent.

void emcConfigurationFile::Rewind void   )  [inline]
 

Rewind the internal character buffer.

Definition at line 61 of file emcConfigurationFile.h.

References fCurrent.

Referenced by EmcDynamicData::ParseConfigurationFile().

void emcConfigurationFile::SetContent const char *  content  )  [inline]
 

Replace the (string) content.

Definition at line 52 of file emcConfigurationFile.h.

References fContent, and fIsValid.

void emcConfigurationFile::SetValidityPeriod const PHTimeStamp &  t1,
const PHTimeStamp &  t2
[inline]
 

Set the validity period of this object.

Definition at line 47 of file emcConfigurationFile.h.

References fEnd, and fStart.


Member Data Documentation

std::string emcConfigurationFile::fContent [private]
 

Definition at line 69 of file emcConfigurationFile.h.

Referenced by emcConfigurationFile(), GetContent(), GetSize(), Reset(), and SetContent().

int emcConfigurationFile::fCurrent [private]
 

Definition at line 67 of file emcConfigurationFile.h.

Referenced by GetLine(), and Rewind().

PHTimeStamp emcConfigurationFile::fEnd [private]
 

Definition at line 71 of file emcConfigurationFile.h.

Referenced by emcConfigurationFile(), GetEndValTime(), IsValid(), and SetValidityPeriod().

bool emcConfigurationFile::fIsValid [private]
 

Definition at line 68 of file emcConfigurationFile.h.

Referenced by emcConfigurationFile(), IsValid(), and SetContent().

PHTimeStamp emcConfigurationFile::fStart [private]
 

Definition at line 70 of file emcConfigurationFile.h.

Referenced by GetStartValTime(), IsValid(), and SetValidityPeriod().


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