Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

scripting
Class CJSObject

IJSObject
   |
   +--CJSObject

   in ScriptableObject.h
Direct Known Subclasses:
CGameViewImpl, CNetClient, CNetClient::CServerSession, CNetServer, CNetServerSession, CPlayerSlot, CProfileNode, CRenderer, CScriptEvent, CSynchedJSObject, SColour, CJSProgressTimer, CProductionItem, CProductionQueue, CProjectile, CTrigger, JSI_Sound

template < typename T , bool ReadOnly > class CJSObject
extends IJSObject


Field Summary
 static JSClass JSI_class
          
private static JSPropertySpec[] JSI_props
          
protected bool m_EngineOwned
          
private JSObject* m_JS
          
private static std::vector< JSFunctionSpec > m_Methods
          
protected static PropertyTable m_NativeProperties
          
protected PropertyTable m_NonsharedProperties
          
protected PropertyTable m_ScriptProperties
          
 
Constructor Summary
CJSObject()
          
virtual ~CJSObject()
          
 
Method Summary
 void AddLocalProperty( const CStrW& PropertyName, PropType* Native, bool PropReadOnly = ReadOnly )
          
 static void AddMethod( const char* Name, uintN MinArgs )
          
 static void AddProperty( const CStrW& PropertyName, PropType T::* Native, bool PropReadOnly = ReadOnly )
          
 void AddProperty( const CStrW& PropertyName, const CStrW& Value )
          
 void AddProperty( const CStrW& PropertyName, jsval Value )
          
 static void AddProperty( const CStrW& PropertyName, TGetFn Getter, TSetFn Setter = NULL )
          
 void CreateScriptObject()
          
private static void DefaultFinalize( JSContext* cx, JSObject* obj )
          
 bool GetProperty( JSContext* cx, const CStrW& PropertyName, jsval* vp )
          
 JSObject* GetScript()
          
 IJSProperty* HasProperty( const CStrW& PropertyName )
          
private static JSBool JSGetProperty( JSContext* cx, JSObject* obj, jsval id, jsval* vp )
          
private static JSBool JSSetProperty( JSContext* cx, JSObject* obj, jsval id, jsval* vp )
          
 void ReleaseScriptObject()
          
 static void ScriptingInit( const char* ClassName, JSNative Constructor = NULL, uintN ConstructorMinArgs = 0 )
          
 static void ScriptingShutdown()
          
 void SetProperty( JSContext* cx, const CStrW& PropertyName, jsval* vp )
          
 void Shutdown()
          
   
Methods inherited from class IJSObject
HasProperty, GetProperty, AddProperty, AddProperty
 

Field Detail

JSI_class

public static JSClass JSI_class;

JSI_props

private static JSPropertySpec JSI_props[];

m_EngineOwned

protected bool m_EngineOwned;

m_JS

private JSObject* m_JS;

m_Methods

private static std::vector< JSFunctionSpec > m_Methods;

m_NativeProperties

protected static PropertyTable m_NativeProperties;

m_NonsharedProperties

protected PropertyTable m_NonsharedProperties;

m_ScriptProperties

protected PropertyTable m_ScriptProperties;


Constructor Detail

CJSObject

public CJSObject();

~CJSObject

public virtual ~CJSObject();


Method Detail

AddLocalProperty

public void AddLocalProperty( const CStrW& PropertyName, PropType* Native, bool PropReadOnly = ReadOnly );

AddMethod

public static void AddMethod( const char* Name, uintN MinArgs );

AddProperty

public static void AddProperty( const CStrW& PropertyName, PropType T::* Native, bool PropReadOnly = ReadOnly );

AddProperty

public void AddProperty( const CStrW& PropertyName, const CStrW& Value );

AddProperty

public void AddProperty( const CStrW& PropertyName, jsval Value );

AddProperty

public static void AddProperty( const CStrW& PropertyName, TGetFn Getter, TSetFn Setter = NULL );

CreateScriptObject

public void CreateScriptObject();

DefaultFinalize

private static void DefaultFinalize( JSContext* cx, JSObject* obj );

GetProperty

public bool GetProperty( JSContext* cx, const CStrW& PropertyName, jsval* vp );

GetScript

public JSObject* GetScript();

HasProperty

public IJSProperty* HasProperty( const CStrW& PropertyName );

JSGetProperty

private static JSBool JSGetProperty( JSContext* cx, JSObject* obj, jsval id, jsval* vp );

JSSetProperty

private static JSBool JSSetProperty( JSContext* cx, JSObject* obj, jsval id, jsval* vp );

ReleaseScriptObject

public void ReleaseScriptObject();

ScriptingInit

public static void ScriptingInit( const char* ClassName, JSNative Constructor = NULL, uintN ConstructorMinArgs = 0 );

ScriptingShutdown

public static void ScriptingShutdown();

SetProperty

public void SetProperty( JSContext* cx, const CStrW& PropertyName, jsval* vp );

Shutdown

public void Shutdown();

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:13
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD