/* osgCompute - Copyright (C) 2008-2009 SVT Group
 *                                                                     
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 3 of
 * the License, or (at your option) any later version.
 *                                                                     
 * This library 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 Lesse General Public License for more details.
 *
 * The full license is in LICENSE file included with this distribution.
*/

#ifndef OSGCUDA_MODULE
#define OSGCUDA_MODULE 1

#include <osgCompute/Module>
#include "osgCuda/Export"
#include "osgCuda/Context"

namespace osgCuda
{
    /**
    */
    class LIBRARY_EXPORT Module : public osgCompute::Module
    {
    public:
        Module();

        virtual bool init();
        virtual void clear();

    protected:
        virtual ~Module() { clearLocal(); }
        void clearLocal();

        virtual bool init( const osgCompute::Context& context ) const;
        virtual void clear( const osgCompute::Context& context ) const;

    private:
        // copy constructor and operator should not be called
        Module( const Module&, const osg::CopyOp& ) {}
        Module& operator=( const Module& copy ) { return (*this); }
    };
}

#endif //OSGCUDA_MODULE
