Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (32 sloc) 1.15 KB
#include <map>
#include <boost/function.hpp>
#include <xscript/extension.h>
namespace xscript {
* Internal xscript controlling point
class ControlExtension : public Extension {
virtual ~ControlExtension();
virtual const char* name() const;
virtual const char* nsref() const;
virtual void initContext(Context *ctx);
virtual void stopContext(Context *ctx);
virtual void destroyContext(Context *ctx);
virtual std::auto_ptr<Block> createBlock(Xml *owner, xmlNodePtr node);
typedef boost::function<std::auto_ptr<Block> (const ControlExtension *ext, Xml*, xmlNodePtr)> Constructor;
static void registerConstructor(const std::string & method, Constructor ctor);
* Find constructor for method. Throws and exception in case of non-existent method.
Constructor findConstructor(const std::string& method);
typedef std::map<std::string, Constructor> ConstructorMap;
static ConstructorMap constructors_;
} // namespace xscript
Something went wrong with that request. Please try again.