Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
Object.h File Reference
#include "ScriptConversions.h"
#include "ScriptRequest.h"
#include "ScriptTypes.h"
#include "ps/CLogger.h"
Include dependency graph for Object.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Script
 Wraps SM APIs for manipulating JS objects.
 

Functions

template<typename PropType >
bool Script::GetProperty (const ScriptRequest &rq, JS::HandleValue obj, PropType name, JS::MutableHandleValue out)
 Get the named property on the given object. More...
 
template<typename T , typename PropType >
bool Script::GetProperty (const ScriptRequest &rq, JS::HandleValue obj, PropType name, T &out)
 
bool Script::GetProperty (const ScriptRequest &rq, JS::HandleValue obj, const char *name, JS::MutableHandleObject out)
 
template<typename T >
bool Script::GetPropertyInt (const ScriptRequest &rq, JS::HandleValue obj, int name, T &out)
 
bool Script::GetPropertyInt (const ScriptRequest &rq, JS::HandleValue obj, int name, JS::MutableHandleValue out)
 
bool Script::HasProperty (const ScriptRequest &rq, JS::HandleValue obj, const char *name)
 Check the named property has been defined on the given object. More...
 
template<typename PropType >
bool Script::SetProperty (const ScriptRequest &rq, JS::HandleValue obj, PropType name, JS::HandleValue value, bool constant=false, bool enumerable=true)
 Set the named property on the given object. More...
 
template<typename T , typename PropType >
bool Script::SetProperty (const ScriptRequest &rq, JS::HandleValue obj, PropType name, const T &value, bool constant=false, bool enumerable=true)
 
template<typename T >
bool Script::SetPropertyInt (const ScriptRequest &rq, JS::HandleValue obj, int name, const T &value, bool constant=false, bool enumerable=true)
 
template<typename T >
bool Script::GetObjectClassName (const ScriptRequest &rq, JS::HandleObject obj, T &name)
 
template<typename T >
bool Script::GetObjectClassName (const ScriptRequest &rq, JS::HandleValue val, T &name)
 Get the name of the object's class. More...
 
bool Script::FreezeObject (const ScriptRequest &rq, JS::HandleValue objVal, bool deep)
 
bool Script::EnumeratePropertyNames (const ScriptRequest &rq, JS::HandleValue objVal, bool enumerableOnly, std::vector< std::string > &out)
 Returns all properties of the object, both own properties and inherited. More...
 
JS::Value Script::CreateObject (const ScriptRequest &rq)
 Create a plain object (i.e. More...
 
bool Script::CreateObject (const ScriptRequest &rq, JS::MutableHandleValue objectValue)
 
template<typename T , typename... Args>
bool Script::CreateObject (const ScriptRequest &rq, JS::MutableHandleValue objectValue, const char *propertyName, const T &propertyValue, Args const &... args)
 Sets the given value to a new plain JS::Object, converts the arguments to JS::Values and sets them as properties. More...
 
bool Script::CreateArray (const ScriptRequest &rq, JS::MutableHandleValue objectValue, size_t length=0)
 Sets the given value to a new JS object or Null Value in case of out-of-memory. More...