Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
AutoGCRooter Class Reference

Helper for rooting large groups of script values. More...

#include <AutoRooters.h>

Public Member Functions

 AutoGCRooter (ScriptInterface &scriptInterface)
 
 ~AutoGCRooter ()
 
void Push (JSObject *obj)
 
void Push (jsval val)
 
void Push (JSIdArray *ida)
 
void Trace (JSTracer *trc)
 

Private Member Functions

 NONCOPYABLE (AutoGCRooter)
 

Private Attributes

ScriptInterfacem_ScriptInterface
 
AutoGCRooterm_Previous
 
std::vector< JSObject * > m_Objects
 
std::vector< jsval > m_Vals
 
std::vector< JSIdArray * > m_IdArrays
 

Detailed Description

Helper for rooting large groups of script values.

Construct this object, push values into it, and they will all be rooted until this object is destroyed. Many of these objects can be used at once, but their lifetimes must be correctly nested.

Definition at line 31 of file AutoRooters.h.

Constructor & Destructor Documentation

AutoGCRooter::AutoGCRooter ( ScriptInterface scriptInterface)

Definition at line 24 of file AutoRooters.cpp.

AutoGCRooter::~AutoGCRooter ( )

Definition at line 30 of file AutoRooters.cpp.

Member Function Documentation

AutoGCRooter::NONCOPYABLE ( AutoGCRooter  )
private
void AutoGCRooter::Push ( JSObject *  obj)
inline

Definition at line 38 of file AutoRooters.h.

void AutoGCRooter::Push ( jsval  val)
inline

Definition at line 39 of file AutoRooters.h.

void AutoGCRooter::Push ( JSIdArray *  ida)
inline

Definition at line 40 of file AutoRooters.h.

void AutoGCRooter::Trace ( JSTracer *  trc)

Definition at line 36 of file AutoRooters.cpp.

Member Data Documentation

std::vector<JSIdArray*> AutoGCRooter::m_IdArrays
private

Definition at line 49 of file AutoRooters.h.

std::vector<JSObject*> AutoGCRooter::m_Objects
private

Definition at line 47 of file AutoRooters.h.

AutoGCRooter* AutoGCRooter::m_Previous
private

Definition at line 45 of file AutoRooters.h.

ScriptInterface& AutoGCRooter::m_ScriptInterface
private

Definition at line 44 of file AutoRooters.h.

std::vector<jsval> AutoGCRooter::m_Vals
private

Definition at line 48 of file AutoRooters.h.


The documentation for this class was generated from the following files: