World Ocean Simulation System (WOSS) library
sediment-deck41-db-creator.h
Go to the documentation of this file.
1/* WOSS - World Ocean Simulation System -
2 *
3 * Copyright (C) 2009 2025 Federico Guerra
4 * and regents of the SIGNET lab, University of Padova
5 *
6 * Author: Federico Guerra - WOSS@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
33#ifndef WOSS_SEDIMENT_DECK41_DB_CREATOR_H
34#define WOSS_SEDIMENT_DECK41_DB_CREATOR_H
35
36
37#ifdef WOSS_NETCDF_SUPPORT
38
39#include <string>
40#include "woss-db-creator.h"
41#include "sediment-deck41-db.h"
42
43
44namespace woss {
45
46
53
54 public:
55
60
62
64
65 virtual ~SedimDeck41DbCreator() override = default;
66
68
70
78 virtual std::unique_ptr<WossDbCreator> clone() const override { return std::make_unique<SedimDeck41DbCreator>(*this); }
79
84 virtual std::unique_ptr<WossDb> createWossDb() const override;
85
86
87 void setDeck41CoordPathName( const std::string& name ) { db_coord_name = name; }
88
89 void setDeck41MarsdenPathName( const std::string& name ) { db_marsden_name = name; }
90
91 void setDeck41MarsdenOnePathName( const std::string& name ) { db_marsden_one_name = name; }
92
93#if defined (WOSS_NETCDF4_SUPPORT)
94 void setDeck41DbType( DECK41DbType db_type ) { deck41_db_type = db_type; }
95#endif // defined (WOSS_NETCDF4_SUPPORT)
96
97 std::string getDeck41CoordPathName() const { return db_coord_name; }
98
99 std::string getDeck41MarsdenPathName() const { return db_marsden_name; }
100
101 std::string getDeck41MarsdenOnePathName() const { return db_marsden_one_name; }
102
104
105
106 protected:
107
108 std::string db_coord_name;
109
110 std::string db_marsden_name;
111
113
118
124 virtual bool initializeDb( WossDb& woss_db ) const override;
125
131 bool initializeSedimDb( SedimDeck41Db& woss_db ) const;
132 };
133
134}
135
136#endif // WOSS_NETCDF_SUPPORT
137
138#endif /* WOSS_SEDIMENT_DECK41_DB_CREATOR_H */
139
DbCreator for NetCDF Deck41 Sediment database.
Definition sediment-deck41-db-creator.h:52
bool initializeSedimDb(SedimDeck41Db &woss_db) const
Definition sediment-deck41-db-creator.cpp:61
std::string db_marsden_one_name
Definition sediment-deck41-db-creator.h:112
SedimDeck41DbCreator & operator=(SedimDeck41DbCreator &&tmp)=default
SedimDeck41DbCreator(SedimDeck41DbCreator &&tmp)=default
SedimDeck41DbCreator & operator=(const SedimDeck41DbCreator &copy)=default
virtual bool initializeDb(WossDb &woss_db) const override
Definition sediment-deck41-db-creator.cpp:81
void setDeck41DbType(DECK41DbType db_type)
Definition sediment-deck41-db-creator.h:94
void setDeck41CoordPathName(const std::string &name)
Definition sediment-deck41-db-creator.h:87
std::string getDeck41MarsdenPathName() const
Definition sediment-deck41-db-creator.h:99
SedimDeck41DbCreator(const SedimDeck41DbCreator &copy)=default
virtual ~SedimDeck41DbCreator() override=default
virtual std::unique_ptr< WossDbCreator > clone() const override
Definition sediment-deck41-db-creator.h:78
void setDeck41MarsdenOnePathName(const std::string &name)
Definition sediment-deck41-db-creator.h:91
SedimDeck41DbCreator()
Definition sediment-deck41-db-creator.cpp:42
std::string db_coord_name
Definition sediment-deck41-db-creator.h:108
DECK41DbType deck41_db_type
Definition sediment-deck41-db-creator.h:117
std::string getDeck41MarsdenOnePathName() const
Definition sediment-deck41-db-creator.h:101
std::string getDeck41CoordPathName() const
Definition sediment-deck41-db-creator.h:97
DECK41DbType getDeck41DbType() const
Definition sediment-deck41-db-creator.h:103
void setDeck41MarsdenPathName(const std::string &name)
Definition sediment-deck41-db-creator.h:89
std::string db_marsden_name
Definition sediment-deck41-db-creator.h:110
virtual std::unique_ptr< WossDb > createWossDb() const override
Definition sediment-deck41-db-creator.cpp:52
WossDb for NetCDF DECK41 Sediment database.
Definition sediment-deck41-db.h:75
Abstract class that provides the interface of database creator ( Factory object )
Definition woss-db-creator.h:55
Abstract class that provides the interface of databases.
Definition woss-db.h:79
Definition ac-toolbox-arr-asc-reader.h:44
DECK41DbType
Definition sediment-deck41-coord-db.h:75
Provides the interface for woss::SedimDeck41Db class.
Provides the interface for woss::WossDbCreator class.