Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
Object.h File Reference
#include "lib/posix/posix_types.h"
#include "ps/CLogger.h"
#include "scriptinterface/Conversions.h"
#include "scriptinterface/Request.h"
#include <cwchar>
#include <js/Array.h>
#include <js/GCVector.h>
#include <js/Id.h>
#include <js/Object.h>
#include <js/PropertyAndElement.h>
#include <js/PropertyDescriptor.h>
#include <js/RootingAPI.h>
#include <js/TypeDecls.h>
#include <js/Value.h>
#include <jsapi.h>
#include <jsfriendapi.h>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
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
 Abstraction around a SpiderMonkey JSContext.
 

Functions

template<typename PropType >
bool Script::GetProperty (const Script::Request &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 Script::Request &rq, JS::HandleValue obj, PropType name, T &out)
 
bool Script::GetProperty (const Script::Request &rq, JS::HandleValue obj, const char *name, JS::MutableHandleObject out)
 
template<typename T >
bool Script::GetPropertyInt (const Script::Request &rq, JS::HandleValue obj, int name, T &out)
 
bool Script::GetPropertyInt (const Script::Request &rq, JS::HandleValue obj, int name, JS::MutableHandleValue out)
 
bool Script::HasProperty (const Script::Request &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 Script::Request &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 Script::Request &rq, JS::HandleValue obj, PropType name, const T &value, bool constant=false, bool enumerable=true)
 
template<typename T >
bool Script::SetPropertyInt (const Script::Request &rq, JS::HandleValue obj, int name, const T &value, bool constant=false, bool enumerable=true)
 
template<typename T >
bool Script::GetObjectClassName (const Script::Request &rq, JS::HandleObject obj, T &name)
 
template<typename T >
bool Script::GetObjectClassName (const Script::Request &rq, JS::HandleValue val, T &name)
 Get the name of the object's class. More...
 
bool Script::DeepFreezeObject (const Script::Request &rq, JS::HandleValue objVal)
 
bool Script::EnumeratePropertyNames (const Script::Request &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 Script::Request &rq)
 Create a plain object (i.e. More...
 
bool Script::CreateObject (const Script::Request &rq, JS::MutableHandleValue objectValue)
 
template<typename T , typename... Args>
bool Script::CreateObject (const Script::Request &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...