World Ocean Simulation System (WOSS) library
woss::WossCreatorContainer< CustomTransducer > Class Reference

Full specialization for woss::CustomTransducer. More...

#include <woss-creator-container.h>

Collaboration diagram for woss::WossCreatorContainer< CustomTransducer >:
Collaboration graph

Public Member Functions

bool isEmpty () const
 
int size () const
 
bool insert (const CustomTransducer &data, Location *const tx, Location *const rx)
 
bool insert (const CustomTransducer &data, const CoordZ &tx, const CoordZ &rx)
 
CustomTransducer get (Location *const tx, Location *const rx) const
 
CustomTransducer get (const CoordZ &tx, const CoordZ &rx) const
 
CustomTransduceraccessAllLocations ()
 
void erase (Location *const tx, Location *const rx)
 
void erase (const CoordZ &tx, const CoordZ &rx)
 
void replace (const CustomTransducer &data, Location *const tx, Location *const rx)
 
void replace (const CustomTransducer &data, const CoordZ &tx, const CoordZ &rx)
 
void clear ()
 
void setDebug (bool flag)
 
bool isUsingDebug () const
 

Static Public Attributes

static Location *const ALL_LOCATIONS
 
static const CoordZ ALL_COORDZ
 

Protected Types

typedef ::std::map< Location *, CustomTransducerInnerContainer
 
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)
 
LocationcreateLocation (const CoordZ &coordinates)
 

Protected Attributes

DataContainer data_container
 
bool debug
 

Detailed Description

Full specialization for woss::CustomTransducer.

Full specialization for woss::CustomTransducer

Member Function Documentation

◆ accessAllLocations()

CustomTransducer & woss::WossCreatorContainer< CustomTransducer >::accessAllLocations ( )
inline

Returns a reference to the CustomTransducer associated to transmitter and receiver Location equal to ALL_LOCATIONS. If no keys were present, the CustomTransducer is defaulted constructed and a reference to it is returned. The user has to properly delete the pointer prior changing it

Returns
a reference to a Data pointer

References woss::WossCreatorContainer< Data >::ALL_LOCATIONS, and woss::WossCreatorContainer< Data >::data_container.

Referenced by woss::BellhopCreator::BellhopCreator().

◆ get() [1/2]

CustomTransducer woss::WossCreatorContainer< CustomTransducer >::get ( const CoordZ tx,
const CoordZ rx 
) const

Returns a CustomTransducer pointer for given keys. If the keys are not found a NULL pointer is returned

Parameters
txconst reference to a valid transmitter CoordZ
rxconst reference to a valid receiver CoordZ
Returns
a pointer to a rotated CustomTransducer object

◆ get() [2/2]

CustomTransducer woss::WossCreatorContainer< CustomTransducer >::get ( Location *const  tx,
Location *const  rx 
) const

Returns a CustomTransducer for given keys. If the keys are not found a NULL pointer is returned

Parameters
txconst pointer to a valid transmitter Location
rxconst pointer to a valid receiver Location
Returns
a pointer to a rotated CustomTransducer object

Referenced by woss::BellhopCreator::getCustomTransducer(), woss::BellhopCreator::getCustomTransducer(), and woss::BellhopCreator::initializeBhWoss().

◆ insert() [1/2]

bool woss::WossCreatorContainer< CustomTransducer >::insert ( const CustomTransducer data,
const CoordZ tx,
const CoordZ rx 
)
inline

Inserts an object into the container. If the keys are already present, the object is NOT inserted and it is deleted

Parameters
dataconst pointer to a CustomTransducer object to be inserted
txconst reference to a valid transmitter CoordZ
rxconst reference to a valid receiver CoordZ
Returns
true if it's empty, false otherwise

References woss::WossCreatorContainer< Data >::createLocation(), woss::WossCreatorContainer< Data >::data_container, and woss::WossCreatorContainer< Data >::find().

Here is the call graph for this function:

◆ insert() [2/2]

bool woss::WossCreatorContainer< CustomTransducer >::insert ( const CustomTransducer data,
Location *const  tx,
Location *const  rx 
)
inline

Inserts an object into the container. If the keys are already present, the object is NOT inserted and it is deleted

Parameters
dataconst reference to a CustomTransducer object to be inserted
txconst pointer to a valid transmitter Location
rxconst pointer to a valid receiver Location
Returns
true if it's empty, false otherwise

References woss::WossCreatorContainer< Data >::data_container.

◆ replace() [1/2]

void woss::WossCreatorContainer< CustomTransducer >::replace ( const CustomTransducer data,
const CoordZ tx,
const CoordZ rx 
)
inline

Replaces a pointer into the container. If the keys are already present, the previous object is deleted

Parameters
dataconst pointer to a CustomTransducer object to be inserted
txconst reference to a valid transmitter CoordZ
rxconst reference to a valid receiver CoordZ
Returns
true if it's empty, false otherwise

References woss::WossCreatorContainer< Data >::createLocation(), and woss::WossCreatorContainer< Data >::data_container.

Here is the call graph for this function:

◆ replace() [2/2]

void woss::WossCreatorContainer< CustomTransducer >::replace ( const CustomTransducer data,
Location *const  tx,
Location *const  rx 
)
inline

Replaces a pointer into the container. If the keys are already present, the previous object is deleted

Parameters
dataconst reference to a CustomTransducer object to be inserted
txconst pointer to a valid transmitter Location
rxconst pointer to a valid receiver Location
Returns
true if it's empty, false otherwise

References woss::WossCreatorContainer< Data >::data_container.

Referenced by woss::BellhopCreator::setCustomTransducer(), and woss::BellhopCreator::setCustomTransducer().


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