libdap++  Updated for version 3.12.0
UInt64.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 _uint64_h
27 #define _uint64_h 1
28 
29 
30 #ifndef _dods_datatypes_h
31 #include "dods-datatypes.h"
32 #endif
33 
34 #ifndef _basetype_h
35 #include "BaseType.h"
36 #endif
37 
38 #ifndef constraint_evaluator_h
39 #include "ConstraintEvaluator.h"
40 #endif
41 
42 namespace libdap
43 {
44 
49 class UInt64: public BaseType
50 {
51  virtual unsigned int val2buf(void *, bool) { throw InternalErr(__FILE__, __LINE__, "Not implemented for UInt64"); }
52  virtual unsigned int buf2val(void **) { throw InternalErr(__FILE__, __LINE__, "Not implemented for UInt64"); }
53 
54 protected:
56 
57 public:
58  UInt64(const string &n);
59  UInt64(const string &n, const string &d);
60  virtual ~UInt64()
61  {}
62 
63  UInt64(const UInt64 &copy_from);
64 
65  UInt64 &operator=(const UInt64 &rhs);
66 
67  virtual BaseType *ptr_duplicate() ;
68 
69  virtual unsigned int width(bool constrained = false);
70 
71  virtual bool serialize(ConstraintEvaluator &eval, DDS &dds,
72  Marshaller &m, bool ce_eval = true);
73  virtual bool deserialize(UnMarshaller &um, DDS *dds, bool reuse = false);
74 
75  virtual dods_uint64 value() const;
76  virtual bool set_value(dods_uint64 val);
77 
78  virtual void print_val(FILE *out, string space = "",
79  bool print_decl_p = true);
80  virtual void print_val(ostream &out, string space = "",
81  bool print_decl_p = true);
82 
83  virtual bool ops(BaseType *b, int op);
84 
85  virtual void dump(ostream &strm) const ;
86 };
87 
88 } // namespace libdap
89 
90 #endif // _uint64_h
91