bes  Updated for version 3.20.6
DODS_Date_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_date_factory_h
34 #define _dods_date_factory_h
35 
36 
37 #include "DODS_Date.h"
38 #include "DAS.h"
39 #include "DDS.h"
40 #include "BaseType.h"
41 
42 using namespace libdap ;
43 
51 private:
52  int _year_base;
53 
54  BaseType *_year;
55  BaseType *_month;
56  BaseType *_day;
57  BaseType *_year_day;
58  int _month_day;
59 
60  enum date_format _format;
61 
62 protected:
63  DODS_Date_Factory() {} /* Prevent the creation of empty objects. */
64 
65 public:
66  virtual ~DODS_Date_Factory() {}
67 
83  DODS_Date_Factory(DDS &dds, const string &attribute_name = "DODS_Date");
85 
92  virtual DODS_Date get();
94 };
95 
96 #endif // _dods_date_factory_h
DODS_Date
Definition: DODS_Date.h:108
libdap
Definition: BESDapFunctionResponseCache.h:35
DODS_Date_Factory
Definition: DODS_Date_Factory.h:50