Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (35 sloc) 1.2 KB
#ifndef _XSCRIPT_DETAILS_EXTENSION_LIST_H_
#define _XSCRIPT_DETAILS_EXTENSION_LIST_H_
#include <memory>
#include <vector>
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
#include <libxml/tree.h>
#include "xscript/extension.h"
#include "internal/phoenix_singleton.h"
namespace xscript {
class Loader;
class Config;
class Context;
class ExtensionList :
private boost::noncopyable,
public PhoenixSingleton<ExtensionList> {
public:
ExtensionList();
virtual ~ExtensionList();
void initContext(Context *ctx);
void stopContext(Context *ctx);
void destroyContext(Context *ctx);
void init(const Config *config);
void registerExtension(ExtensionHolder ext);
Extension* extension(const xmlNodePtr node, bool allow_empty_namespace) const;
Extension* extension(const char *name, const char *ref, bool allow_empty_namespace) const;
private:
friend class std::auto_ptr<ExtensionList>;
bool accepts(Extension *ext, const char *name, const char *ref, bool allow_empty_namespace) const;
private:
boost::shared_ptr<Loader> loader_;
std::vector<Extension*> extensions_;
};
} // namespace xscript
#endif // _XSCRIPT_DETAILS_EXTENSION_LIST_H_
Jump to Line
Something went wrong with that request. Please try again.