libdap++ Updated for version 3.8.2

BaseTypeFactory.h

Go to the documentation of this file.
00001 
00002 // -*- mode: c++; c-basic-offset:4 -*-
00003 
00004 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
00005 // Access Protocol.
00006 
00007 // Copyright (c) 2005 OPeNDAP, Inc.
00008 // Author: James Gallagher <jgallagher@opendap.org>
00009 //
00010 // This library is free software; you can redistribute it and/or
00011 // modify it under the terms of the GNU Lesser General Public
00012 // License as published by the Free Software Foundation; either
00013 // version 2.1 of the License, or (at your option) any later version.
00014 //
00015 // This library is distributed in the hope that it will be useful,
00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 //
00024 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
00025 
00026 #ifndef base_type_factory_h
00027 #define base_type_factory_h
00028 
00029 #include <string>
00030 
00031 // Class declarations; Make sure to include the corresponding headers in the
00032 // implementation file.
00033 
00034 namespace libdap
00035 {
00036 
00037 class Byte;
00038 class Int16;
00039 class UInt16;
00040 class Int32;
00041 class UInt32;
00042 class Float32;
00043 class Float64;
00044 class Str;
00045 class Url;
00046 class Array;
00047 class Structure;
00048 class Sequence;
00049 class Grid;
00050 class BaseType;
00051 
00077 class BaseTypeFactory
00078 {
00079 public:
00080     BaseTypeFactory()
00081     {}
00082     virtual ~BaseTypeFactory()
00083     {}
00084 
00085     virtual Byte *NewByte(const string &n = "") const;
00086     virtual Int16 *NewInt16(const string &n = "") const;
00087     virtual UInt16 *NewUInt16(const string &n = "") const;
00088     virtual Int32 *NewInt32(const string &n = "") const;
00089     virtual UInt32 *NewUInt32(const string &n = "") const;
00090     virtual Float32 *NewFloat32(const string &n = "") const;
00091     virtual Float64 *NewFloat64(const string &n = "") const;
00092 
00093     virtual Str *NewStr(const string &n = "") const;
00094     virtual Url *NewUrl(const string &n = "") const;
00095 
00096     virtual Array *NewArray(const string &n = "", BaseType *v = 0) const;
00097     virtual Structure *NewStructure(const string &n = "") const;
00098     virtual Sequence *NewSequence(const string &n = "") const;
00099     virtual Grid *NewGrid(const string &n = "") const;
00100 };
00101 
00102 } // namespace libdap
00103 
00104 #endif // base_type_factory_h