3ds Max C++ API Reference
Collectable Class Referenceabstract

#include <collectable.h>

+ Inheritance diagram for Collectable:

Public Member Functions

ScripterExport Collectable ()
 
virtual ScripterExport ~Collectable ()
 
ScripterExport voidoperator new (size_t sz, char flag)
 
ScripterExport voidoperator new (size_t sz)
 
ScripterExport void operator delete (void *val)
 
ScripterExport void operator delete (void *val, char flag)
 
virtual void collect ()=0
 
virtual ScripterExport void gc_trace ()
 
ScripterExport bool derives_from_Animatable ()
 
virtual BOOL derives_from_MAXWrapper ()
 
ScripterExport void make_collectable ()
 
void make_permanent ()
 
void make_static ()
 
int is_marked ()
 
int is_not_marked ()
 
int is_garbage ()
 
int is_permanent ()
 
void mark_in_use ()
 
void unmark_in_use ()
 
int has_heap_copy ()
 
int is_in_heap ()
 
int is_on_stack ()
 

Static Public Member Functions

static ScripterExport void for_all_values (void(*map_fn)(Value *val), ValueMapper *mapper=NULL, ValueMetaClass *c=NULL)
 
static void mark ()
 
static void sweep ()
 
static void setup (size_t)
 
static ScripterExport void gc ()
 
static void coalesce_free_list ()
 
static void close_down ()
 
static void drop_maxwrapper_refs ()
 
static ScripterExport void push_alloc_stack_frame ()
 
static ScripterExport void pop_alloc_stack_frame ()
 
static ScripterExport ULONGLONG get_num_values_created ()
 
static ScripterExport bool validate_value_linkages ()
 

Public Attributes

Collectablenext
 
Collectableprev
 
byte flags
 
byte flags2
 
short flags3
 

Static Public Attributes

static CRITICAL_SECTION heap_update
 
static Collectablecollectable_list
 
static Collectablepermanent_list
 
static free_memfree_list [GC_NUM_SUBLISTS]
 
static size_t heap_allocated
 
static size_t heap_size
 
static ScripterExport collectable_state state
 
static ScripterExport bool fullCollectNextHoldFlush
 
static bool gc_light
 
static bool in_gc
 
static HANDLE hGCCompletedEvent
 

Friends

class Value
 

Constructor & Destructor Documentation

◆ Collectable()

◆ ~Collectable()

virtual ScripterExport ~Collectable ( )
virtual

Member Function Documentation

◆ for_all_values()

static ScripterExport void for_all_values ( void(*)(Value *val)  map_fn,
ValueMapper mapper = NULL,
ValueMetaClass c = NULL 
)
static

◆ operator new() [1/2]

ScripterExport void* operator new ( size_t  sz,
char  flag 
)

◆ operator new() [2/2]

ScripterExport void* operator new ( size_t  sz)

◆ operator delete() [1/2]

ScripterExport void operator delete ( void val)

◆ operator delete() [2/2]

ScripterExport void operator delete ( void val,
char  flag 
)

◆ mark()

static void mark ( )
static

◆ sweep()

static void sweep ( )
static

◆ setup()

static void setup ( size_t  )
static

◆ gc()

static ScripterExport void gc ( )
static

◆ coalesce_free_list()

static void coalesce_free_list ( )
static

◆ collect()

virtual void collect ( )
pure virtual

Implemented in RolloutControl, ShallowString, SafeArrayWrapper, OLEMethod, OLEObject, MSZipPackage, MouseTool, Listener, RCMenu, MenuItem, GroupEndControl, GroupStartControl, MtlButtonControl, MapButtonControl, BitmapControl, CheckBoxControl, RadioControl, ColorPickerControl, PickerControl, SliderControl, SpinnerControl, ListBoxControl, ComboBoxControl, EditTextControl, CheckButtonControl, ButtonControl, LabelControl, RolloutFloater, Rollout, MSPlugin, MSPluginClass, MSCustAttribDef, MAXNamedSet, MAXNamedSetArray, PathName, MAXSceneXRef, MAXRootNode, ChangeHandler, MAXCustAttribArray, MAXCustAttrib, MAXRenderer, MAXShadowType, MAXMultiPassCameraEffect, MAXEffect, MAXAtmospheric, BezierShapeValue, MAXBezierShapeClass, MeshValue, MAXMeshClass, MAXTVUtility, TrackViewPickValue, MAXTVNode, MAXRefTarg, MAXSubAnim, MAXControl, MAXModifierArray, MAXModifier, MAXPB2ArrayParam, MAXObject, MAXNodeChildrenArray, MAXNode, MAXClass, MAXSuperClass, MAXWrapper, MAXMeditMaterials, MAXMtlBase, MAXTexture, MAXMaterialLibrary, MAXMultiMaterial, MAXMaterial, MAXKey, MAXKeyArray, EdgeSelectionValue, FaceSelectionValue, VertSelectionValue, MotionTracker, MAXBitMap, NoValue, Unsupplied, Empty, Ok, Undefined, Boolean, WindowStream, ValueHolder, Struct, StructDef, StringStream, String, ReadonlyTextFileStream, Pipe, IntegerPtr, Integer64, Integer, Double, Name, MSInterval, MSTime, MXSDictionaryValue, HashTable, StaticInterfaceMethod, FPStaticMethodInterfaceValue, FPMixinInterfaceValue, FPInterfaceValue, IObjectValue, InterfaceMethod, InterfaceFunction, UserGenericValue, PluginMethod, StructMethod, MAXScriptFunction, MappedPrimitive, Primitive, NodeGeneric, MappedGeneric, Generic, FileStream, DataPair, ConstColorValue, ColorValue, BitArrayValue, Array, Box3Value, Box2Value, Point4Value, Point2Value, Matrix3Value, EulerAnglesValue, AngAxisValue, QuatValue, RayValue, ConstPoint3Value, Point3Value, ReadOnlyThunk, OwnerThunk, DerefThunk, ThunkReference, StructMemberThunk, PluginParamThunk, ConstPluginLocalThunk, PluginLocalThunk, RCMenuLocalThunk, RCMenuItemThunk, CodeBlockLocalThunk, ToolLocalThunk, ConstRolloutLocalThunk, RolloutLocalThunk, RolloutControlThunk, IndexThunk, FnCallPropertyThunk, PropertyThunk, IndirectFreeThunk, FreeThunk, ContextThunk, IndirectLocalThunk, LocalThunk, SystemGlobalThunk, ConstGlobalThunk, GlobalThunk, Parser, CodeBlock, Maker, CodeTree, SourceFileWrapper, and SourcePositionWrapper.

◆ gc_trace()

◆ close_down()

static void close_down ( )
static

◆ drop_maxwrapper_refs()

static void drop_maxwrapper_refs ( )
static

◆ derives_from_Animatable()

ScripterExport bool derives_from_Animatable ( )

◆ derives_from_MAXWrapper()

virtual BOOL derives_from_MAXWrapper ( )
inlinevirtual

Reimplemented in MAXWrapper.

167 { return FALSE; }

◆ make_collectable()

ScripterExport void make_collectable ( )

◆ make_permanent()

void make_permanent ( )

◆ make_static()

void make_static ( )

◆ push_alloc_stack_frame()

static ScripterExport void push_alloc_stack_frame ( )
static

◆ pop_alloc_stack_frame()

static ScripterExport void pop_alloc_stack_frame ( )
static

◆ is_marked()

int is_marked ( )
inline
176 { return (flags & GC_IN_USE); }
byte flags
Definition: collectable.h:121
@ GC_IN_USE
Definition: collectable.h:39

◆ is_not_marked()

int is_not_marked ( )
inline
178  {
179  DbgAssert (!is_on_stack()); // debugging new stack-based collector
180  return !is_marked();
181  }
int is_marked()
Definition: collectable.h:176
int is_on_stack()
Definition: collectable.h:188
#define DbgAssert(expr)
Definition: assert1.h:82

◆ is_garbage()

int is_garbage ( )
inline
182 { return is_not_marked(); }
int is_not_marked()
Definition: collectable.h:177

◆ is_permanent()

int is_permanent ( )
inline
183 { return (flags & GC_PERMANENT); }
@ GC_PERMANENT
Definition: collectable.h:41

◆ mark_in_use()

void mark_in_use ( )
inline
184 { flags |= GC_IN_USE; }

◆ unmark_in_use()

void unmark_in_use ( )
inline
185 { flags &= ~GC_IN_USE; }

◆ has_heap_copy()

int has_heap_copy ( )
inline
186 { return (flags & (GC_IN_HEAP | GC_MIGRATED_TO_HEAP | GC_STATIC)); }
@ GC_MIGRATED_TO_HEAP
Definition: collectable.h:46
@ GC_STATIC
Definition: collectable.h:44
@ GC_IN_HEAP
Definition: collectable.h:42

◆ is_in_heap()

int is_in_heap ( )
inline
187 { return (flags & GC_IN_HEAP); }

◆ is_on_stack()

int is_on_stack ( )
inline
188 { return (flags & GC_ON_STACK); }
@ GC_ON_STACK
Definition: collectable.h:45

◆ get_num_values_created()

static ScripterExport ULONGLONG get_num_values_created ( )
static

◆ validate_value_linkages()

static ScripterExport bool validate_value_linkages ( )
static

Friends And Related Function Documentation

◆ Value

friend class Value
friend

Member Data Documentation

◆ next

Collectable* next

◆ prev

Collectable* prev

◆ heap_update

CRITICAL_SECTION heap_update
static

◆ flags

byte flags

◆ flags2

byte flags2

◆ flags3

short flags3

◆ collectable_list

Collectable* collectable_list
static

◆ permanent_list

Collectable* permanent_list
static

◆ free_list

free_mem* free_list[GC_NUM_SUBLISTS]
static

◆ heap_allocated

size_t heap_allocated
static

◆ heap_size

size_t heap_size
static

◆ state

◆ fullCollectNextHoldFlush

ScripterExport bool fullCollectNextHoldFlush
static

◆ gc_light

bool gc_light
static

◆ in_gc

bool in_gc
static

◆ hGCCompletedEvent

HANDLE hGCCompletedEvent
static