World Ocean Simulation System (WOSS) library
|
Partial specialization for pointers. More...
#include <woss-creator-container.h>
Public Member Functions | |
bool | isEmpty () const |
int | size () const |
bool | insert (Data *data, Location *const tx, Location *const rx) |
bool | insert (Data *data, const CoordZ &tx, const CoordZ &rx) |
Data * | get (Location *const tx, Location *const rx) const |
Data * | get (const CoordZ &tx, const CoordZ &rx) const |
Data *& | accessAllLocations () |
void | erase (Location *const tx, Location *const rx) |
void | erase (const CoordZ &tx, const CoordZ &rx) |
void | replace (Data *const data, Location *const tx, Location *const rx) |
void | replace (Data *const data, const CoordZ &tx, const CoordZ &rx) |
void | clear () |
void | setDebug (bool flag) |
bool | isUsingDebug () const |
Static Public Attributes | |
static Location *const | ALL_LOCATIONS = NULL |
static const CoordZ | ALL_COORDZ = CoordZ() |
Protected Types | |
typedef ::std::map< Location *, Data * > | InnerContainer |
typedef InnerContainer::iterator | ICIter |
typedef InnerContainer::reverse_iterator | ICRIter |
typedef InnerContainer::const_iterator | ICCIter |
typedef InnerContainer::const_reverse_iterator | ICCRIter |
typedef ::std::map< Location *, InnerContainer > | DataContainer |
typedef DataContainer::iterator | DCIter |
typedef DataContainer::const_iterator | DCCIter |
typedef DataContainer::reverse_iterator | DCRIter |
typedef DataContainer::const_reverse_iterator | DCRCIter |
Protected Member Functions | |
DCIter | find (const CoordZ &coordinates) |
ICIter | find (const CoordZ &coordinates, const DCIter &iter) |
Location * | createLocation (const CoordZ &coordinates) |
Protected Attributes | |
DataContainer | data_container |
bool | debug |
Partial specialization for pointers.
Partial specialiation for heap-allocated pointers. PLEASE NOTE that object class type must implement clone() method
|
inline |
Returns a reference to the Data pointer associated to transmitter and receiver Location equal to ALL_LOCATIONS. If no keys were present, the Data pointer is defaulted to NULL and a reference to it is returned. The user has to properly delete the pointer prior changing it
|
inline |
Returns a Data pointer for given keys. If the keys are not found a NULL pointer is returned
tx | const reference to a valid transmitter CoordZ |
rx | const reference to a valid receiver CoordZ |
References woss::WossCreatorContainer< Data >::find().
|
inline |
Returns a Data pointer for given keys. If the keys are not found a NULL pointer is returned
tx | const pointer to a valid transmitter Location |
rx | const pointer to a valid receiver Location |
References woss::Location::clone().
|
inline |
Inserts an object into the container. If the keys are already present, the object is NOT inserted and it is deleted
data | const pointer to a Data object to be inserted |
tx | const reference to a valid transmitter CoordZ |
rx | const reference to a valid receiver CoordZ |
|
inline |
Inserts an object into the container. If the keys are already present, the object is NOT inserted and it is deleted
data | const pointer to a Data object to be inserted |
tx | const pointer to a valid transmitter Location |
rx | const pointer to a valid receiver Location |
|
inline |
|
inline |