X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fmodule.h;h=071e8e7956225c1eb08bc88278067b7411ff82bc;hb=c3ad95144d148602f672e95ddda1f18fc35502f8;hp=e3afdfb5e7d5615bf7a2cc5071a1f780a968fae7;hpb=28f28705612902c15cd0702cc891fba35bf2d2df;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/module.h b/synfig-core/trunk/src/synfig/module.h index e3afdfb..071e8e7 100644 --- a/synfig-core/trunk/src/synfig/module.h +++ b/synfig-core/trunk/src/synfig/module.h @@ -1,20 +1,21 @@ /* === S Y N F I G ========================================================= */ -/*! \file module.h +/*! \file synfig/module.h ** \brief writeme ** -** $Id: module.h,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $ +** $Id$ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package 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. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package 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. ** \endlegal */ /* ========================================================================= */ @@ -41,7 +42,7 @@ /* === M A C R O S ========================================================= */ //! Marks the start of a module description -#define MODULE_DESC_BEGIN(x) struct x##_modclass : public synfig::Module { x##_modclass(synfig::ProgressCallback *callback=NULL); +#define MODULE_DESC_BEGIN(x) struct x##_modclass : public synfig::Module { x##_modclass(synfig::ProgressCallback *callback=NULL); //! Sets the localized name of the module #define MODULE_NAME(x) virtual const char * Name() { return x; } @@ -74,14 +75,14 @@ synfig::Module* _##x##_LTX_new_instance(synfig::ProgressCallback *cb) \ { if(SYNFIG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\ if(cb)cb->error(#x": Unable to load module due to version mismatch."); return NULL; } \ - }; x##_modclass::x##_modclass(synfig::ProgressCallback *cb) { + }; x##_modclass::x##_modclass(synfig::ProgressCallback */*cb*/) { #else //! Marks the start of a module's inventory #define MODULE_INVENTORY_BEGIN(x) extern "C" { \ synfig::Module* x##_LTX_new_instance(synfig::ProgressCallback *cb) \ { if(SYNFIG_CHECK_VERSION()){x##_modclass *mod=new x##_modclass(cb); mod->constructor_(cb); return mod; }\ if(cb)cb->error(#x": Unable to load module due to version mismatch."); return NULL; } \ - }; x##_modclass::x##_modclass(synfig::ProgressCallback *cb) { + }; x##_modclass::x##_modclass(synfig::ProgressCallback */*cb*/) { #endif //! Marks the start of the layers in the module's inventory @@ -132,13 +133,13 @@ class ProgressCallback; class Module : public etl::shared_object { public: - bool constructor_(synfig::ProgressCallback *cb) { return true; } + bool constructor_(synfig::ProgressCallback */*cb*/) { return true; } virtual void destructor_() { } - + typedef etl::handle Handle; typedef etl::loose_handle LooseHandle; typedef etl::handle ConstHandle; - + public: typedef Module*(*constructor_type)(ProgressCallback *); typedef std::map Book; @@ -154,7 +155,7 @@ public: static void Register(Handle mod); static bool Register(const String &module_name, ProgressCallback *cb=NULL); static inline void Register(Module *mod) { Register(Handle(mod)); } - + virtual const char * Name() { return " "; } virtual const char * Desc() { return " "; } virtual const char * Author() { return " "; }