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

scripting
Class CJSComplex

IJSComplex
   |
   +--CJSComplex

   in ScriptableComplex.h
Direct Known Subclasses:
CEntity, CEntityTemplate, CTechnology

template < typename T , bool ReadOnly = false > class CJSComplex
extends IJSComplex


Inner Classes, Typedefs, and Enums
typedef CJSComplex::ReflectorTable
          
 
Field Summary
 friend class CJSComplexPropertyAccessor
          
 static JSClass JSI_class
          
 static JSPropertySpec[] JSI_props
          
 bool m_EngineOwned
          
 static PropertyTable m_IntrinsicProperties
          
 JSObject* m_JS
          
 static std::vector< JSFunctionSpec > m_Methods
          
 CJSComplex::ReflectorTable m_Reflectors
          
 std::vector< CScriptObject > m_Watches
          
   
Fields inherited from class IJSComplex
m_Properties, m_Parent, m_Inheritors
 
Constructor Summary
CJSComplex()
          
virtual ~CJSComplex()
          
 
Method Summary
 static void AddClassProperty( const CStrW& PropertyName, GetFn Getter, SetFn Setter = NULL )
          
 static void AddClassProperty( const CStrW& PropertyName, PropType T::* Native, bool PropAllowInheritance = true, NotifyFn Update = NULL, NotifyFn Refresh = NULL )
          
 static void AddMethod( const char* Name, uintN MinArgs )
          
 void AddProperty( const CStrW& PropertyName, PropType* Native, bool PropAllowInheritance = true, NotifyFn Update = NULL, NotifyFn Refresh = NULL )
          
 void AddProperty( const CStrW& PropertyName, const CStrW& Value )
          
 void AddProperty( const CStrW& PropertyName, jsval Value )
          
 static void AddReadOnlyClassProperty( const CStrW& PropertyName, PropType T::* Native, bool PropAllowInheritance = true, NotifyFn Update = NULL, NotifyFn Refresh = NULL )
          
 void AddReadOnlyProperty( const CStrW& PropertyName, PropType* Native, bool PropAllowInheritance = true, NotifyFn Update = NULL, NotifyFn Refresh = NULL )
          
 void CreateScriptObject()
          
 static void DefaultFinalize( JSContext* cx, JSObject* obj )
          
 void DeletePreviouslyAssignedProperty( const CStrW& PropertyName )
          
 void FillEnumerateSet( IteratorState* it, CStrW* PropertyRoot = NULL )
          
 bool GetProperty( JSContext* cx, const CStrW& PropertyName, jsval* vp )
          
 JSObject* GetScript()
          
 IJSComplexProperty* HasProperty( const CStrW& PropertyName )
          
 static JSBool JSEnumerate( JSContext* cx, JSObject* obj, JSIterateOp enum_op, jsval* statep, jsid* idp )
          
 static JSBool JSGetProperty( JSContext* cx, JSObject* obj, jsval id, jsval* vp )
          
 static JSBool JSSetProperty( JSContext* cx, JSObject* obj, jsval id, jsval* vp )
          
 void Rebuild()
          
 void ReleaseScriptObject()
          
 static void ScriptingInit( const char* ClassName, JSNative Constructor = NULL, uintN ConstructorMinArgs = 0 )
          
 static void ScriptingShutdown()
          
 void SetBase( IJSComplex* Parent )
          
 void SetProperty( JSContext* cx, const CStrW& PropertyName, jsval* vp )
          
 static JSBool SetWatchAll( JSContext* cx, JSObject* obj, uintN argc, jsval* argv, jsval* rval )
          
 void Shutdown()
          
 static JSBool UnWatchAll( JSContext* cx, JSObject* obj, uintN argc, jsval* argv, jsval* rval )
          
 void WatchNotify( JSContext* cx, const CStrW& PropertyName, jsval* newval )
          
   
Methods inherited from class IJSComplex
SetBase, Rebuild, RebuildClassSet, HasProperty, FillEnumerateSet, GetProperty, AddProperty, AddProperty
 

Field Detail

CJSComplexPropertyAccessor

public friend class CJSComplexPropertyAccessor;

JSI_class

public static JSClass JSI_class;

JSI_props

public static JSPropertySpec JSI_props[];

m_EngineOwned

public bool m_EngineOwned;

m_IntrinsicProperties

public static PropertyTable m_IntrinsicProperties;

m_JS

public JSObject* m_JS;

m_Methods

public static std::vector< JSFunctionSpec > m_Methods;

m_Reflectors

public CJSComplex::ReflectorTable m_Reflectors;

m_Watches

public std::vector< CScriptObject > m_Watches;


Constructor Detail

CJSComplex

public CJSComplex();

~CJSComplex

public virtual ~CJSComplex();


Method Detail

AddClassProperty

public static void AddClassProperty( const CStrW& PropertyName, GetFn Getter, SetFn Setter = NULL );

AddClassProperty

public static void AddClassProperty( const CStrW& PropertyName, PropType T::* Native, bool PropAllowInheritance = true, NotifyFn Update = NULL, NotifyFn Refresh = NULL );

AddMethod

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

AddProperty

public void AddProperty( const CStrW& PropertyName, PropType* Native, bool PropAllowInheritance = true, NotifyFn Update = NULL, NotifyFn Refresh = NULL );

AddProperty

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

AddProperty

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

AddReadOnlyClassProperty

public static void AddReadOnlyClassProperty( const CStrW& PropertyName, PropType T::* Native, bool PropAllowInheritance = true, NotifyFn Update = NULL, NotifyFn Refresh = NULL );

AddReadOnlyProperty

public void AddReadOnlyProperty( const CStrW& PropertyName, PropType* Native, bool PropAllowInheritance = true, NotifyFn Update = NULL, NotifyFn Refresh = NULL );

CreateScriptObject

public void CreateScriptObject();

DefaultFinalize

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

DeletePreviouslyAssignedProperty

public void DeletePreviouslyAssignedProperty( const CStrW& PropertyName );

FillEnumerateSet

public void FillEnumerateSet( IteratorState* it, CStrW* PropertyRoot = NULL );

GetProperty

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

GetScript

public JSObject* GetScript();

HasProperty

public IJSComplexProperty* HasProperty( const CStrW& PropertyName );

JSEnumerate

public static JSBool JSEnumerate( JSContext* cx, JSObject* obj, JSIterateOp enum_op, jsval* statep, jsid* idp );

JSGetProperty

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

JSSetProperty

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

Rebuild

public void Rebuild();

ReleaseScriptObject

public void ReleaseScriptObject();

ScriptingInit

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

ScriptingShutdown

public static void ScriptingShutdown();

SetBase

public void SetBase( IJSComplex* Parent );

SetProperty

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

SetWatchAll

public static JSBool SetWatchAll( JSContext* cx, JSObject* obj, uintN argc, jsval* argv, jsval* rval );

Shutdown

public void Shutdown();

UnWatchAll

public static JSBool UnWatchAll( JSContext* cx, JSObject* obj, uintN argc, jsval* argv, jsval* rval );

WatchNotify

public void WatchNotify( JSContext* cx, const CStrW& PropertyName, jsval* newval );

 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