3ds Max C++ API Reference
Loading...
Searching...
No Matches
Collectable Class Referenceabstract

#include <C:/adskgit/3dsmax/3dsmax/3dswin/src/maxsdk/include/maxscript/kernel/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=nullptr, ValueMetaClass *c=nullptr)
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()

ScripterExport void for_all_values ( void(* map_fn )(Value *val),
ValueMapper * mapper = nullptr,
ValueMetaClass * c = nullptr )
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()

void mark ( )
static

◆ sweep()

void sweep ( )
static

◆ setup()

void setup ( size_t )
static

◆ gc()

ScripterExport void gc ( )
static

◆ coalesce_free_list()

void coalesce_free_list ( )
static

◆ collect()

virtual void collect ( )
pure virtual

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

◆ gc_trace()

◆ close_down()

void close_down ( )
static

◆ drop_maxwrapper_refs()

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()

ScripterExport void push_alloc_stack_frame ( )
static

◆ pop_alloc_stack_frame()

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:83

◆ 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()

ScripterExport ULONGLONG get_num_values_created ( )
static

◆ validate_value_linkages()

ScripterExport bool validate_value_linkages ( )
static

◆ 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