3 #ifndef VISR_MAXMSP_MAXSUPPORT_CLASS_REGISTRAR_HPP_INCLUDED 4 #define VISR_MAXMSP_MAXSUPPORT_CLASS_REGISTRAR_HPP_INCLUDED 30 template<
class ExternalType>
36 static void *
newObject( t_symbol *s,
short argc, t_atom *argv );
48 static t_class *& staticClassInstance( )
50 static t_class * sInstance = 0;
55 template<
class ExternalType>
58 staticClassInstance() = class_new( externalName,
63 class_addmethod( staticClassInstance(),
65 class_addmethod( staticClassInstance(),
67 class_addmethod( staticClassInstance(),
69 "float", A_FLOAT, 0 );
71 class_dspinit( staticClassInstance() );
72 class_register( CLASS_BOX, staticClassInstance() );
73 post(
"ClassRegistrar: Finished registration of external." );
76 template<
class ExternalType>
79 post(
"ClassRegistrar<ExternalType>::newObject() called." );
80 t_class * classInstance = staticClassInstance();
85 post(
"Creation of new object failed." );
88 newPlainObj->mObject =
new ExternalType( newPlainObj->mMaxProxy, argc, argv );
95 #endif // VISR_MAXMSP_MAXSUPPORT_CLASS_REGISTRAR_HPP_INCLUDED Definition: class_registrar.hpp:31
ClassRegistrar(char const *externalName)
Definition: class_registrar.hpp:56
Definition: options.cpp:10
static void * newObject(t_symbol *s, short argc, t_atom *argv)
Definition: class_registrar.hpp:77
Definition: external_wrapper.hpp:36