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 
abstract base class used to unmarshall/deserialize dap data objects
Definition: UnMarshaller.h:54
virtual bool ops(BaseType *b, int op)
Evaluate relational operators.
Definition: UInt64.cc:174
virtual bool serialize(ConstraintEvaluator &eval, DDS &dds, Marshaller &m, bool ce_eval=true)
Move data to the net.
Definition: UInt64.cc:110
virtual BaseType * ptr_duplicate()
Definition: UInt64.cc:85
virtual void print_val(FILE *out, string space="", bool print_decl_p=true)
Prints the value of the variable.
Definition: UInt64.cc:155
dods_uint64 d_buf
Definition: UInt64.h:55
virtual dods_uint64 value() const
Definition: UInt64.cc:140
uint64_t dods_uint64
A class for software fault reporting.
Definition: InternalErr.h:64
UInt64(const string &n)
Definition: UInt64.cc:64
Holds a 64-bit unsigned integer.
Definition: UInt64.h:49
virtual unsigned int width(bool constrained=false)
Definition: UInt64.cc:104
virtual bool set_value(dods_uint64 val)
Definition: UInt64.cc:146
Evaluate a constraint expression.
UInt64 & operator=(const UInt64 &rhs)
Definition: UInt64.cc:91
The basic data type for the DODS DAP types.
Definition: BaseType.h:199
abstract base class used to marshal/serialize dap data objects
Definition: Marshaller.h:53
virtual void dump(ostream &strm) const
dumps information about this object
Definition: UInt64.cc:219
virtual bool deserialize(UnMarshaller &um, DDS *dds, bool reuse=false)
Receive data from the net.
Definition: UInt64.cc:131
virtual ~UInt64()
Definition: UInt64.h:60