maxscript/macros/value_locals.h File Reference

Classes

class  MXS_Exit_ValueLocal_Scope
 Class that uses the RAII idiom to push/pop the thread local current_locals_frame. More...
 
class  ScopedValueTempArray
 Class that uses the RAII idiom to allocate and deallocate value temp arrays. More...
 
class  ScopedSaveCurrentFrames
 Class that uses the RAII idiom to save and restore the current frame data. More...
 
class  ScopedMaxScriptSEHandler
 Class that uses the RAII idiom to push/pop setting a structured error handler. More...
 
class  ScopedMaxScriptEvaluationContext
 Class that uses the RAII idiom to create a maxscript visible stack frame. More...
 
class  ScopedPushControl
 Class that uses the RAII idiom to push/pop the thread local current_controller. More...
 

Macros

#define one_value_local(n1)
 
#define one_value_local_noFrameValidate(n1)
 
#define one_typed_value_local(n1)
 
#define one_typed_value_local_noFrameValidate(n1)
 
#define two_value_locals(n1, n2)
 
#define two_typed_value_locals(n1, n2)
 
#define three_value_locals(n1, n2, n3)
 
#define three_typed_value_locals(n1, n2, n3)
 
#define four_value_locals(n1, n2, n3, n4)
 
#define four_typed_value_locals(n1, n2, n3, n4)
 
#define five_value_locals(n1, n2, n3, n4, n5)
 
#define five_typed_value_locals(n1, n2, n3, n4, n5)
 
#define six_value_locals(n1, n2, n3, n4, n5, n6)
 
#define six_typed_value_locals(n1, n2, n3, n4, n5, n6)
 
#define seven_value_locals(n1, n2, n3, n4, n5, n6, n7)
 
#define seven_typed_value_locals(n1, n2, n3, n4, n5, n6, n7)
 
#define eight_value_locals(n1, n2, n3, n4, n5, n6, n7, n8)
 
#define eight_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8)
 
#define nine_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9)
 
#define nine_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9)
 
#define ten_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10)
 
#define ten_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10)
 
#define eleven_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11)
 
#define eleven_typed_value_locals(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11)
 
#define value_local_array(var, count)
 
#define one_value_local_tls(n1)
 
#define one_value_local_noFrameValidate_tls(n1)
 
#define one_typed_value_local_tls(n1)
 
#define one_typed_value_local_noFrameValidate_tls(n1)
 
#define two_value_locals_tls(n1, n2)
 
#define two_typed_value_locals_tls(n1, n2)
 
#define three_value_locals_tls(n1, n2, n3)
 
#define three_typed_value_locals_tls(n1, n2, n3)
 
#define four_value_locals_tls(n1, n2, n3, n4)
 
#define four_typed_value_locals_tls(n1, n2, n3, n4)
 
#define five_value_locals_tls(n1, n2, n3, n4, n5)
 
#define five_typed_value_locals_tls(n1, n2, n3, n4, n5)
 
#define six_value_locals_tls(n1, n2, n3, n4, n5, n6)
 
#define six_typed_value_locals_tls(n1, n2, n3, n4, n5, n6)
 
#define seven_value_locals_tls(n1, n2, n3, n4, n5, n6, n7)
 
#define seven_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7)
 
#define eight_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8)
 
#define eight_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8)
 
#define nine_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9)
 
#define nine_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9)
 
#define ten_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10)
 
#define ten_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10)
 
#define eleven_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11)
 
#define eleven_typed_value_locals_tls(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11)
 
#define value_local_array_tls(var, count)
 
#define return_value(r)   return templated_return_value_fn(r)
 
#define return_value_tls(r)   return templated_return_value_fn_tls(r, _tls)
 
#define save_current_source()
 
#define restore_current_source()
 
#define save_current_source_no_pos()
 
#define restore_current_source_no_pos()
 
#define save_current_source_pos()
 
#define restore_current_source_pos()
 
#define save_current_source_to_frame()
 
#define save_current_source_to_frame_no_pos()
 
#define save_current_source_to_frame_pos()
 
#define save_current_source_to_frame_no_file()
 
#define save_current_source_tls()
 
#define restore_current_source_tls()
 
#define save_current_source_no_pos_tls()
 
#define restore_current_source_no_pos_tls()
 
#define save_current_source_pos_tls()
 
#define restore_current_source_pos_tls()
 
#define save_current_source_to_frame_tls()
 
#define save_current_source_to_frame_no_pos_tls()
 
#define save_current_source_to_frame_pos_tls()
 
#define save_current_source_to_frame_no_file_tls()
 

Functions

template<typename Type >
Type templated_return_value_fn (Type r)
 
template<typename Type >
Type templated_return_value_fn_tls (Type r, MAXScript_TLS *_tls)
 
ScripterExport void save_error_source_data (MAXScript_TLS *tls=nullptr)
 
ScripterExport void clear_error_source_data (MAXScript_TLS *tls=nullptr)
 

Macro Definition Documentation

#define one_value_local (   n1)
Value:
struct { int count; Value** link; Value* n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define one_value_local_noFrameValidate (   n1)
Value:
struct { int count; Value** link; Value* n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(false);
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define one_typed_value_local (   n1)
Value:
struct { int count; Value** link; n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define one_typed_value_local_noFrameValidate (   n1)
Value:
struct { int count; Value** link; n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(false);
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define two_value_locals (   n1,
  n2 
)
Value:
struct { int count; Value** link; Value *n1, *n2; } vl = \
{ 2, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define two_typed_value_locals (   n1,
  n2 
)
Value:
struct { int count; Value** link; n1; n2; } vl = \
{ 2, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define three_value_locals (   n1,
  n2,
  n3 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3; } vl = \
{ 3, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define three_typed_value_locals (   n1,
  n2,
  n3 
)
Value:
struct { int count; Value** link; n1; n2; n3; } vl = \
{ 3, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define four_value_locals (   n1,
  n2,
  n3,
  n4 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4; } vl = \
{ 4, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define four_typed_value_locals (   n1,
  n2,
  n3,
  n4 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; } vl = \
{ 4, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define five_value_locals (   n1,
  n2,
  n3,
  n4,
  n5 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5; } vl = \
{ 5, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define five_typed_value_locals (   n1,
  n2,
  n3,
  n4,
  n5 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; } vl = \
{ 5, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define six_value_locals (   n1,
  n2,
  n3,
  n4,
  n5,
  n6 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6; } vl = \
{ 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define six_typed_value_locals (   n1,
  n2,
  n3,
  n4,
  n5,
  n6 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; } vl = \
{ 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define seven_value_locals (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7; } vl = \
{ 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define seven_typed_value_locals (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; } vl = \
{ 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define eight_value_locals (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8; } vl = \
{ 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define eight_typed_value_locals (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; } vl = \
{ 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define nine_value_locals (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8,
  n9 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9; } vl = \
{ 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define nine_typed_value_locals (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8,
  n9 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; } vl = \
{ 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define ten_value_locals (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8,
  n9,
  n10 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10; } vl = \
{ 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define ten_typed_value_locals (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8,
  n9,
  n10 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; } vl = \
{ 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define eleven_value_locals (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8,
  n9,
  n10,
  n11 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11; } vl = \
{ 11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define eleven_typed_value_locals (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8,
  n9,
  n10,
  n11 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; } vl = \
{ 11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = thread_local(current_locals_frame); \
thread_local(current_locals_frame) = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define value_local_array (   var,
  count 
)
Value:
{ \
var = &((Value**)_alloca(((count) + 2) * sizeof(Value*)))[2]; \
memset(var, 0, (count) * sizeof(Value*)); \
var[-2] = (Value*)(static_cast<INT_PTR>(count)); \
var[-1] = (Value*)thread_local(current_locals_frame); \
thread_local(current_locals_frame) = &var[-2]; } \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope_##var;
#define thread_local(x)
Definition: MAXScript_TLS.h:44
Definition: value.h:105
#define one_value_local_tls (   n1)
Value:
struct { int count; Value** link; Value* n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define one_value_local_noFrameValidate_tls (   n1)
Value:
struct { int count; Value** link; Value* n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(false, _tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define one_typed_value_local_tls (   n1)
Value:
struct { int count; Value** link; n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define one_typed_value_local_noFrameValidate_tls (   n1)
Value:
struct { int count; Value** link; n1; } vl = \
{ 1, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(false, _tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define two_value_locals_tls (   n1,
  n2 
)
Value:
struct { int count; Value** link; Value *n1, *n2; } vl = \
{ 2, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define two_typed_value_locals_tls (   n1,
  n2 
)
Value:
struct { int count; Value** link; n1; n2; } vl = \
{ 2, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define three_value_locals_tls (   n1,
  n2,
  n3 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3; } vl = \
{ 3, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define three_typed_value_locals_tls (   n1,
  n2,
  n3 
)
Value:
struct { int count; Value** link; n1; n2; n3; } vl = \
{ 3, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define four_value_locals_tls (   n1,
  n2,
  n3,
  n4 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4; } vl = \
{ 4, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define four_typed_value_locals_tls (   n1,
  n2,
  n3,
  n4 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; } vl = \
{ 4, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define five_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5; } vl = \
{ 5, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define five_typed_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; } vl = \
{ 5, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define six_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5,
  n6 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6; } vl = \
{ 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define six_typed_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5,
  n6 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; } vl = \
{ 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define seven_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7; } vl = \
{ 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define seven_typed_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; } vl = \
{ 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define eight_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8; } vl = \
{ 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define eight_typed_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; } vl = \
{ 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define nine_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8,
  n9 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9; } vl = \
{ 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define nine_typed_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8,
  n9 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; } vl = \
{ 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define ten_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8,
  n9,
  n10 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10; } vl = \
{ 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define ten_typed_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8,
  n9,
  n10 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; } vl = \
{ 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define eleven_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8,
  n9,
  n10,
  n11 
)
Value:
struct { int count; Value** link; Value *n1, *n2, *n3, *n4, *n5, *n6, *n7, *n8, *n9, *n10, *n11; } vl = \
{ 11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define eleven_typed_value_locals_tls (   n1,
  n2,
  n3,
  n4,
  n5,
  n6,
  n7,
  n8,
  n9,
  n10,
  n11 
)
Value:
struct { int count; Value** link; n1; n2; n3; n4; n5; n6; n7; n8; n9; n10; n11; } vl = \
{ 11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; \
vl.link = _tls->current_locals_frame; \
_tls->current_locals_frame = (Value**)&vl; \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope(_tls);
#define NULL
Definition: autoptr.h:18
Definition: value.h:105
#define value_local_array_tls (   var,
  count 
)
Value:
{ \
var = &((Value**)_alloca(((count) + 2) * sizeof(Value*)))[2]; \
memset(var, 0, (count) * sizeof(Value*)); \
var[-2] = (Value*)(static_cast<INT_PTR>(count)); \
var[-1] = (Value*)_tls->current_locals_frame; \
_tls->current_locals_frame = &var[-2]; } \
MXS_Exit_ValueLocal_Scope mxs_Exit_ValueLocal_Scope_##var(_tls);
Definition: value.h:105
#define return_value (   r)    return templated_return_value_fn(r)
#define return_value_tls (   r)    return templated_return_value_fn_tls(r, _tls)
#define save_current_source ( )
Value:
Value* _save_source = thread_local(source_file); \
MSZipPackage* _save_pkg = thread_local(current_pkg); \
unsigned int _save_pos = thread_local(source_pos); \
unsigned int _save_line = thread_local(source_line); \
DWORD _save_flags = thread_local(source_flags);
#define thread_local(x)
Definition: MAXScript_TLS.h:44
Definition: value.h:105
#define restore_current_source ( )
Value:
{ \
thread_local(source_file) = _save_source; \
thread_local(current_pkg) = _save_pkg; \
thread_local(source_pos) = _save_pos; \
thread_local(source_line) = _save_line; \
thread_local(source_flags) = _save_flags;}
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define save_current_source_no_pos ( )
Value:
Value* _save_source = thread_local(source_file); \
MSZipPackage* _save_pkg = thread_local(current_pkg); \
DWORD _save_flags = thread_local(source_flags);
#define thread_local(x)
Definition: MAXScript_TLS.h:44
Definition: value.h:105
#define restore_current_source_no_pos ( )
Value:
{ \
thread_local(source_file) = _save_source; \
thread_local(current_pkg) = _save_pkg; \
thread_local(source_flags) = _save_flags;}
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define save_current_source_pos ( )
Value:
unsigned int _save_pos = thread_local(source_pos); \
unsigned int _save_line = thread_local(source_line); \
DWORD _save_flags = thread_local(source_flags);
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define restore_current_source_pos ( )
Value:
{ \
thread_local(source_pos) = _save_pos; \
thread_local(source_line) = _save_line; \
thread_local(source_flags) = _save_flags;}
#define thread_local(x)
Definition: MAXScript_TLS.h:44
#define save_current_source_to_frame ( )
Value:
{ \
Value** _frame = thread_local(current_scan_frame); \
if (_frame) _frame[3] = thread_local(source_file); \
if (_frame) _frame[4] = (Value*)thread_local(source_pos); \
if (_frame) _frame[8] = (Value*)thread_local(source_line); \
if (_frame) _frame[7] = (Value*)static_cast<DWORD_PTR>(thread_local(source_flags));}
#define thread_local(x)
Definition: MAXScript_TLS.h:44
Definition: value.h:105
#define save_current_source_to_frame_no_pos ( )
Value:
{ \
Value** _frame = thread_local(current_scan_frame); \
if (_frame) _frame[3] = thread_local(source_file); \
if (_frame) _frame[7] = (Value*)static_cast<DWORD_PTR>(thread_local(source_flags));}
#define thread_local(x)
Definition: MAXScript_TLS.h:44
Definition: value.h:105
#define save_current_source_to_frame_pos ( )
Value:
{ \
Value** _frame = thread_local(current_scan_frame); \
if (_frame) _frame[4] = (Value*)thread_local(source_pos); \
if (_frame) _frame[8] = (Value*)thread_local(source_line);}
#define thread_local(x)
Definition: MAXScript_TLS.h:44
Definition: value.h:105
#define save_current_source_to_frame_no_file ( )
Value:
{ \
Value** _frame = thread_local(current_scan_frame); \
if (_frame) _frame[4] = (Value*)thread_local(source_pos); \
if (_frame) _frame[8] = (Value*)thread_local(source_line);}
#define thread_local(x)
Definition: MAXScript_TLS.h:44
Definition: value.h:105
#define save_current_source_tls ( )
Value:
Value* _save_source = _tls->source_file; \
MSZipPackage* _save_pkg = _tls->current_pkg; \
unsigned int _save_pos = _tls->source_pos; \
unsigned int _save_line = _tls->source_line; \
DWORD _save_flags = _tls->source_flags;
Definition: value.h:105
#define restore_current_source_tls ( )
Value:
{ \
_tls->source_file = _save_source; \
_tls->current_pkg = _save_pkg; \
_tls->source_pos = _save_pos; \
_tls->source_line = _save_line; \
_tls->source_flags = _save_flags;}
#define save_current_source_no_pos_tls ( )
Value:
Value* _save_source = _tls->source_file; \
MSZipPackage* _save_pkg = _tls->current_pkg; \
DWORD _save_flags = _tls->source_flags;
Definition: value.h:105
#define restore_current_source_no_pos_tls ( )
Value:
{ \
_tls->source_file = _save_source; \
_tls->current_pkg = _save_pkg; \
_tls->source_flags = _save_flags;}
#define save_current_source_pos_tls ( )
Value:
unsigned int _save_pos = _tls->source_pos; \
unsigned int _save_line = _tls->source_line; \
DWORD _save_flags = _tls->source_flags;
#define restore_current_source_pos_tls ( )
Value:
{ \
_tls->source_pos = _save_pos; \
_tls->source_line = _save_line; \
_tls->source_flags = _save_flags;}
#define save_current_source_to_frame_tls ( )
Value:
{ \
Value** _frame = _tls->current_scan_frame; \
if (_frame) _frame[3] = _tls->source_file; \
if (_frame) _frame[4] = (Value*)_tls->source_pos; \
if (_frame) _frame[8] = (Value*)_tls->source_line; \
if (_frame) _frame[7] = (Value*)static_cast<DWORD_PTR>(_tls->source_flags);}
Definition: value.h:105
#define save_current_source_to_frame_no_pos_tls ( )
Value:
{ \
Value** _frame = _tls->current_scan_frame; \
if (_frame) _frame[3] = _tls->source_file; \
if (_frame) _frame[7] = (Value*)static_cast<DWORD_PTR>(_tls->source_flags);}
Definition: value.h:105
#define save_current_source_to_frame_pos_tls ( )
Value:
{ \
Value** _frame = _tls->current_scan_frame; \
if (_frame) _frame[4] = (Value*)_tls->source_pos; \
if (_frame) _frame[8] = (Value*)_tls->source_line;}
Definition: value.h:105
#define save_current_source_to_frame_no_file_tls ( )
Value:
{ \
Value** _frame = _tls->current_scan_frame; \
if (_frame) _frame[4] = (Value*)_tls->source_pos; \
if (_frame) _frame[8] = (Value*)_tls->source_line;}
Definition: value.h:105

Function Documentation

Type templated_return_value_fn ( Type  r)
Deprecated:
Deprecated as of 3ds Max 2017. value local storage handled by MXS_Exit_ValueLocal_Scope instances
395 {
396  thread_local(current_result) = r;
397  return r;
398 }
#define thread_local(x)
Definition: MAXScript_TLS.h:44
Type templated_return_value_fn_tls ( Type  r,
MAXScript_TLS _tls 
)
409 {
410  _tls->current_result = r;
411  return r;
412 }
ScripterExport void save_error_source_data ( MAXScript_TLS tls = nullptr)
Deprecated:
Deprecated as of 3ds Max 2017. Use ScopedPushControl instead.
ScripterExport void clear_error_source_data ( MAXScript_TLS tls = nullptr)