|
World Ocean Simulation System (WOSS) library
|
Class that stores WossCreator parameters. More...
#include <woss-creator-container.h>


Public Member Functions | |
| WossCreatorContainer ()=default | |
| ~WossCreatorContainer ()=default | |
| bool | isEmpty () const |
| int | size () const |
| bool | insert (const Data &data, const std::shared_ptr< Location > &tx, const std::shared_ptr< Location > &rx) |
| bool | insert (const Data &data, const CoordZ &tx, const CoordZ &rx) |
| Data | get (const std::shared_ptr< Location > &tx, const std::shared_ptr< Location > &rx) const |
| Data | get (const CoordZ &tx, const CoordZ &rx) const |
| Data & | accessAllLocations () |
| void | erase (const std::shared_ptr< Location > &tx, const std::shared_ptr< Location > &rx) |
| void | erase (const CoordZ &tx, const CoordZ &rx) |
| void | replace (const Data &data, const std::shared_ptr< Location > &tx, const std::shared_ptr< Location > &rx) |
| void | replace (const Data &data, const CoordZ &tx, const CoordZ &rx) |
| void | clear () |
| void | setDebug (bool flag) |
| bool | isUsingDebug () const |
Static Public Attributes | |
| static std::shared_ptr< Location > | ALL_LOCATIONS |
| static const CoordZ | ALL_COORDZ |
Protected Types | |
| using | InnerContainer = std::map< std::shared_ptr<Location>, Data > |
| using | ICIter = typename InnerContainer::iterator |
| using | ICRIter = typename InnerContainer::reverse_iterator |
| using | ICCIter = typename InnerContainer::const_iterator |
| using | ICCRIter = typename InnerContainer::const_reverse_iterator |
| using | DataContainer = std::map< std::shared_ptr<Location>, InnerContainer > |
| using | DCIter = typename DataContainer::iterator |
| using | DCCIter = typename DataContainer::const_iterator |
| using | DCRIter = typename DataContainer::reverse_iterator |
| using | DCRCIter = typename DataContainer::const_reverse_iterator |
Protected Member Functions | |
| DCIter | find (const CoordZ &coordinates) |
| ICIter | find (const CoordZ &coordinates, const DCIter &iter) |
| std::shared_ptr< Location > | createLocation (const CoordZ &coordinates) |
Protected Attributes | |
| DataContainer | data_container |
| bool | debug = false |
Class that stores WossCreator parameters.
WossCreatorContainer provides interface for storing and retrieving custom WossCreator data, indexed by transmitter and receiver std::shared_ptr<woss::Location>
|
protected |
The outer container. It associates a transmitter Location pointer to a InnerContainer object
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
The innermost container. It associates a receiver Location pointer to the Data object
|
default |
Referenced by get().
|
default |
|
inline |
Returns a reference to the Data object associated to transmitter and receiver Location equal to ALL_LOCATIONS. If no keys were present, the Data object is default constructed and a reference to it is returned
References ALL_LOCATIONS, and data_container.
|
inline |
Clears the container
References data_container.
Referenced by WossUnitTest::testWossCreatorContainer().
|
inlineprotected |
Creates a Location for a given CoordZ
| coordinates | a const reference to a valid receiver CoordZ |
References ALL_COORDZ, createLocation(), and woss::Singleton< DefHandler >::instance().
Referenced by createLocation(), insert(), and replace().

|
inline |
Erases an object into the container
| tx | const reference to a valid transmitter CoordZ |
| rx | const reference to a valid receiver CoordZ |
References ALL_COORDZ, ALL_LOCATIONS, and data_container.
|
inline |
Erases an object into the container
| tx | const reference to a std::shared_ptr to a valid transmitter Location |
| rx | const reference to a std::shared_ptr to a valid receiver Location |
References data_container.
Referenced by WossUnitTest::testWossCreatorContainer().
|
protected |
Returns an DataContainer iterators that points to the given transmitter coordinates. An iterator to the end of the DataContainer is returned if no coordinates are found
| coordinates | a const reference to a valid transmitter CoordZ |
References ALL_COORDZ, ALL_LOCATIONS, data_container, and debug.
|
protected |
Returns an InnerContainer iterators for the DataContainter iterator that points to the given receiver coordinates. An iterator to the relative end of the InnerContainer is returned if no coordinates are found
| coordinates | a const reference to a valid receiver CoordZ |
References ALL_COORDZ, ALL_LOCATIONS, and debug.
|
inline |
Returns an object into the container. If the keys are NOT found, a default constructed object is returned
| tx | const reference to a valid transmitter CoordZ |
| rx | const reference to a valid receiver CoordZ |
References ALL_COORDZ, data_container, debug, and WossCreatorContainer().

|
inline |
Returns an object into the container. If the keys are NOT found, a default constructed object is returned
| tx | const reference to a std::shared_ptr to a valid transmitter Location |
| rx | const reference to a std::shared_ptr to a valid receiver Location |
References ALL_LOCATIONS, data_container, debug, and find().
Referenced by WossUnitTest::testWossCreatorContainer().

|
inline |
Inserts an object into the container. If the keys are already present, the object is NOT inserted
| data | const reference to a Data object to be inserted |
| tx | const reference to a valid transmitter CoordZ |
| rx | const reference to a valid receiver CoordZ |
References createLocation(), data_container, and find().

|
inline |
Inserts an object into the container. If the keys are already present, the object is NOT inserted
| data | const reference to a Data object to be inserted |
| tx | const reference to a std::shared_ptr to a valid transmitter Location |
| rx | const reference to a std::shared_ptr to a valid receiver Location |
References data_container.
Referenced by WossUnitTest::testWossCreatorContainer().
|
inline |
Checks if the container is empty
References data_container.
Referenced by WossUnitTest::testWossCreatorContainer().
|
inline |
Retuns the debug flag
|
inline |
Replaces an object into the container. If the key are not present, the object is still inserted
| data | const reference to a Data object to be inserted |
| tx | const reference to a valid transmitter CoordZ |
| rx | const reference to a valid receiver CoordZ |
References createLocation(), data_container, and find().

|
inline |
Replaces an object into the container. If the key are not present, the object is still inserted
| data | const reference to a Data object to be inserted |
| tx | const reference to a std::shared_ptr to a valid transmitter Location |
| rx | const reference to a std::shared_ptr to a valid receiver Location |
References data_container.
Referenced by WossUnitTest::testWossCreatorContainer().
|
inline |
Sets or unsets the debug flag
| flag | boolean flag |
Referenced by WossUnitTest::testWossCreatorContainer().
|
inline |
Returns the size of the container
References data_container.
Referenced by WossUnitTest::testWossCreatorContainer().
|
static |
Pointer that represents the index for all possible coordinates
Referenced by createLocation(), erase(), find(), find(), get(), and WossUnitTest::testWossCreatorContainer().
|
static |
Pointer that represents the index for all possible Locations
Referenced by accessAllLocations(), erase(), find(), find(), get(), and WossUnitTest::testWossCreatorContainer().
|
protected |
|
protected |