/* This source file is a part of the GePhex Project. Copyright (C) 2001-2004 Georg Seidel Martin Bayer Phillip Promesberger This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.*/ #ifndef INCLUDED_CMODULE_H #define INCLUDED_CMODULE_H #include #include "interfaces/imodule.h" #include "utils/autoptr.h" class CModuleVTable; class CModuleAttributes; class UpdateStrategy; class ITypeFactory; class CModule : public IModule { public: typedef utils::AutoPtr ITypePtr; public: CModule(void* instance,CModuleVTable&, const CModuleAttributes& attributes,const ITypeFactory&, const std::vector& defaultInputTypes, const std::string& module_class_name); virtual ~CModule(); std::string module_class_name() const; virtual const std::vector& getInputs() const; virtual const std::vector& getOutputs() const; virtual IInput* dependencies(); virtual void update(); virtual bool isDeterministic() const; //void setData(const IInput*/*,const IType**/); private: void* m_instance; CModuleVTable* m_vtable; std::vector inputs; std::vector outputs; bool _isDeterministic; typedef utils::AutoPtr UpdateStrategyPtr; UpdateStrategyPtr us; std::list m_deps; std::string m_module_class_name; //CModule(const CModule&); const CModule& operator=(const CModule&); // nicht impl. void doUpdate(); }; #endif