|
| CustomDataTimeContainer () |
|
| ~CustomDataTimeContainer () |
|
MediumData & | operator[] (const T &key) |
|
bool | empty () const |
|
int | size () const |
|
Data | get (const T &t=DB_CDATA_ALL_OUTER_KEYS, double b=DB_CDATA_ALL_MEDIUM_KEYS, double r=DB_CDATA_ALL_INNER_KEYS, const Time &time_key=DB_CDATA_ALL_TIME_KEYS) const |
|
Data | get (const T &tx, const T &rx, const Time &time_key=DB_CDATA_ALL_TIME_KEYS) const |
|
bool | insert (const Data &data, const T &t=DB_CDATA_ALL_OUTER_KEYS, double b=DB_CDATA_ALL_MEDIUM_KEYS, double r=DB_CDATA_ALL_INNER_KEYS, const Time &time_key=DB_CDATA_ALL_TIME_KEYS) |
|
void | replace (const Data &data, const T &t=DB_CDATA_ALL_OUTER_KEYS, double b=DB_CDATA_ALL_MEDIUM_KEYS, double r=DB_CDATA_ALL_INNER_KEYS, const Time &time_key=DB_CDATA_ALL_TIME_KEYS) |
|
void | erase (const T &t=DB_CDATA_ALL_OUTER_KEYS, double b=DB_CDATA_ALL_MEDIUM_KEYS, double r=DB_CDATA_ALL_INNER_KEYS, const Time &time_key=DB_CDATA_ALL_TIME_KEYS) |
|
void | clear () |
|
void | setDebug (bool flag) |
|
bool | usingDebug () |
|
|
typedef ::std::map< time_t, Data > | TimeData |
|
typedef TimeData::iterator | CDTCTimeIt |
|
typedef TimeData::reverse_iterator | CDTCTimeRIt |
|
typedef TimeData::const_iterator | CDTCTimeCIt |
|
typedef TimeData::const_reverse_iterator | CDTCTimeCRIt |
|
typedef ::std::map< double, TimeData, InComp > | InnerData |
|
typedef InnerData::iterator | CDCInnerIt |
|
typedef InnerData::reverse_iterator | CDCInnerRIt |
|
typedef InnerData::const_iterator | CDCInnerCIt |
|
typedef InnerData::const_reverse_iterator | CDCInnerCRIt |
|
typedef ::std::map< double, InnerData, MidComp > | MediumData |
|
typedef MediumData::iterator | CDCMediumIt |
|
typedef MediumData::const_iterator | CDCMediumCIt |
|
typedef MediumData::reverse_iterator | CDCMediumRIt |
|
typedef MediumData::const_reverse_iterator | CDCMediumCRIt |
|
typedef ::std::map< T, MediumData, OutComp > | CustomContainer |
|
typedef CustomContainer::iterator | CDCIt |
|
typedef CustomContainer::reverse_iterator | CDCRIt |
|
typedef CustomContainer::const_iterator | CDCCIt |
|
typedef CustomContainer::const_reverse_iterator | CDCCRIt |
|
typedef ::std::pair< Data, bool > | DataFind |
|
template<class T, class MidFunctor, class InFunctor, class Data, class OutComp = ::std::less<T>, class MidComp = ::std::less<double>, class InComp = ::std::less<double>>
class woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >
Class for managing custom db data.
CustomDataTimeContainer is a template that manages environmental data provided by the user. It sorts data by the first template parameter then by two doubles, (e.g. bearing and range) and woss::Time
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp = ::std::less<T>, class MidComp = ::std::less<double>, class InComp = ::std::less<double>>
The outer level map, that links a the first template parameter to a MediumData instance
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp = ::std::less<T>, class MidComp = ::std::less<double>, class InComp = ::std::less<double>>
The inner level map, that links a double to TimeData
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp = ::std::less<T>, class MidComp = ::std::less<double>, class InComp = ::std::less<double>>
The medium level map, that links a double to a InnerData instance
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp = ::std::less<T>, class MidComp = ::std::less<double>, class InComp = ::std::less<double>>
The Time map, that links a time_t to actual data
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp , class MidComp , class InComp >
Finds the given keys. Returns NULL if not found
- Parameters
-
t | const reference to a T instance, default value is DB_CDATA_ALL_OUTER_KEYS. Default value means valid for all possible instances of T |
b | double, default value is DB_CDATA_ALL_MEDIUM_KEYS. Default value means valid for all possible doubles of MediumData |
r | double, default value is DB_CDATA_ALL_INNER_KEYS. Default value means valid for all possible doubles of InnerData |
time_key | const reference to a Time instance, default value is DB_CDATA_ALL_TIME_KEYS. Default value means it is valid for all possible Time values of TimeData
|
- Returns
- valid Data object if map is not empty. Data() otherwise
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp = ::std::less<T>, class MidComp = ::std::less<double>, class InComp = ::std::less<double>>
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp , class MidComp , class InComp >
void woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::erase |
( |
const T & |
t = DB_CDATA_ALL_OUTER_KEYS , |
|
|
double |
b = DB_CDATA_ALL_MEDIUM_KEYS , |
|
|
double |
r = DB_CDATA_ALL_INNER_KEYS , |
|
|
const Time & |
time_key = DB_CDATA_ALL_TIME_KEYS |
|
) |
| |
Erases a Data object for given parameters.
- Parameters
-
t | const reference to a T instance, default value is DB_CDATA_ALL_OUTER_KEYS. Default value means valid for all possible instances of T |
b | double, default value is DB_CDATA_ALL_MEDIUM_KEYS. Default value means valid for all possible doubles of MediumData |
r | double, default value is DB_CDATA_ALL_INNER_KEYS. Default value means valid for all possible doubles of InnerData |
time_key | const reference to a Time instance, default value is DB_CDATA_ALL_TIME_KEYS. Default value means it is valid for all possible Time values of TimeData |
- Returns
- true if function was successful, false otherwise
Referenced by woss::WossDbManager::eraseCustomSSP().
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp , class MidComp , class InComp >
CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::DataFind woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::find |
( |
const T & |
t = DB_CDATA_ALL_OUTER_KEYS , |
|
|
double |
b = DB_CDATA_ALL_MEDIUM_KEYS , |
|
|
double |
r = DB_CDATA_ALL_INNER_KEYS , |
|
|
const Time & |
time_key = DB_CDATA_ALL_TIME_KEYS |
|
) |
| const |
|
protected |
Finds the given keys. Returns NULL if not found
- Parameters
-
t | const reference to a T instance, default value is DB_CDATA_ALL_OUTER_KEYS. Default value means valid for all possible instances of T |
b | double, default value is DB_CDATA_ALL_MEDIUM_KEYS. Default value means valid for all possible doubles of MediumData |
r | double, default value is DB_CDATA_ALL_INNER_KEYS. Default value means valid for all possible doubles of InnerData |
time_key | const reference to a Time instance, default value is DB_CDATA_ALL_TIME_KEYS. Default value means it is valid for all possible Time values of TimeData
|
- Returns
- pair of Data and a boolean. if boolean == true ==> Data is valid. Data is not valid otherwise.
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp , class MidComp , class InComp >
Data woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get |
( |
const T & |
t = DB_CDATA_ALL_OUTER_KEYS , |
|
|
double |
b = DB_CDATA_ALL_MEDIUM_KEYS , |
|
|
double |
r = DB_CDATA_ALL_INNER_KEYS , |
|
|
const Time & |
time_key = DB_CDATA_ALL_TIME_KEYS |
|
) |
| const |
Finds and returns a const pointer to a Data for given parameters
- Parameters
-
t | const reference to a T instance, default value is DB_CDATA_ALL_OUTER_KEYS. Default value means valid for all possible instances of T |
b | double, default value is DB_CDATA_ALL_MEDIUM_KEYS. Default value means valid for all possible doubles of MediumData |
r | double, default value is DB_CDATA_ALL_INNER_KEYS. Default value means valid for all possible doubles of InnerData |
time_key | const reference to a Time instance, default value is DB_CDATA_ALL_TIME_KEYS. Default value means it is valid for all possible Time values of TimeData |
- Returns
- valid Data object if map is not empty. Data() otherwise
Referenced by woss::WossDbManager::getAverageSSP(), woss::WossDbManager::getCustomSSP(), and woss::WossDbManager::getSSP().
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp , class MidComp , class InComp >
Data woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get |
( |
const T & |
tx, |
|
|
const T & |
rx, |
|
|
const Time & |
time_key = DB_CDATA_ALL_TIME_KEYS |
|
) |
| const |
Finds and returns a const pointer to a Data for the nearest match in all generated keys
- Parameters
-
tx | const reference to a T instance |
rx | const reference to a T instance |
time_key | const reference to a Time instance, default value is DB_CDATA_ALL_TIME_KEYS. Default value means it is valid for all possible Time values of TimeData |
- Returns
- valid Data object if map is not empty. Data() otherwise
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp , class MidComp , class InComp >
bool woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::insert |
( |
const Data & |
data, |
|
|
const T & |
t = DB_CDATA_ALL_OUTER_KEYS , |
|
|
double |
b = DB_CDATA_ALL_MEDIUM_KEYS , |
|
|
double |
r = DB_CDATA_ALL_INNER_KEYS , |
|
|
const Time & |
time_key = DB_CDATA_ALL_TIME_KEYS |
|
) |
| |
Inserts a Data object for given parameters. If keys are already present, the object is discarded
- Parameters
-
data | const reference to a Data object to be inserted |
t | const reference to a T instance, default value is DB_CDATA_ALL_OUTER_KEYS. Default value means valid for all possible instances of T |
b | double, default value is DB_CDATA_ALL_MEDIUM_KEYS. Default value means valid for all possible doubles of MediumData |
r | double, default value is DB_CDATA_ALL_INNER_KEYS. Default value means valid for all possible doubles of InnerData |
time_key | const reference to a Time instance, default value is DB_CDATA_ALL_TIME_KEYS. Default value means it is valid for all possible Time values of TimeData |
- Returns
- true if function was successful, false otherwise
Referenced by woss::WossDbManager::importCustomSSP(), and woss::WossDbManager::setCustomSSP().
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp = ::std::less<T>, class MidComp = ::std::less<double>, class InComp = ::std::less<double>>
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp , class MidComp , class InComp >
void woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::replace |
( |
const Data & |
data, |
|
|
const T & |
t = DB_CDATA_ALL_OUTER_KEYS , |
|
|
double |
b = DB_CDATA_ALL_MEDIUM_KEYS , |
|
|
double |
r = DB_CDATA_ALL_INNER_KEYS , |
|
|
const Time & |
time_key = DB_CDATA_ALL_TIME_KEYS |
|
) |
| |
Replaces a Data object for given parameters. If keys are not present, the object is inserted
- Parameters
-
data | const reference to a Data object to be inserted |
t | const reference to a T instance, default value is DB_CDATA_ALL_OUTER_KEYS. Default value means valid for all possible instances of T |
b | double, default value is DB_CDATA_ALL_MEDIUM_KEYS. Default value means valid for all possible doubles of MediumData |
r | double, default value is DB_CDATA_ALL_INNER_KEYS. Default value means valid for all possible doubles of InnerData |
time_key | const reference to a Time instance, default value is DB_CDATA_ALL_TIME_KEYS. Default value means it is valid for all possible Time values of TimeData |
- Returns
- true if function was successful, false otherwise
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp = ::std::less<T>, class MidComp = ::std::less<double>, class InComp = ::std::less<double>>
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp = ::std::less<T>, class MidComp = ::std::less<double>, class InComp = ::std::less<double>>
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp = ::std::less<T>, class MidComp = ::std::less<double>, class InComp = ::std::less<double>>
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp = ::std::less<T>, class MidComp = ::std::less<double>, class InComp = ::std::less<double>>
data map
Referenced by woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::empty(), woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::operator[](), and woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::size().
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp = ::std::less<T>, class MidComp = ::std::less<double>, class InComp = ::std::less<double>>
Debug flag
Referenced by woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::setDebug(), and woss::CustomDataTimeContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::usingDebug().