00001 // Search Graph context implementation -*- C++ -*- 00002 00003 // Copyright (C) 2003 Hermann Schichl 00004 // 00005 // This file is part of the COCONUT API. This library 00006 // is free software; you can redistribute it and/or modify it under the 00007 // terms of the Library GNU General Public License as published by the 00008 // Free Software Foundation; either version 2, or (at your option) 00009 // any later version. 00010 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 // Library GNU General Public License for more details. 00015 00016 // As a special exception, you may use this file as part of a free software 00017 // library without restriction. Specifically, if other files instantiate 00018 // templates or use macros or inline functions from this file, or you compile 00019 // this file and link it with other files to produce an executable, this 00020 // file does not by itself cause the resulting executable to be covered by 00021 // the Library GNU General Public License. This exception does not however 00022 // invalidate any other reasons why the executable file might be covered by 00023 // the Library GNU General Public License. 00024 00027 #ifndef _SGRAPHCTX_H_ 00028 #define _SGRAPHCTX_H_ 00029 00030 #include <list> 00031 #include <database> 00032 #include <db_method> 00033 00034 class search_graph_context : public vdbl::context 00035 { 00036 const gptr<search_graph>* __sg; 00037 00038 public: 00039 search_graph_context() : __sg(NULL) {} 00040 search_graph_context(const gptr<search_graph>* _i) : __sg(_i) {} 00041 search_graph_context(const search_graph_context& _s) : __sg(_s.__sg) {} 00042 virtual ~search_graph_context() {} 00043 00044 search_graph_context& operator=(const search_graph_context& _s) 00045 { __sg = _s.__sg; return *this; } 00046 00047 const gptr<search_graph>* sg() const { return __sg; } 00048 }; 00049 00050 #endif // _SGRAPHCTX_H