3ds Max C++ API Reference
Loading...
Searching...
No Matches
MAXScript_TLS.h File Reference

Classes

struct  MAXScript_TLS

Namespaces

namespace  MAXScript

Macros

#define def_thread_local(type, lcl, init_on_reset, init_val)
#define thread_local(x)
#define MAXScript_time()
#define MAXScript_time_tls()

Typedefs

using TimeValue = int

Functions

void needs_redraw_set (MAXScript_TLS *tls=nullptr)
void needs_complete_redraw_set (MAXScript_TLS *tls=nullptr)
void needs_redraw_clear (MAXScript_TLS *tls=nullptr)
void alloc_thread_locals ()
ScripterExport void init_thread_locals ()
void free_thread_locals ()
void copy_thread_locals (MAXScript_TLS *source, MAXScript_TLS *target)

Variables

ScripterExport int thread_locals_index
int thread_id_index
MAXScript_TLSMAXScript_TLS_list

Macro Definition Documentation

◆ def_thread_local

#define def_thread_local ( type,
lcl,
init_on_reset,
init_val )
Value:
type lcl

◆ thread_local

#define thread_local ( x)
Value:
(((MAXScript_TLS*)TlsGetValue(thread_locals_index))->x)
ScripterExport int thread_locals_index
controller mat max min numsubs x z controller keys x z controller keys x
Definition generics.inl:212
Definition MAXScript_TLS.h:38

◆ MAXScript_time

#define MAXScript_time ( )
Value:
(thread_local(use_time_context) ? thread_local(current_time) : GetCOREInterface()->GetTime())
virtual TimeValue GetTime()=0
CoreExport Interface * GetCOREInterface()
81#define MAXScript_time() \
82 (thread_local(use_time_context) ? thread_local(current_time) : GetCOREInterface()->GetTime())

◆ MAXScript_time_tls

#define MAXScript_time_tls ( )
Value:
(_tls->use_time_context ? _tls->current_time : GetCOREInterface()->GetTime())
86#define MAXScript_time_tls() \
87 (_tls->use_time_context ? _tls->current_time : GetCOREInterface()->GetTime())

Typedef Documentation

◆ TimeValue

using TimeValue = int

Function Documentation

◆ needs_redraw_set()

void needs_redraw_set ( MAXScript_TLS * tls = nullptr)
inline
60{
61 if (tls == nullptr)
62 tls = (MAXScript_TLS*)TlsGetValue(thread_locals_index);
63 if (tls->redraw_mode && tls->needs_redraw == 0)
64 tls->needs_redraw = 1;
65}

◆ needs_complete_redraw_set()

void needs_complete_redraw_set ( MAXScript_TLS * tls = nullptr)
inline
67{
68 if (tls == nullptr)
69 tls = (MAXScript_TLS*)TlsGetValue(thread_locals_index);
70 if (tls->redraw_mode)
71 tls->needs_redraw = 2;
72}

◆ needs_redraw_clear()

void needs_redraw_clear ( MAXScript_TLS * tls = nullptr)
inline
75{
76 if (tls == nullptr)
77 tls = (MAXScript_TLS*)TlsGetValue(thread_locals_index);
78 tls->needs_redraw = 0;
79}

◆ alloc_thread_locals()

void alloc_thread_locals ( )

◆ init_thread_locals()

ScripterExport void init_thread_locals ( )

◆ free_thread_locals()

void free_thread_locals ( )

◆ copy_thread_locals()

void copy_thread_locals ( MAXScript_TLS * source,
MAXScript_TLS * target )

Variable Documentation

◆ thread_locals_index

ScripterExport int thread_locals_index
extern

◆ thread_id_index

int thread_id_index
extern

◆ MAXScript_TLS_list

MAXScript_TLS* MAXScript_TLS_list
extern