DATRW++ library: seismic data I/O with multiple formats
datatypes.cc
Go to the documentation of this file.
1 /*! \file datatypes.cc
2  * \brief handle data types and data type conversion (implementation)
3  *
4  * ----------------------------------------------------------------------------
5  *
6  * \author Thomas Forbriger
7  * \date 17/12/2010
8  *
9  * handle data types and data type conversion (implementation)
10  *
11  * Copyright (c) 2010 by Thomas Forbriger (BFO Schiltach)
12  *
13  * ----
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 2 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, write to the Free Software
26  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27  * ----
28  *
29  * REVISIONS and CHANGES
30  * - 17/12/2010 V1.0 Thomas Forbriger
31  *
32  * ============================================================================
33  */
34 #define DATRW_DATATYPES_CC_VERSION \
35  "DATRW_DATATYPES_CC V1.0"
36 
37 #include <datrwxx/datatypes.h>
38 
39 namespace datrw {
40 
41  namespace datatypes {
42 
44 
45  const char* unknown_type_id="UNKNOWN";
46 
47  void print_conversion_report(std::ostream& os,
48  const std::string& from,
49  const std::string& to)
50  {
52  {
53  if (from==to)
54  {
55  if (from==std::string(unknown_type_id))
56  {
57  os << "type conversion: cannot identify types!" << std::endl;
58  }
59  }
60  else
61  {
62  os << "type conversion: from " << from << " to " << to << std::endl;
63  }
64  }
65  }
66 
67  } // namespace datatypes
68 
69 } // namespace datrw
70 
71 /* ----- END OF datatypes.cc ----- */
handle data types and data type conversion (prototypes)
void print_conversion_report(std::ostream &os, const std::string &from, const std::string &to)
actually print report
Definition: datatypes.cc:47
Root namespace of library.
Definition: aalibdatrwxx.cc:16
const char * unknown_type_id
indicate unkown type
Definition: datatypes.cc:45
bool verbose_type_conversion
Definition: datatypes.cc:43