ProgrammeTable Class Reference

Programme ID<->Name of Programme Translation table monostate class. More...

#include <ProgrammeTable.h>

Collaboration diagram for ProgrammeTable:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ProgrammeTable ()
 Constructor - reads file data into table on first instance.
std::string getProgrammeId (const std::string &aProgName)
 Retrieves programme ID from project name.

Private Types

typedef std::map< std::string,
std::string > 
TTMap
typedef TTMap::const_iterator TTItr

Private Member Functions

TTItr findSubProgramme (const std::string &aProgGroup, const std::string &aProgName)
 Finds programme name when name has nonsense added to the end.
void loadData ()
 Fills translation table with data from programmes.csv.

Static Private Attributes

static TTMap msTransTable
 Integer ID<->Name String Translation Table.
static unsigned msNumInstances = 0
 Instance count.

Detailed Description

Programme ID<->Name of Programme Translation table monostate class.

Warning:
locates file programmes.csv using SQL path option

Member Typedef Documentation

typedef TTMap::const_iterator ProgrammeTable::TTItr [private]
typedef std::map<std::string, std::string> ProgrammeTable::TTMap [private]

Constructor & Destructor Documentation

ProgrammeTable::ProgrammeTable (  ) 

Constructor - reads file data into table on first instance.

References loadData(), and msNumInstances.


Member Function Documentation

ProgrammeTable::TTItr ProgrammeTable::findSubProgramme ( const std::string &  aProgGroup,
const std::string &  aProgName 
) [private]

Finds programme name when name has nonsense added to the end.

Parameters:
aProgGroup Initial part of programme string that defines group
aProgName Supplied programme name to find
Returns:
Position in msTransTable where programme name exists

References msTransTable.

Referenced by getProgrammeId().

std::string ProgrammeTable::getProgrammeId ( const std::string &  aProgName  ) 

Retrieves programme ID from project name.

Parameters:
aProgName Programme name string
Returns:
Programme ID

References Logger::addWarning(), findSubProgramme(), msTransTable, StringOps::ToLower(), and DefaultValues::varchar4def.

Referenced by VSAProject< DataType >::doit(), and ProgrammeID< DataType >::doit().

void ProgrammeTable::loadData (  )  [private]

Fills translation table with data from programmes.csv.

References ExpectNames::fileName, Options::getSqlPath(), msTransTable, and StringOps::ToLower().

Referenced by ProgrammeTable().


Member Data Documentation

Instance count.

Referenced by ProgrammeTable().

Integer ID<->Name String Translation Table.

Referenced by findSubProgramme(), getProgrammeId(), and loadData().


The documentation for this class was generated from the following files:
Generated on Mon Oct 4 10:39:36 2010 for WfcamSrc by  doxygen 1.6.3