X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fmodule.h;h=d142287ddc5ea3bd771223695930cbb048936e2a;hb=a532eda73076926167d4e255c4bcbbe342978747;hp=071e8e7956225c1eb08bc88278067b7411ff82bc;hpb=c3ad95144d148602f672e95ddda1f18fc35502f8;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/module.h b/synfig-core/trunk/src/synfig/module.h index 071e8e7..d142287 100644 --- a/synfig-core/trunk/src/synfig/module.h +++ b/synfig-core/trunk/src/synfig/module.h @@ -88,9 +88,9 @@ //! Marks the start of the layers in the module's inventory #define BEGIN_LAYERS { -//! DEPRECATED - use @INCLUDE_LAYER() -//#define LAYER(x) synfig::Layer::book()[synfig::String(x::name__)]=x::create; +//! DEPRECATED - use #INCLUDE_LAYER(class) #define LAYER(class) synfig::Layer::register_in_book(synfig::Layer::BookEntry(class::create,class::name__,class::local_name__,class::category__,class::cvs_id__,class::version__)); +//#define LAYER(x) synfig::Layer::book()[synfig::String(x::name__)]=x::create; #define LAYER_ALIAS(class,alias) synfig::Layer::register_in_book(synfig::Layer::BookEntry(class::create,alias,alias,_("Do Not Use"),class::cvs_id__,class::version__)); //! Marks the end of the layers in the module's inventory @@ -99,7 +99,11 @@ //! Marks the start of the targets in the module's inventory #define BEGIN_TARGETS { -#define TARGET(x) synfig::Target::book()[synfig::String(x::name__)]=std::pair(x::create,synfig::String(x::ext__));synfig::Target::ext_book()[synfig::String(x::ext__)]=x::name__; +#define TARGET(x) \ + synfig::Target::book()[synfig::String(x::name__)]= \ + std::pair \ + (x::create,synfig::String(x::ext__)); \ + synfig::Target::ext_book()[synfig::String(x::ext__)]=x::name__; #define TARGET_EXT(x,y) synfig::Target::ext_book()[synfig::String(y)]=x::name__; @@ -116,6 +120,17 @@ //! Marks the end of the importers in the module's inventory #define END_IMPORTERS } +//! Marks the start of the valuenodes in the module's inventory +#define BEGIN_VALUENODES { synfig::LinkableValueNode::Book &book(synfig::LinkableValueNode::book()); + +#define VALUENODE(class,name,local) \ + book[name].factory=reinterpret_cast(&class::create); \ + book[name].check_type=&class::check_type; \ + book[name].local_name=local; + +//! Marks the end of the valuenodes in the module's inventory +#define END_VALUENODES } + //! Marks the end of a module's inventory #define MODULE_INVENTORY_END }