|
| CustomDataContainer () |
|
| ~CustomDataContainer () |
|
MediumData & | operator[] (const T &key) |
|
bool | empty () const |
|
int | size () const |
|
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 |
|
const Data * | get (const T &tx, const T &rx) 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) |
|
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) |
|
void | erase (const T &t=DB_CDATA_ALL_OUTER_KEYS, double b=DB_CDATA_ALL_MEDIUM_KEYS, double r=DB_CDATA_ALL_INNER_KEYS) |
|
void | clear () |
|
void | setDebug (bool flag) |
|
bool | usingDebug () |
|
|
typedef ::std::map< double, Data, 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 |
|
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::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >
Class for managing custom db data.
CustomDataContainer 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)
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>>
typedef ::std::map< double, Data, InComp > woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::InnerData |
|
protected |
The inner level map, that links a double to actual data
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>>
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp , class MidComp , class InComp >
void woss::CustomDataContainer< 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 |
|
) |
| |
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp , class MidComp , class InComp >
const Data * woss::CustomDataContainer< 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 |
|
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 |
- Returns
- const pointer to a Data object, NULL if not found
Referenced by woss::WossDbManager::setCustomSediment().
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp , class MidComp , class InComp >
const Data * woss::CustomDataContainer< 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 |
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp , class MidComp , class InComp >
const Data * woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::get |
( |
const T & |
tx, |
|
|
const T & |
rx |
|
) |
| const |
Finds and returns a const pointer to a Data for the nearest match in all generated keys
- Parameters
-
generator | const reference to a T instance |
tobefound | const reference to a T instance |
- Returns
- const pointer to a Data if found, NULL otherwise
template<class T , class MidFunctor , class InFunctor , class Data , class OutComp , class MidComp , class InComp >
bool woss::CustomDataContainer< 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 |
|
) |
| |
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 |
- Returns
- true if function was successful, false otherwise
Referenced by woss::WossDbManager::setCustomAltimetry(), woss::WossDbManager::setCustomBathymetry(), and woss::WossDbManager::setCustomSediment().
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::CustomDataContainer< 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 |
|
) |
| |
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 |
- 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::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::empty(), woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::operator[](), and woss::CustomDataContainer< 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::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::setDebug(), and woss::CustomDataContainer< T, MidFunctor, InFunctor, Data, OutComp, MidComp, InComp >::usingDebug().