00001 // Method-Column implementation -*- C++ -*- 00002 00003 // $Id: vdbl_method.h 631 2008-05-19 17:38:05Z mihaly $ 00004 // Copyright (C) 2003 Hermann Schichl 00005 // 00006 // This file is part of the Vienna Database Library. This library is free 00007 // software; you can redistribute it and/or modify it under the 00008 // terms of the Library GNU General Public License as published by the 00009 // Free Software Foundation; either version 2, or (at your option) 00010 // any later version. 00011 00012 // This library is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // Library GNU General Public License for more details. 00016 00017 // As a special exception, you may use this file as part of a free software 00018 // library without restriction. Specifically, if other files instantiate 00019 // templates or use macros or inline functions from this file, or you compile 00020 // this file and link it with other files to produce an executable, this 00021 // file does not by itself cause the resulting executable to be covered by 00022 // the Library GNU General Public License. This exception does not however 00023 // invalidate any other reasons why the executable file might be covered by 00024 // the Library GNU General Public License. 00025 00031 #ifndef __VDBL_METHOD_H 00032 #define __VDBL_METHOD_H 00033 00034 #include <vdbl_config.h> 00035 #include <vdbl_types.h> 00036 #include <vdbl_context.h> 00037 00038 __VDBL_BEGIN_NAMESPACE 00039 00040 #if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32) 00041 #pragma set woff 1209 00042 #endif 00043 00044 class _VDBL_row; 00045 00047 00055 template <class _TR> 00056 class _VDBL_method 00057 { 00058 private: 00060 typedef _TR return_type; 00061 00062 public: 00066 _VDBL_method() {} 00070 _VDBL_method(const _VDBL_method& __m) {} 00071 00075 virtual ~_VDBL_method() {} 00076 00080 virtual return_type operator() () const VDBL_PURE_VIRTUAL 00084 virtual return_type def() const VDBL_PURE_VIRTUAL 00088 virtual void setcontext(const context* _c, const _VDBL_row* _r) {} 00089 }; 00090 00092 00100 template <class _TR> 00101 class method : public _VDBL_method<_TR> 00102 { 00103 public: 00108 typedef _TR return_type; 00109 }; 00110 00111 #if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32) 00112 #pragma reset woff 1209 00113 #endif 00114 00115 __VDBL_END_NAMESPACE 00116 00117 #endif /* __VDBL_METHOD_H */ 00118 00119 // Local Variables: 00120 // mode:C++ 00121 // End: