maxscript/macros/local_class.h File Reference

local_class.h File Reference
#include "ClassCfg.h"

Macros

#define local_visible_class(_cls)
 
#define local_visible_class_s(_cls, _super)
 
#define local_applyable_class(_cls)
 
#define local_visible_class_instance(_cls, _name)   _cls##Class _cls##_class (_M(_name));
 
#define cat0(_a)   _a
 
#define cat1(_a)   cat0(_a)
 
#define cat2(_a, _b)   cat0(_a)##cat0(_b)
 
#define str0(_c)   #_c
 
#define str1(_c)   str0(_c)
 
#define MS_LOCAL_ROOT_CLASS_TAG   &CONCATENATE(MS_LOCAL_ROOT_CLASS, _class)
 
#define MS_LOCAL_GENERIC_CLASS_TAG   &CONCATENATE(MS_LOCAL_GENERIC_CLASS, _class)
 
#define MS_LOCAL_GENERIC_CLASS_CLASS   CONCATENATE(MS_LOCAL_GENERIC_CLASS, Class)
 
Concatenation Macros

For details on the token pasting operator and joining two strings together in the preprocessor see:

  • ISO/IEC 14882:2003(E) 16.3.3 The ## operator
  • ISO/IEC 9899:1999 (E) 6.10.3.3 The ## operator
#define CONCATENATE_HELPER(x, y)   x##y
 Helper macro used in concatenating two strings. More...
 
#define CONCATENATE(x, y)   CONCATENATE_HELPER(x,y)
 Joins two strings together in the preprocessor before the code is compiled. More...
 

Typedefs

typedef Value *(MS_LOCAL_ROOT_CLASS::* local_value_vf) (Value **, int)
 

Macro Definition Documentation

#define local_visible_class (   _cls)
Value:
class _cls##Class : public ValueMetaClass \
{ \
public: \
_cls##Class(const MCHAR* name) : ValueMetaClass (name) { } \
void collect() { delete this; } \
}; \
extern _cls##Class _cls##_class;
MAXMEM_EXTERN_C UtilExport void(__cdecl *MAX_free)(void *memblock)
Definition: value.h:290
#define MCHAR
MBCS/Unicode helper defines std::wofstream doesn't mix well with Unicode.
Definition: strbasic.h:42
virtual void collect()=0
#define local_visible_class_s (   _cls,
  _super 
)
#define local_applyable_class (   _cls)
Value:
class _cls##Class : public ValueMetaClass \
{ \
public: \
_cls##Class(const MCHAR* name) : ValueMetaClass (name) { } \
void collect() { delete this; } \
Value* apply(Value** arglist, int count, CallContext* cc = NULL); \
}; \
extern _cls##Class _cls##_class;
MAXMEM_EXTERN_C UtilExport void(__cdecl *MAX_free)(void *memblock)
Definition: value.h:290
#define NULL
Definition: autoptr.h:18
Definition: functions.h:55
#define MCHAR
MBCS/Unicode helper defines std::wofstream doesn't mix well with Unicode.
Definition: strbasic.h:42
Definition: value.h:106
virtual ScripterExport Value * apply(Value **arglist, int count, CallContext *cc=NULL)
virtual void collect()=0
#define local_visible_class_instance (   _cls,
  _name 
)    _cls##Class _cls##_class (_M(_name));
#define cat0 (   _a)    _a
#define cat1 (   _a)    cat0(_a)
#define cat2 (   _a,
  _b 
)    cat0(_a)##cat0(_b)
#define str0 (   _c)    #_c
#define str1 (   _c)    str0(_c)
#define CONCATENATE_HELPER (   x,
 
)    x##y

Helper macro used in concatenating two strings.

#define CONCATENATE (   x,
 
)    CONCATENATE_HELPER(x,y)

Joins two strings together in the preprocessor before the code is compiled.

#define MS_LOCAL_ROOT_CLASS_TAG   &CONCATENATE(MS_LOCAL_ROOT_CLASS, _class)
#define MS_LOCAL_GENERIC_CLASS_TAG   &CONCATENATE(MS_LOCAL_GENERIC_CLASS, _class)
#define MS_LOCAL_GENERIC_CLASS_CLASS   CONCATENATE(MS_LOCAL_GENERIC_CLASS, Class)

Typedef Documentation

typedef Value*(MS_LOCAL_ROOT_CLASS::* local_value_vf) (Value **, int)