#include "base/logger.hpp"
#include "base/objectlock.hpp"
#include "base/dynamictype.hpp"
+#include "base/application.hpp"
#include <boost/foreach.hpp>
#include <boost/regex.hpp>
#include <algorithm>
REGISTER_SCRIPTFUNCTION(intersection, &ScriptUtils::Intersection);
REGISTER_SCRIPTFUNCTION(log, &ScriptUtils::Log);
REGISTER_SCRIPTFUNCTION(range, &ScriptUtils::Range);
-REGISTER_SCRIPTFUNCTION(exit, &ScriptUtils::Exit);
+REGISTER_SCRIPTFUNCTION(exit, &Application::Exit);
REGISTER_SCRIPTFUNCTION(typeof, &ScriptUtils::TypeOf);
REGISTER_SCRIPTFUNCTION(keys, &ScriptUtils::Keys);
REGISTER_SCRIPTFUNCTION(random, &Utility::Random);
return result;
}
-void ScriptUtils::Exit(int code)
-{
- exit(code);
-}
-
Type::Ptr ScriptUtils::TypeOf(const Value& value)
{
switch (value.GetType()) {
static Array::Ptr Intersection(const std::vector<Value>& arguments);
static void Log(const std::vector<Value>& arguments);
static Array::Ptr Range(const std::vector<Value>& arguments);
- static void Exit(int code);
static Type::Ptr TypeOf(const Value& value);
static Array::Ptr Keys(const Dictionary::Ptr& dict);
static DynamicObject::Ptr GetObject(const String& type, const String& name);