List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
rdet::RStationListManager Class Reference

Common implementation of the station list manager. More...

#include "rdet/RStationListManager.h"

Classes

struct  ByStationId
 
struct  StationData
 

Public Member Functions

void AddOrReplaceStationData (StationData &station)
 adds station record and might overright old entry More...
 
void ClearStationList ()
 
void ClearStations (const std::string source_type)
 Removes all stations from fStations with fSource == source_type. More...
 
bool ConditionalAddStationData (StationData &station)
 adds station record only if it does not already exist More...
 
bool DumpXML (std::ostream &output, const std::string &indent="") const
 
template<>
VManager::Status GetData (int &returnData, const string &componentProperty, const VManager::IndexMap &componentIndex) const
 
template<>
VManager::Status GetData (double &returnData, const string &componentProperty, const VManager::IndexMap &componentIndex) const
 
template<>
VManager::Status GetData (string &returnData, const string &componentProperty, const VManager::IndexMap &componentIndex) const
 
template<typename T >
det::VManager::Status GetData (T &returnData, const std::string &componentProperty, const det::VManager::IndexMap &componentIndex) const
 
template<>
VManager::Status GetData (vector< int > &returnData, const string &componentProperty, const VManager::IndexMap &) const
 
template<>
VManager::Status GetData (vector< vector< int > > &, const string &, const VManager::IndexMap &) const
 
bool HasStationData (const int id) const
 
bool RemoveStationData (StationData &station)
 Removes station data if manager has station. More...
 

Static Public Member Functions

static int GetStationId (const det::VManager::IndexMap &componentIndex)
 

Private Types

typedef multi_index_container
< StationData,::boost::multi_index::indexed_by
< ::boost::multi_index::ordered_unique
< ::boost::multi_index::tag
< ByStationId >
, BOOST_MULTI_INDEX_MEMBER(StationData,
int, fId) > > > 
StationContainer
 
typedef index
< StationContainer,
ByStationId >::type 
StationIdIndex
 

Private Member Functions

void GetFullStationList (std::vector< int > &returnList) const
 

Private Attributes

StationContainer fStations
 

Detailed Description

Common implementation of the station list manager.

This class is used by both, RStationListXMLManager and RStationListSQLManager. Adaption from SStstionManager.

Author
J.Rautenberg
Darko Veberic
Date
03 Nov 2008
27 MAR 2012

Definition at line 39 of file RStationListManager.h.

Member Typedef Documentation

typedef multi_index_container< StationData, ::boost::multi_index::indexed_by< ::boost::multi_index::ordered_unique< ::boost::multi_index::tag<ByStationId>, BOOST_MULTI_INDEX_MEMBER(StationData, int, fId) > > > rdet::RStationListManager::StationContainer
private

Definition at line 153 of file RStationListManager.h.

Definition at line 155 of file RStationListManager.h.

Member Function Documentation

void rdet::RStationListManager::AddOrReplaceStationData ( RStationListManager::StationData station)
void rdet::RStationListManager::ClearStationList ( )
inline

Definition at line 132 of file RStationListManager.h.

References fStations.

void rdet::RStationListManager::ClearStations ( const std::string  source_type)

Removes all stations from fStations with fSource == source_type.

Definition at line 192 of file RStationListManager.cc.

bool rdet::RStationListManager::ConditionalAddStationData ( RStationListManager::StationData station)
bool rdet::RStationListManager::DumpXML ( std::ostream &  output,
const std::string &  indent = "" 
) const

Definition at line 262 of file RStationListManager.cc.

References rdet::StringToXMLString().

template<>
VManager::Status rdet::RStationListManager::GetData ( int &  returnData,
const string &  componentProperty,
const VManager::IndexMap componentIndex 
) const

Definition at line 23 of file RStationListManager.cc.

template<>
VManager::Status rdet::RStationListManager::GetData ( double &  returnData,
const string &  componentProperty,
const VManager::IndexMap componentIndex 
) const

Definition at line 57 of file RStationListManager.cc.

template<>
VManager::Status rdet::RStationListManager::GetData ( string &  returnData,
const string &  componentProperty,
const VManager::IndexMap componentIndex 
) const

Definition at line 85 of file RStationListManager.cc.

template<typename T >
det::VManager::Status rdet::RStationListManager::GetData ( T &  returnData,
const std::string &  componentProperty,
const det::VManager::IndexMap componentIndex 
) const

This will be specialized for "int", "double", "string", "vector<int>", and "vector<vector<int>>".

The following queries are implemented:

type and valid component properties:

int: inGrid

double: northing, easting, altitude

string: name, commission, decommission

vector<int>: fullStationList

vector<vector<int>>: fullStationGroups

Referenced by rdet::RStationListSQLManager::GetStationListData(), rdet::RStationListXMLManager::GetStationListData(), rdet::RSimulationStationListManager::GetStationListData(), rdet::RStationListXMLManager::GetStationListDataVectorInt(), and rdet::RSimulationStationListManager::GetStationListDataVectorInt().

template<>
VManager::Status rdet::RStationListManager::GetData ( vector< int > &  returnData,
const string &  componentProperty,
const VManager::IndexMap  
) const

Definition at line 119 of file RStationListManager.cc.

template<>
VManager::Status rdet::RStationListManager::GetData ( vector< vector< int > > &  ,
const string &  ,
const VManager::IndexMap  
) const

Definition at line 143 of file RStationListManager.cc.

void rdet::RStationListManager::GetFullStationList ( std::vector< int > &  returnList) const
private

Definition at line 231 of file RStationListManager.cc.

static int rdet::RStationListManager::GetStationId ( const det::VManager::IndexMap componentIndex)
inlinestatic

Definition at line 137 of file RStationListManager.h.

bool rdet::RStationListManager::HasStationData ( const int  id) const

Definition at line 222 of file RStationListManager.cc.

bool rdet::RStationListManager::RemoveStationData ( RStationListManager::StationData station)

Removes station data if manager has station.

Definition at line 207 of file RStationListManager.cc.

References rdet::RStationListManager::StationData::fId.

Member Data Documentation

StationContainer rdet::RStationListManager::fStations
mutableprivate

Definition at line 157 of file RStationListManager.h.

Referenced by ClearStationList().


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

, generated on Tue Sep 26 2023.