3ds Max C++ API Reference
define_abstract_functions.h File Reference

Macros

#define def_generic(fn, name)    virtual Value* fn##_vf(Value** arglist, int arg_count) { ABSTRACT_FUNCTION(_M(#name), this, Value*); }
 
#define def_visible_generic(fn, name)   def_generic(fn, name)
 
#define def_struct_generic(fn, name)   def_generic(fn, name)
 
#define def_node_generic(fn, name)   def_generic(fn, name)
 
#define def_mapped_generic(fn, name)   def_generic(fn, name)
 
#define use_generic(fn, name)
 
#define def_generic_debug_ok(fn, name)   def_generic(fn, name)
 
#define def_visible_generic_debug_ok(fn, name)   def_generic(fn, name)
 
#define def_struct_generic_debug_ok(fn, name)   def_generic(fn, name)
 
#define def_node_generic_debug_ok(fn, name)   def_generic(fn, name)
 
#define def_mapped_generic_debug_ok(fn, name)   def_generic(fn, name)
 
#define def_primitive(fn, name)
 
#define def_visible_primitive(fn, name)
 
#define def_mapped_primitive(fn, name)
 
#define def_lazy_primitive(fn, name)
 
#define def_visible_lazy_primitive(fn, name)
 
#define def_struct_primitive(fn, _struct, name)
 
#define def_primitive_debug_ok(fn, name)
 
#define def_visible_primitive_debug_ok(fn, name)
 
#define def_mapped_primitive_debug_ok(fn, name)
 
#define def_lazy_primitive_debug_ok(fn, name)
 
#define def_visible_lazy_primitive_debug_ok(fn, name)
 
#define def_struct_primitive_debug_ok(fn, _struct, name)
 
#define def_property(p)
 
#define def_property_alias(p, real_p)
 
#define def_2_prop_path(p1, p2)
 
#define def_2_prop_path_alias(p1, p2, real_p1, real_p2)
 
#define def_nested_prop(p1)
 
#define def_nested_prop_alias(p1, real_p1)
 
#define ABSTRACT_FUNCTION(m, v, t)   throw NoMethodError (m, v); return (t)0
 
#define ABSTRACT_CONVERTER(t, l)   throw ConversionError (this, _M(#l)); return (t)0
 
#define ABSTRACT_WIDENER(a)   throw IncompatibleTypes (this, a); return (Value*)&undefined
 
#define ABSTRACT_GETTER()   throw AccessorError (this, arg_list[0]); return (Value*)&undefined
 
#define ABSTRACT_SETTER()   throw AccessorError (this, arg_list[1]); return (Value*)&undefined
 

Macro Definition Documentation

◆ def_generic

#define def_generic (   fn,
  name 
)     virtual Value* fn##_vf(Value** arglist, int arg_count) { ABSTRACT_FUNCTION(_M(#name), this, Value*); }

◆ def_visible_generic

#define def_visible_generic (   fn,
  name 
)    def_generic(fn, name)

◆ def_struct_generic

#define def_struct_generic (   fn,
  name 
)    def_generic(fn, name)

◆ def_node_generic

#define def_node_generic (   fn,
  name 
)    def_generic(fn, name)

◆ def_mapped_generic

#define def_mapped_generic (   fn,
  name 
)    def_generic(fn, name)

◆ use_generic

#define use_generic (   fn,
  name 
)

◆ def_generic_debug_ok

#define def_generic_debug_ok (   fn,
  name 
)    def_generic(fn, name)

◆ def_visible_generic_debug_ok

#define def_visible_generic_debug_ok (   fn,
  name 
)    def_generic(fn, name)

◆ def_struct_generic_debug_ok

#define def_struct_generic_debug_ok (   fn,
  name 
)    def_generic(fn, name)

◆ def_node_generic_debug_ok

#define def_node_generic_debug_ok (   fn,
  name 
)    def_generic(fn, name)

◆ def_mapped_generic_debug_ok

#define def_mapped_generic_debug_ok (   fn,
  name 
)    def_generic(fn, name)

◆ def_primitive

#define def_primitive (   fn,
  name 
)

◆ def_visible_primitive

#define def_visible_primitive (   fn,
  name 
)

◆ def_mapped_primitive

#define def_mapped_primitive (   fn,
  name 
)

◆ def_lazy_primitive

#define def_lazy_primitive (   fn,
  name 
)

◆ def_visible_lazy_primitive

#define def_visible_lazy_primitive (   fn,
  name 
)

◆ def_struct_primitive

#define def_struct_primitive (   fn,
  _struct,
  name 
)

◆ def_primitive_debug_ok

#define def_primitive_debug_ok (   fn,
  name 
)

◆ def_visible_primitive_debug_ok

#define def_visible_primitive_debug_ok (   fn,
  name 
)

◆ def_mapped_primitive_debug_ok

#define def_mapped_primitive_debug_ok (   fn,
  name 
)

◆ def_lazy_primitive_debug_ok

#define def_lazy_primitive_debug_ok (   fn,
  name 
)

◆ def_visible_lazy_primitive_debug_ok

#define def_visible_lazy_primitive_debug_ok (   fn,
  name 
)

◆ def_struct_primitive_debug_ok

#define def_struct_primitive_debug_ok (   fn,
  _struct,
  name 
)

◆ def_property

#define def_property (   p)
Value:
virtual Value* get_##p(Value** arg_list, int count) { return get_property(arg_list, count); } \
virtual Value* set_##p(Value** arg_list, int count) { return set_property(arg_list, count); }
Definition: value.h:107

◆ def_property_alias

#define def_property_alias (   p,
  real_p 
)

◆ def_2_prop_path

#define def_2_prop_path (   p1,
  p2 
)
Value:
virtual Value* get_##p1##_##p2(Value** arg_list, int count) \
{ \
two_value_locals(cont, result); \
Value* csn = _get_key_arg_or_default(arg_list, count, n_propCaseSensitiveName, nullptr); \
Value* args[4] = { n_##p1, keyarg_marker_value, n_propCaseSensitiveName, csn}; \
vl.cont = get_##p1(args, csn ? 4 : 1); \
Value* nested_csn = _get_key_arg_or_default(arg_list, count, n_nestedPropCaseSensitiveName, nullptr); \
Value* args2[4] = { n_##p2, keyarg_marker_value, n_propCaseSensitiveName, nested_csn}; \
vl.result = vl.cont->get_##p2(args2, nested_csn ? 4 : 1); \
return_value(vl.result); \
} \
virtual Value* set_##p1##_##p2(Value** arg_list, int count) \
{ \
one_value_local(cont); \
Value* csn = _get_key_arg_or_default(arg_list, count, n_propCaseSensitiveName, nullptr); \
Value* args[4] = { n_##p1, keyarg_marker_value, n_propCaseSensitiveName, csn}; \
vl.cont = get_##p1(args, csn ? 4 : 1); \
Value* nested_csn = _get_key_arg_or_default(arg_list, count, n_nestedPropCaseSensitiveName, nullptr); \
Value* args2[5] = { arg_list[0], n_##p2, keyarg_marker_value, n_propCaseSensitiveName, nested_csn}; \
vl.cont->set_##p2(args2, nested_csn ? 5 : 2); \
Value* args3[5] = { vl.cont, n_##p1, keyarg_marker_value, n_propCaseSensitiveName, csn}; \
set_##p1(args3, csn ? 5 : 2); \
return arg_list[0]; \
}
ScripterExport Value * _get_key_arg_or_default(Value **arg_list, int count, Value *key_name, Value *def)

◆ def_2_prop_path_alias

#define def_2_prop_path_alias (   p1,
  p2,
  real_p1,
  real_p2 
)

◆ def_nested_prop

#define def_nested_prop (   p1)
Value:
virtual Value* get_nested_##p1(Value** arg_list, int count) \
{ \
two_value_locals(cont, result); \
Value* csn = _get_key_arg_or_default(arg_list, count, n_propCaseSensitiveName, nullptr); \
vl.cont = _get_property(arg_list[0], csn); \
Value* csn2 = _get_key_arg_or_default(arg_list, count, n_nestedPropCaseSensitiveName, nullptr); \
Value* args[4] = { n_##p1, keyarg_marker_value, n_propCaseSensitiveName, csn2}; \
vl.result = vl.cont->get_##p1(args, csn2 ? 4 : 1); \
return_value(vl.result); \
} \
virtual Value* set_nested_##p1(Value** arg_list, int count) \
{ \
one_value_local(cont); \
Value* csn = _get_key_arg_or_default(arg_list, count, n_propCaseSensitiveName, nullptr); \
vl.cont = _get_property(arg_list[1], csn); \
Value* csn2 = _get_key_arg_or_default(arg_list, count, n_nestedPropCaseSensitiveName, nullptr); \
Value* args[5] = { arg_list[0], n_##p1, keyarg_marker_value, n_propCaseSensitiveName, csn2 }; \
vl.cont->set_##p1(args, csn2 ? 5 : 2); \
_set_property(arg_list[1], vl.cont, csn); \
return arg_list[0]; \
}

◆ def_nested_prop_alias

#define def_nested_prop_alias (   p1,
  real_p1 
)

◆ ABSTRACT_FUNCTION

#define ABSTRACT_FUNCTION (   m,
  v,
 
)    throw NoMethodError (m, v); return (t)0

◆ ABSTRACT_CONVERTER

#define ABSTRACT_CONVERTER (   t,
 
)    throw ConversionError (this, _M(#l)); return (t)0

◆ ABSTRACT_WIDENER

#define ABSTRACT_WIDENER (   a)    throw IncompatibleTypes (this, a); return (Value*)&undefined

◆ ABSTRACT_GETTER

#define ABSTRACT_GETTER ( )    throw AccessorError (this, arg_list[0]); return (Value*)&undefined

◆ ABSTRACT_SETTER

#define ABSTRACT_SETTER ( )    throw AccessorError (this, arg_list[1]); return (Value*)&undefined