World Ocean Simulation System (WOSS) library
res-time-arr-txt-db.h
Go to the documentation of this file.
1/* WOSS - World Ocean Simulation System -
2 *
3 * Copyright (C) 2009 Federico Guerra
4 * and regents of the SIGNET lab, University of Padova
5 *
6 * Author: Federico Guerra - federico@guerra-tlc.com
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation;
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22/*
23 * This software has been developed by Federico Guerra and SIGNET lab,
24 * University of Padova, in collaboration with the NATO Centre for
25 * Maritime Research and Experimentation (http://www.cmre.nato.int ;
26 * E-mail: pao@cmre.nato.int), whose support is gratefully acknowledged.
27 */
28
29
40#ifndef WOSS_RES_TIME_ARR_TXT_DB_H
41#define WOSS_RES_TIME_ARR_TXT_DB_H
42
43
46#include "woss-db.h"
47
48
49namespace woss {
50
51
59
60
61 public:
62
63
68 ResTimeArrTxtDb( const ::std::string& name );
69
70 virtual ~ResTimeArrTxtDb() { }
71
72
77 virtual bool finalizeConnection();
78
79
84 virtual bool closeConnection();
85
86
97 virtual TimeArr* getValue( const CoordZ& coord_tx, const CoordZ& coord_rx, const double frequency, const Time& time_value ) const ;
98
107 virtual bool insertValue( const CoordZ& coord_tx, const CoordZ& coord_rx, const double frequency,const Time& time_value, const TimeArr& channel ) ;
108
109
110 static void setSpaceSampling( double value ) { space_sampling = value; }
111
112 static double getSpaceSampling() { return space_sampling; }
113
114
115 protected:
116
117
118 typedef ::std::map< time_t, TimeArr > TimeMap;
119 typedef TimeMap::iterator TMIter;
120 typedef TimeMap::const_iterator TMCIter;
121 typedef TimeMap::reverse_iterator TMRIter;
122
123 typedef ::std::map< PDouble, TimeMap > FreqMap;
124 typedef FreqMap::iterator FMIter;
125 typedef FreqMap::const_iterator FMCIter;
126 typedef FreqMap::reverse_iterator FMRIter;
127
128 typedef ::std::map< CoordZ, FreqMap, CoordComparator< ResTimeArrTxtDb, CoordZ > > RxMap;
129// typedef ::std::map< CoordZ, FreqMap > RxMap;
130 typedef RxMap::iterator RxMIter;
131 typedef RxMap::const_iterator RxMCIter;
132 typedef RxMap::reverse_iterator RxMRIter;
133
138 typedef ::std::map< CoordZ, RxMap, CoordComparator< ResTimeArrTxtDb, CoordZ > > ArrMatrix;
139// typedef ::std::map< CoordZ, RxMap > ArrMatrix;
140 typedef ArrMatrix::iterator AMXIter;
141 typedef ArrMatrix::const_iterator AMXCIter;
142 typedef ArrMatrix::reverse_iterator AMXRIter;
143 typedef ArrMatrix::const_reverse_iterator AMXCRIter;
144
145
146 static double space_sampling;
147
148
153
158
159
160 bool has_been_modified;
161
162
169 void printScreenMap();
170
171
178 virtual bool writeMap();
179
180
187 virtual bool importMap();
188
189
198 const TimeArr* readMap( const CoordZ& tx, const CoordZ& rx, const double frequency, const Time& time_value ) const;
199
200
201 };
202
203
204}
205
206
207#endif /* WOSS_RES_TIME_ARR_TXT_DB_H */
208
209
3D-Coordinates (lat, long, depth) class definitions and functions library
Definition coordinates-definitions.h:403
Textual WossDb for TimeArr.
Definition res-time-arr-txt-db.h:58
int initial_arrmap_size
Definition res-time-arr-txt-db.h:157
virtual bool importMap()
Definition res-time-arr-txt-db.cpp:70
::std::map< CoordZ, RxMap, CoordComparator< ResTimeArrTxtDb, CoordZ > > ArrMatrix
Definition res-time-arr-txt-db.h:138
virtual bool closeConnection()
Definition res-time-arr-txt-db.cpp:380
virtual bool writeMap()
Definition res-time-arr-txt-db.cpp:180
virtual bool insertValue(const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value, const TimeArr &channel)
Definition res-time-arr-txt-db.cpp:398
ArrMatrix arrivals_map
Definition res-time-arr-txt-db.h:152
virtual TimeArr * getValue(const CoordZ &coord_tx, const CoordZ &coord_rx, const double frequency, const Time &time_value) const
Definition res-time-arr-txt-db.cpp:388
virtual bool finalizeConnection()
Definition res-time-arr-txt-db.cpp:374
void printScreenMap()
Definition res-time-arr-txt-db.cpp:280
const TimeArr * readMap(const CoordZ &tx, const CoordZ &rx, const double frequency, const Time &time_value) const
Definition res-time-arr-txt-db.cpp:136
Channel power delay profile class.
Definition time-arrival-definitions.h:82
a class for time date manipulation
Definition time-definitions.h:95
Data behaviour class for storing calculated TimeArr.
Definition woss-db.h:416
Textual implementation of WossDb.
Definition woss-db.h:245
Provides the interface for the woss::Coord and woss::CoordZ classes.
Definitions and library for woss::TimeArr class.
Provides the interface for woss::WossDb class.