bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
DODS_Time_Factory.h
1
2// -*- mode: c++; c-basic-offset:4 -*-
3
4// This file is part of ff_handler a FreeForm API handler for the OPeNDAP
5// DAP2 data server.
6
7// Copyright (c) 2005 OPeNDAP, Inc.
8// Author: James Gallagher <jgallagher@opendap.org>
9//
10// This is free software; you can redistribute it and/or modify it under the
11// terms of the GNU Lesser General Public License as published by the Free
12// Software Foundation; either version 2.1 of the License, or (at your
13// option) any later version.
14//
15// This software is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18// 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
27// (c) COPYRIGHT URI/MIT 1998
28// Please read the full copyright statement in the file COPYRIGHT.
29//
30// Authors:
31// jhrg,jimg James Gallagher (jgallagher@gso.uri.edu)
32
33#ifndef _dods_time_factory_h
34#define _dods_time_factory_h
35
36
37#include "DODS_Time.h"
38#include <libdap/DAS.h>
39#include <libdap/DDS.h>
40#include <libdap/BaseType.h>
41
42using namespace libdap ;
43
49
50class DODS_Time_Factory {
51private:
52 BaseType *_hours;
53 BaseType *_minutes;
54 BaseType *_seconds;
55 bool _gmt;
56
57protected:
58 DODS_Time_Factory() {}
59
60public:
61 virtual ~DODS_Time_Factory() {}
62
65
67
76 DODS_Time_Factory(DDS &dds, const string &attribute_name = "DODS_Time");
78
80
82
85 virtual DODS_Time get();
87};
88
89// $Log: DODS_Time_Factory.h,v $
90// Revision 1.6 2003/02/10 23:01:52 jimg
91// Merged with 3.2.5
92//
93// Revision 1.5 2001/10/14 01:36:17 jimg
94// Merged with release-3-2-4.
95//
96// Revision 1.4.2.2 2002/01/22 02:19:35 jimg
97// Fixed bug 62. Users built fmt files that used types other than int32
98// for date and time components (e.g. int16). I fixed the factory classes
99// so that DODS_Date and DODS_Time objects will be built correctly when
100// any of the integer (or in the case of seconds, float) data types are
101// used. In so doing I also refactored the factory classes so that code
102// duplication was reduced (by using inhertiance).
103// Added two tests for the new capabilities (see date_time.1.exp, the last
104// two tests).
105//
106// Revision 1.4.2.1 2001/10/11 17:42:09 jimg
107// Fixed a bug in the Time, StartTime and EndTime factory calsses. A local
108// variable _gmt shadowed the class member _gmt.
109//
110// Revision 1.4 2000/10/11 19:37:56 jimg
111// Moved the CVS log entries to the end of files.
112// Changed the definition of the read method to match the dap library.
113// Added exception handling.
114// Added exceptions to the read methods.
115//
116// Revision 1.3 1999/01/08 22:08:19 jimg
117// Fixed doc++ comments.
118//
119// Revision 1.2 1999/01/05 00:42:42 jimg
120// Switched to simpler method names.
121// Added _gmt field.
122//
123// Revision 1.1 1998/12/28 19:08:05 jimg
124// Initial version of the DODS_Time factory object. This is a test
125// implementation.
126//
127
128#endif // _dods_time_factory_h
virtual DODS_Time get()