local_abstract_generic_functions.h

Go to the documentation of this file.
00001 /*  
00002  *  local_abstract_generic_functions.h - abstract generic function definitions for MAXScript SDK plug-ins
00003  */
00004 
00005 #include "ClassCfg.h"
00006 
00007 #ifdef def_local_generic
00008 #   undef def_local_generic
00009 #   undef def_local_generic_debug_ok
00010 #   undef use_local_generic
00011 #endif
00012 #ifdef use_generic
00013 #   undef use_generic
00014 #endif
00015 
00016 #define def_local_generic(fn, name) \
00017     virtual Value* fn##_vf(Value** arglist, int arg_count) { ABSTRACT_FUNCTION(_M(#name), this, Value*); }
00018 #define def_local_generic_debug_ok(fn, name)    \
00019     virtual Value* fn##_vf(Value** arglist, int arg_count) { ABSTRACT_FUNCTION(_M(#name), this, Value*); }
00020 #define use_generic(fn, name)
00021 #define use_local_generic(fn, name)
00022 
00023 /* abstract function 'bodies'... if these are called, we have a 'type doesnt implement' error  */
00024 
00025 #ifndef ABSTRACT_FUNCTION
00026 #   define ABSTRACT_FUNCTION(m, v, t) throw NoMethodError (m, v); return (t)0         
00027 #   define ABSTRACT_CONVERTER(t, l) throw ConversionError (this, _M(#l)); return (t)0
00028 #   define ABSTRACT_WIDENER(a) throw IncompatibleTypes (this, a); return (Value*)&undefined
00029 #endif
00030