3ds Max C++ API Reference
Loading...
Searching...
No Matches
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)
#define cat0(_a)
#define cat1(_a)
#define cat2(_a, _b)
#define str0(_c)
#define str1(_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)
#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)
#define CONCATENATE(x, y)
 Joins two strings together in the preprocessor before the code is compiled.

Typedefs

using local_value_vf = Value* (MS_LOCAL_ROOT_CLASS::*)(Value**, int)

Macro Definition Documentation

◆ local_visible_class

#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;
Definition value.h:433
const MCHAR * name
Definition value.h:437
#define MCHAR
MBCS/Unicode helper defines std::wofstream doesn't mix well with Unicode.
Definition strbasic.h:42
13#define local_visible_class(_cls) \
14 class _cls##Class : public ValueMetaClass \
15 { \
16 public: \
17 _cls##Class(const MCHAR* name) : ValueMetaClass (name) { } \
18 void collect() { delete this; } \
19 }; \
20 extern _cls##Class _cls##_class;

◆ local_visible_class_s

#define local_visible_class_s ( _cls,
_super )
22#define local_visible_class_s(_cls, _super) \
23 class _cls##Class; \
24 extern _cls##Class _cls##_class; \
25 class _cls##Class : public ValueMetaClass \
26 { \
27 public: \
28 _cls##Class(const MCHAR* name) : ValueMetaClass (name) { } \
29 void collect() { delete this; } \
30 Value* classOf_vf(Value** arg_list, int count) \
31 { \
32 UNUSED_PARAM(arg_list); \
33 CHECK_ARG_COUNT(classOf, 1, count + 1); \
34 return &_super##_class; \
35 } \
36 Value* superClassOf_vf(Value** arg_list, int count) \
37 { \
38 UNUSED_PARAM(arg_list); \
39 UNUSED_PARAM(count); \
40 return _super##_class.classOf_vf(NULL, 0); \
41 } \
42 Value* isKindOf_vf(Value** arg_list, int count) \
43 { \
44 CHECK_ARG_COUNT(isKindOf, 2, count + 1); \
45 Value* arg0 = arg_list[0]; \
46 return (arg0 == &_cls##_class || arg0 == &_super##_class) ? \
47 &true_value : \
48 _super##_class.isKindOf_vf(arg_list, count); \
49 } \
50 BOOL is_kind_of(ValueMetaClass* c) \
51 { \
52 return (c == &_cls##_class) ? 1 \
53 : _super##_class.is_kind_of(c); \
54 } \
55 };

◆ local_applyable_class

#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;
#define NULL
Definition autoptr.h:18
57#define local_applyable_class(_cls) \
58 class _cls##Class : public ValueMetaClass \
59 { \
60 public: \
61 _cls##Class(const MCHAR* name) : ValueMetaClass (name) { } \
62 void collect() { delete this; } \
63 Value* apply(Value** arglist, int count, CallContext* cc = NULL); \
64 }; \
65 extern _cls##Class _cls##_class;

◆ local_visible_class_instance

#define local_visible_class_instance ( _cls,
_name )
Value:
_cls##Class _cls##_class (_M(_name));
#define _M(x)
Used to wrap string literals.
Definition strbasic.h:67
67#define local_visible_class_instance(_cls, _name) \
68 _cls##Class _cls##_class (_M(_name));

◆ cat0

#define cat0 ( _a)
Value:
_a

◆ cat1

#define cat1 ( _a)
Value:
cat0(_a)
#define cat0(_a)
Definition local_class.h:73

◆ cat2

#define cat2 ( _a,
_b )
Value:
cat0(_a)##cat0(_b)

◆ str0

#define str0 ( _c)
Value:
#_c

◆ str1

#define str1 ( _c)
Value:
str0(_c)
#define str0(_c)
Definition local_class.h:76

◆ CONCATENATE_HELPER

#define CONCATENATE_HELPER ( x,
y )
Value:
x##y
controller mat max min numsubs x z controller keys x z controller keys x
Definition generics.inl:212

Helper macro used in concatenating two strings.

◆ CONCATENATE

#define CONCATENATE ( x,
y )
Value:
#define CONCATENATE_HELPER(x, y)
Definition local_class.h:86

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

◆ MS_LOCAL_ROOT_CLASS_TAG

#define MS_LOCAL_ROOT_CLASS_TAG   &CONCATENATE(MS_LOCAL_ROOT_CLASS, _class)

◆ MS_LOCAL_GENERIC_CLASS_TAG

#define MS_LOCAL_GENERIC_CLASS_TAG   &CONCATENATE(MS_LOCAL_GENERIC_CLASS, _class)

◆ MS_LOCAL_GENERIC_CLASS_CLASS

#define MS_LOCAL_GENERIC_CLASS_CLASS   CONCATENATE(MS_LOCAL_GENERIC_CLASS, Class)

◆ MS_LOCAL_GENERIC_CLASS_class

#define MS_LOCAL_GENERIC_CLASS_class   CONCATENATE(MS_LOCAL_GENERIC_CLASS, _class)

Typedef Documentation

◆ local_value_vf

using local_value_vf = Value* (MS_LOCAL_ROOT_CLASS::*)(Value**, int)