Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

clCfgFile Class Reference

#include <CfgFile.hh>

List of all members.

Public Member Functions

 clCfgFile ()
 clCfgFile (const char *)
 ~clCfgFile ()
void SetFileName (const char *)
 Read configuration file.

bool GetStr (const char *, char *)
 Get value for key.

bool GetInt (const char *, int *)
bool GetInt (const char *, long *)
bool GetFlt (const char *, float *)
bool GetFlt (const char *, double *)
int GetFltArray (const char *, float *)
int GetFltArray (const char *, double *)

Private Member Functions

void ReadFile (const char *)
void FreeAll ()

Private Attributes

int iEntryCount
clAlloc Names [CFGF_MAX_ENTRIES]
clAlloc Values [CFGF_MAX_ENTRIES]


Constructor & Destructor Documentation

clCfgFile::clCfgFile  ) 
 

Definition at line 83 of file CfgFile.cc.

References iEntryCount.

clCfgFile::clCfgFile const char *   ) 
 

Definition at line 89 of file CfgFile.cc.

References iEntryCount, and ReadFile().

clCfgFile::~clCfgFile  ) 
 

Definition at line 103 of file CfgFile.cc.

References FreeAll().


Member Function Documentation

void clCfgFile::ReadFile const char *   )  [private]
 

Definition at line 30 of file CfgFile.cc.

References CFGF_BUFSIZE, CFGF_MAX_ENTRIES, iEntryCount, Names, and Values.

Referenced by clCfgFile(), and SetFileName().

void clCfgFile::FreeAll  )  [private]
 

Definition at line 70 of file CfgFile.cc.

References iEntryCount, Names, and Values.

Referenced by SetFileName(), and ~clCfgFile().

void clCfgFile::SetFileName const char *   ) 
 

Read configuration file.

You can call this many times. Previous settings are flushed from the memory every time this method is called.

Parameters:
cpFileName Name of configuration file

Definition at line 96 of file CfgFile.cc.

References FreeAll(), and ReadFile().

Referenced by clBeamAudioUI::clBeamAudioUI(), clComediSrv::clComediSrv(), clGUILofar::clGUILofar(), clSoundProxy::clSoundProxy(), clSoundSrv2::clSoundSrv2(), clSoundSrvA::clSoundSrvA(), clStreamDist::clStreamDist(), clSpectrum::GetCfg(), clSoundUI::GetCfg(), clLevel::GetCfg(), clGUITransient::GetCfg(), clGUILocate::GetCfg(), clGUILevel::GetCfg(), clDirection3::GetCfg(), clDirection2::GetCfg(), clBeamAudio::GetCfg(), clLofarDemon::GetDataHdr(), clSaveSrv::Initialize(), clLofarDemon::Initialize(), clLocate::Initialize(), clFileSrv::Main(), clBeamSrv2Master::Main(), and clBeamSrvMaster::Main().

bool clCfgFile::GetStr const char *  ,
char * 
 

Get value for key.

Parameters:
cpKey Key name
cpVal Value
Returns:
Success

Definition at line 115 of file CfgFile.cc.

References iEntryCount, Names, and Values.

Referenced by clStreamDist::AudioInThread(), clSoundProxy::clSoundProxy(), clDirection::Exec(), clSoundSrv2::GetAudioCfg(), clComediSrv::GetAudioCfg(), clSpectrum::GetCfg(), clSoundUI::GetCfg(), clLevel::GetCfg(), clDirection3::GetCfg(), clDirection2::GetCfg(), clBeamAudio::GetCfg(), clLofarDemon::GetDataHdr(), clSaveSrv::Initialize(), clStreamDist::Main(), clBeamSrv2Master::Main(), and clBeamSrvMaster::Main().

bool clCfgFile::GetInt const char *  ,
int * 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 131 of file CfgFile.cc.

References iEntryCount, Names, and Values.

Referenced by clStreamDist::AudioInThread(), clSoundSrvA::AudioInThread(), clSoundSrv2::AudioInThread(), clComediSrv::AudioInThread(), clSpectGUI::Build(), clSpectGUI::BuildDrawingPrims(), clGUILofar::BuildDrawingPrims(), clBeamAudioUI::clBeamAudioUI(), clGUIDir::clGUIDir(), clGUILofar::clGUILofar(), clSoundProxy::clSoundProxy(), clSoundSrv::clSoundSrv(), clSpectGUI::clSpectGUI(), clUIServer::clUIServer(), clSaveSrv::CreateFile2(), clGUIDir::Exec(), clDirection::Exec(), clSoundSrvA::GetAudioCfg(), clSoundSrv2::GetAudioCfg(), clComediSrv::GetAudioCfg(), clSpectrum::GetCfg(), clSoundUI::GetCfg(), clLevel::GetCfg(), clGUILocate::GetCfg(), clGUILevel::GetCfg(), clDirection3::GetCfg(), clDirection2::GetCfg(), clBeamAudio::GetCfg(), clDirection::InitArray(), clSoundSrvA::InitCompress(), clSoundSrv2::InitCompress(), clComediSrv::InitCompress(), clLofarDemon::InitFFT(), clLofarDemon::InitFilter(), clBeamSrv2Master::InitFilterBank(), clBeamSrvMaster::InitFilterBank(), clSaveSrv::Initialize(), clLocate::Initialize(), clSoundSrvA::Main(), clSoundSrv2::Main(), clFileSrv::Main(), clComediSrv::Main(), clBeamSrv2Master::Main(), clBeamSrvMaster::Main(), clSpectGUI::OnPaletteActivate(), clGUIDir::OnPaletteActivate(), clBeamSrv2Master::ReadConfig(), clBeamSrvMaster::ReadConfig(), clSoundSrvA::ServeClientThread(), clSoundSrv2::ServeClientThread(), clComediSrv::ServeClientThread(), and clSoundSrv::WaitConnectExec().

bool clCfgFile::GetInt const char *  ,
long * 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 147 of file CfgFile.cc.

References iEntryCount, Names, and Values.

bool clCfgFile::GetFlt const char *  ,
float * 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 163 of file CfgFile.cc.

References iEntryCount, Names, and Values.

Referenced by clGUILofar::clGUILofar(), clGUIDir::Exec(), clComediSrv::GetAudioCfg(), clGUILevel::GetCfg(), clDirection3::GetCfg(), clDirection2::GetCfg(), clBeamAudio::GetCfg(), clDirection::InitArray(), clLocate::Initialize(), clBeamSrv2Master::ReadConfig(), and clBeamSrvMaster::ReadConfig().

bool clCfgFile::GetFlt const char *  ,
double * 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 179 of file CfgFile.cc.

References iEntryCount, Names, and Values.

int clCfgFile::GetFltArray const char *  ,
float * 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 195 of file CfgFile.cc.

References iEntryCount, Names, and Values.

Referenced by clDirection::InitArray().

int clCfgFile::GetFltArray const char *  ,
double * 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


Member Data Documentation

int clCfgFile::iEntryCount [private]
 

Definition at line 36 of file CfgFile.hh.

Referenced by clCfgFile(), FreeAll(), GetFlt(), GetFltArray(), GetInt(), GetStr(), and ReadFile().

clAlloc clCfgFile::Names[CFGF_MAX_ENTRIES] [private]
 

Definition at line 37 of file CfgFile.hh.

Referenced by FreeAll(), GetFlt(), GetFltArray(), GetInt(), GetStr(), and ReadFile().

clAlloc clCfgFile::Values[CFGF_MAX_ENTRIES] [private]
 

Definition at line 38 of file CfgFile.hh.

Referenced by FreeAll(), GetFlt(), GetFltArray(), GetInt(), GetStr(), and ReadFile().


The documentation for this class was generated from the following files:
Generated on Sun Oct 26 19:12:14 2003 for HASAS by doxygen 1.3.3