libdap++  Updated for version 3.12.0
D4BaseTypeFactory.h
Go to the documentation of this file.
1 
2 // -*- mode: c++; c-basic-offset:4 -*-
3 
4 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
5 // Access Protocol.
6 
7 // Copyright (c) 2012 OPeNDAP, Inc.
8 // Author: James Gallagher <jgallagher@opendap.org>
9 //
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Lesser General Public
12 // License as published by the Free Software Foundation; either
13 // version 2.1 of the License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 //
24 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
25 
26 #ifndef dap4_base_type_factory_h
27 #define dap4_base_type_factory_h
28 
29 #include <string>
30 
31 #include "BaseTypeFactory.h"
32 
33 // Class declarations; Make sure to include the corresponding headers in the
34 // implementation file.
35 
36 namespace libdap
37 {
38 
39 class Byte;
40 class Int8;
41 class Int16;
42 class UInt16;
43 class Int32;
44 class UInt32;
45 class Int64;
46 class UInt64;
47 
48 class Float32;
49 class Float64;
50 
51 class Str;
52 class Url;
53 
54 class Array;
55 class Structure;
56 class Sequence;
57 class Grid;
58 
59 class D4Group;
60 
61 class BaseType;
62 
69 {
70 public:
72  {}
74  {}
75 
76  virtual Byte *NewByte(const string &n = "") const;
77  virtual Int8 *NewInt8(const string &n = "") const;
78  virtual Byte *NewUInt8(const string &n = "") const;
79  virtual Int16 *NewInt16(const string &n = "") const;
80  virtual UInt16 *NewUInt16(const string &n = "") const;
81  virtual Int32 *NewInt32(const string &n = "") const;
82  virtual UInt32 *NewUInt32(const string &n = "") const;
83 
84  virtual Int64 *NewInt64(const string &n = "") const;
85  virtual UInt64 *NewUInt64(const string &n = "") const;
86 
87  virtual Float32 *NewFloat32(const string &n = "") const;
88  virtual Float64 *NewFloat64(const string &n = "") const;
89 
90  virtual Str *NewStr(const string &n = "") const;
91  virtual Url *NewUrl(const string &n = "") const;
92  virtual Url *NewURL(const string &n = "") const;
93 
94  // FIXME Define these
95 #if 0
96  virtual Opaque *NewOpaque(const string &n = "") const;
97  virtual Enumeration *NewEnumeration(const string &n = "") const;
98 #endif
99  virtual Structure *NewStructure(const string &n = "") const;
100  virtual Sequence *NewSequence(const string &n = "") const;
101 #if 1
102  virtual D4Group *NewGroup(const string &n = "") const;
103 #endif
104  virtual Array *NewArray(const string &n = "", BaseType *v = 0) const;
105  virtual Grid *NewGrid(const string &n = "") const;
106 };
107 
108 } // namespace libdap
109 
110 #endif // dap4_base_type_factory_h
virtual Float64 * NewFloat64(const string &n="") const
virtual UInt64 * NewUInt64(const string &n="") const
Holds a 16-bit signed integer value.
Definition: Int8.h:42
Holds a64-bit signed integer.
Definition: Int64.h:49
Holds an Internet address (URL).
Definition: Url.h:63
virtual Int64 * NewInt64(const string &n="") const
virtual D4Group * NewGroup(const string &n="") const
virtual UInt16 * NewUInt16(const string &n="") const
virtual Int16 * NewInt16(const string &n="") const
virtual Byte * NewByte(const string &n="") const
Holds an unsigned 16-bit integer.
Definition: UInt16.h:57
Holds a structure (aggregate) type.
Definition: Structure.h:85
Holds a 32-bit floating point value.
Definition: Float32.h:59
virtual Structure * NewStructure(const string &n="") const
virtual Float32 * NewFloat32(const string &n="") const
Holds character string data.
Definition: Str.h:62
Holds a 16-bit signed integer value.
Definition: Int16.h:57
virtual Str * NewStr(const string &n="") const
virtual UInt32 * NewUInt32(const string &n="") const
Holds the Grid data type.
Definition: Grid.h:121
Holds a sequence.
Definition: Sequence.h:172
virtual Sequence * NewSequence(const string &n="") const
Holds a 64-bit unsigned integer.
Definition: UInt64.h:49
virtual Int32 * NewInt32(const string &n="") const
virtual Array * NewArray(const string &n="", BaseType *v=0) const
virtual Url * NewUrl(const string &n="") const
virtual Int8 * NewInt8(const string &n="") const
virtual Url * NewURL(const string &n="") const
The basic data type for the DODS DAP types.
Definition: BaseType.h:199
Holds a 64-bit (double precision) floating point value.
Definition: Float64.h:60
Holds a single byte.
Definition: Byte.h:61
virtual Grid * NewGrid(const string &n="") const
Holds a 32-bit unsigned integer.
Definition: UInt32.h:59
A multidimensional array of identical data types.
Definition: Array.h:103
virtual Byte * NewUInt8(const string &n="") const
Holds a 32-bit signed integer.
Definition: Int32.h:64