casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
AbstractFunctionFactory.h
Go to the documentation of this file.
00001 //# FunctionFactory.h: a class for creating Function objects from Records
00002 //# Copyright (C) 2002
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //#
00027 //# $Id: AbstractFunctionFactory.h 20299 2008-04-03 05:56:44Z gervandiepen $
00028 
00029 #ifndef SCIMATH_ABSTRACTFUNCTIONFACTORY_H
00030 #define SCIMATH_ABSTRACTFUNCTIONFACTORY_H
00031 
00032 #include <scimath/Functionals/Function.h>
00033 #include <scimath/Functionals/FunctionFactoryErrors.h>
00034 
00035 namespace casa { //# NAMESPACE CASA - BEGIN
00036 
00037 //# Forward Declarations
00038 class Record;
00039 
00040 // <summary>
00041 // a class for creating Function objects from Records
00042 // </summary>
00043 
00044 // <use visibility=export>
00045 
00046 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
00047 // </reviewed>
00048 
00049 // <prerequisite>
00050 //   <li> FunctionFactory
00051 // </prerequisite>
00052 //
00053 // <etymology>
00054 // This class is based on the Factory pattern, similar to the 
00055 // ApplicationObjectFactory
00056 // </etymology>
00057 //
00058 // <synopsis>
00059 //
00060 //
00061 //
00062 //
00063 // </synopsis>
00064 //
00065 // <example>
00066 //
00067 //
00068 //
00069 // </example>
00070 //
00071 // <motivation>
00072 //
00073 //
00074 //
00075 // </motivation>
00076 //
00077 // <thrown>
00078 // </thrown>
00079 //
00080 // <todo asof="yyyy/mm/dd">
00081 // </todo>
00082 
00083 template<class T> 
00084 class FunctionFactory
00085 {
00086 public:
00087     FunctionFactory() {}
00088     FunctionFactory(const FunctionFactory<T>& factory) {}
00089     virtual ~FunctionFactory() {}
00090     virtual Function<T> *create(const Record& gr) const 
00091         throw (FunctionFactoryError) = 0;
00092     FunctionFactory<T>& operator=(const FunctionFactory<T>& factory) {
00093         return *this;
00094     }
00095 };
00096 
00097 
00098 } //# NAMESPACE CASA - END
00099 
00100 #endif
00101 
00102