40#ifndef WOSS_MANAGER_SIMPLE_DEFINITIONS_H
41#define WOSS_MANAGER_SIMPLE_DEFINITIONS_H
60 template<
typename WMResDb = WossManagerResDb >
111 typedef typename ::std::map< CoordZ, Woss*, CoordComparator< WossManagerSimple, CoordZ > >
WossCoordZMap;
112 typedef typename WossCoordZMap::iterator WCZIter;
113 typedef typename WossCoordZMap::reverse_iterator WCZRIter;
119 typedef typename ::std::map< CoordZ, WossCoordZMap, CoordComparator< WossManagerSimple, CoordZ > >
WossContainer;
120 typedef typename WossContainer::iterator WCIter;
121 typedef typename WossContainer::reverse_iterator WCRIter;
144 virtual Woss*
const getWoss(
const CoordZ& tx,
const CoordZ& rx,
double start_frequency,
double end_frequency );
150 template<
typename WMResDb >
154 template<
typename WMResDb >
163 template<
typename WMResDb >
166 ::std::cout <<
"WossManagerSimple::reset() map size = " << woss_map.size() << ::std::endl;
168 for (WCIter it1 = woss_map.begin(); it1 != woss_map.end(); it1++) {
169 for (WCZIter it2 = (it1->second).begin(); it2 != (it1->second).end(); it2++) {
179 template<
typename WMResDb >
181 for (WCIter it1 = woss_map.begin(); it1 != woss_map.end(); it1++) {
182 for (WCZIter it2 = (it1->second).begin(); it2 != (it1->second).end(); it2++) {
183 it2->second->timeEvolve(time_value);
190 template<
typename WMResDb >
192 if (WMResDb::debug) ::std::cout <<
"WossManagerSimple::getWoss() tx coords " << tx_coordz <<
"; rx coords "
193 << rx_coordz <<
"; start freq " << start_frequency <<
"; end freq "
194 << end_frequency << ::std::endl;
196 WCIter it1 = woss_map.find( tx_coordz );
198 if (it1 == woss_map.end() ) {
200 if (WMResDb::debug) ::std::cout <<
"WossManagerSimple::getWoss() no tx CoordZ found" << ::std::endl;
202 Woss*
const curr_woss = this->woss_creator->createWoss( tx_coordz, rx_coordz, start_frequency, end_frequency );
204 woss_map[tx_coordz][rx_coordz] = curr_woss;
208 WCZIter it2 = (it1->second).find( rx_coordz );
210 if ( it2 == it1->second.end() ) {
212 if (WMResDb::debug) ::std::cout <<
"WossManagerSimple::getWoss() no rx CoordZ found" << ::std::endl;
214 Woss*
const curr_woss = WMResDb::woss_creator->createWoss( tx_coordz, rx_coordz, start_frequency, end_frequency );
216 woss_map[tx_coordz][rx_coordz] = curr_woss;
219 else return( it2->second );
224 template<
typename WMResDb >
226 if (WMResDb::debug) ::std::cout <<
"WossManagerSimple::eraseActiveWoss() tx coords " << tx_coordz <<
"; rx coords "
227 << rx_coordz <<
"; start freq " << start_frequency <<
"; end freq "
228 << end_frequency << ::std::endl;
230 WCIter it1 = woss_map.find( tx_coordz );
232 if (it1 == woss_map.end() )
return *
this;
234 WCZIter it2 = (it1->second).find( rx_coordz );
236 if ( it2 == it1->second.end() )
return *
this;
239 it1->second.erase(it2);
240 if ( it1->second.empty() ) woss_map.erase(it1);
3D-Coordinates (lat, long, depth) class definitions and functions library
Definition coordinates-definitions.h:403
a class for time date manipulation
Definition time-definitions.h:95
simple template extension of WossManagerResDb or WossManagerResDbMT
Definition woss-manager-simple.h:61
static double space_sampling
Definition woss-manager-simple.h:128
WossContainer woss_map
Definition woss-manager-simple.h:133
virtual WossManagerSimple & eraseActiveWoss(const CoordZ &tx, const CoordZ &rx, double start_frequency, double end_frequency)
Definition woss-manager-simple.h:225
static void setSpaceSampling(double radius)
Definition woss-manager-simple.h:96
virtual bool reset()
Definition woss-manager-simple.h:164
::std::map< CoordZ, Woss *, CoordComparator< WossManagerSimple, CoordZ > > WossCoordZMap
Definition woss-manager-simple.h:111
::std::map< CoordZ, WossCoordZMap, CoordComparator< WossManagerSimple, CoordZ > > WossContainer
Definition woss-manager-simple.h:119
WossManagerSimple()
Definition woss-manager-simple.h:155
virtual Woss *const getWoss(const CoordZ &tx, const CoordZ &rx, double start_frequency, double end_frequency)
Definition woss-manager-simple.h:191
virtual bool timeEvolve(const Time &time_value)
Definition woss-manager-simple.h:180
static double getSpaceSampling()
Definition woss-manager-simple.h:102
Abstract class that provides the interface for initializing and running a channel simulator.
Definition woss.h:89
Provides the interface for woss::DefHandler class.
Definitions and library for woss::TimeArr class.
Provides the interface for woss::WossManager, woss::WossManagerResDb and woss::WossManagerResDbMT cla...