public:
- //! Type that represents a pointer to a layer's constructor
+ //! Type that represents a pointer to a Layer's constructor.
+ /*! As a pointer to the constructor, it represents a "factory" of layers.
+ */
typedef Layer* (*Factory)();
struct BookEntry
version(version) { }
};
+ //! Book of types of layers indexed by layer type name.
+ /*! While the sifz file is read, each time a new layer entry is found,
+ ** the factory constructor that the "factory" pointer member of the
+ ** "BookEntry" struct points to, is called, and a new layer of that type
+ ** is created.
+ ** \sa Layer::Factory
+ */
typedef std::map<String,BookEntry> Book;
static void register_in_book(const BookEntry &);
default_gamma_=new synfig::Gamma(1.0/2.2);
//default_gamma_->set_black_level(0.05); // Default to 5% black level.
+ // At least one target must be available.
book()["null"]=std::pair<synfig::Target::Factory,String>(Target_Null::create,"null");
ext_book()["null"]="null";
book()["null-tile"]=std::pair<synfig::Target::Factory,String>(Target_Null_Tile::create,"null-tile");
*/
public:
+ //! Type that represents a pointer to a Target's constructor.
+ /*! As a pointer to the constructor, it represents a "factory" of targets.
+ ** Receives the output filename (including path).
+ */
typedef Target* (*Factory)(const char *filename);
- //! A type for a map of targets, indexed by the name of the Target
+ //! Book of types of targets indexed by the name of the Target.
+ /*! Each entry contains the Target constructor pointer and the output
+ ** filename string (including path).
+ */
typedef std::map<String,std::pair<Factory,String> > Book;
typedef std::map<String,String> ExtBook;
//! Type that represents a pointer to a ValueNode's constructor
+ /*! As a pointer to the constructor, it represents a "factory" of
+ ** objects of this class.
+ */
typedef LinkableValueNode* (*Factory)(const ValueBase&);
typedef bool (*CheckType)(ValueBase::Type);
ReleaseVersion release_version; // which version of synfig introduced this valuenode type
};
+ //! Book of types of linkable value nodes indexed by type name.
+ /*! While the sifz file is read, each time a new LinkableValueNode entry
+ ** is found, the factory constructor that the "factory" pointer member
+ ** of the "BookEntry" struct points to, is called, and a new object of
+ ** that type is created.
+ ** \sa LinkableValueNode::Factory
+ */
typedef std::map<String,BookEntry> Book;
static Book& book();