2014-04-28 21:09:25 +04:00
|
|
|
#pragma once
|
2010-01-30 07:26:05 +03:00
|
|
|
|
2011-09-03 08:10:36 +04:00
|
|
|
#include <string>
|
|
|
|
#include <boost/unordered_map.hpp>
|
2013-04-09 08:28:16 +04:00
|
|
|
#include "module.h"
|
2013-04-24 17:17:25 +04:00
|
|
|
#include "localscope.h"
|
2010-01-30 07:26:05 +03:00
|
|
|
|
2011-11-06 21:37:12 +04:00
|
|
|
class Builtins
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
typedef boost::unordered_map<std::string, class AbstractFunction*> FunctionContainer;
|
|
|
|
typedef boost::unordered_map<std::string, class AbstractModule*> ModuleContainer;
|
|
|
|
|
|
|
|
static Builtins *instance(bool erase = false);
|
|
|
|
static void init(const char *name, class AbstractModule *module);
|
|
|
|
static void init(const char *name, class AbstractFunction *function);
|
|
|
|
void initialize();
|
|
|
|
std::string isDeprecated(const std::string &name);
|
|
|
|
|
2013-04-24 17:17:25 +04:00
|
|
|
const LocalScope &getGlobalScope() { return this->globalscope; }
|
2013-04-09 08:28:16 +04:00
|
|
|
|
2011-11-06 21:37:12 +04:00
|
|
|
private:
|
2013-04-09 08:28:16 +04:00
|
|
|
Builtins();
|
2011-11-06 21:37:12 +04:00
|
|
|
~Builtins();
|
|
|
|
|
2013-04-24 17:17:25 +04:00
|
|
|
LocalScope globalscope;
|
2011-11-06 21:37:12 +04:00
|
|
|
|
|
|
|
boost::unordered_map<std::string, std::string> deprecations;
|
|
|
|
};
|