19 #include <QStringList>
46 map<t_symbol*, OPOutputs> _methodOutputs;
49 map<t_symbol*, OPOutputs> _getterOutputs;
50 map<t_symbol*, OPOutputs> _setterOutputs;
53 map<t_symbol*, PdArguments> _propertyValues;
58 map<t_symbol*, t_sample*> _signalBuffers;
61 map<t_symbol*, t_outlet*> _methodPointerOutputs;
75 _methodOutputs[methodName].addOutlet(outlet);
80 _methodOutputs.erase(methodName);
85 _methodPointerOutputs[methodName] = outlet;
90 _methodPointerOutputs.erase(methodName);
97 t_sample* ret = _signalBuffers[signalName];
101 _signalBuffers[signalName] = ret;
102 post(
"new buffer: %s %i\n", signalName->
s_name, vec_size);
112 delete (_signalBuffers[signalName]);
113 _signalBuffers.erase(signalName);
116 #pragma mark properties
120 _getterOutputs[propertyName].addOutlet(getter_out);
121 _setterOutputs[propertyName].addOutlet(setter_out);
123 OOPDClassBase::addProperty(propertyName->
s_name,
"");
127 _getterOutputs.erase(propertyName);
128 _setterOutputs.erase(propertyName);
130 OOPDClassBase::freeProperty(propertyName->
s_name);
135 _propertyValues[propertyName] = list;
140 PdArguments list = _propertyValues[propertyName];
171 #pragma mark method calls
304 #pragma mark object pointer
318 #pragma mark reference counting
323 printf(
"OPInstance ref count: %i\n", _refCount);
330 printf(
"OPInstance ref count: %i\n", _refCount);
void freeMethodPointerOutlet(t_symbol *methodName)
Definition: OPInstance.h:88
t_sample * getBufferFor(t_symbol *signalName, int vec_size)
Definition: OPInstance.h:95
void freeSignal(t_symbol *signalName)
Definition: OPInstance.h:108
int getRefCount()
Definition: OPInstance.h:336
void freeProperty(t_symbol *propertyName)
Definition: OPInstance.h:125
void callSetter(string propertyName, PdArguments list)
Definition: OPInstance.h:225
void callGetter(string propertyName)
Definition: OPInstance.h:271
t_symbol * getObjectSymbol()
Definition: OPInstance.h:311
PdArguments getPdArgumentsProperty(t_symbol *propertyName)
Definition: OPInstance.h:138
stores pointers to t_outlets of pd objects
Definition: OOPDClassBase.h:36
void freeMethod(t_symbol *methodName)
Definition: OPInstance.h:78
void addProperty(t_symbol *propertyName, t_outlet *getter_out, t_outlet *setter_out)
Definition: OPInstance.h:118
void retain()
Definition: OPInstance.h:320
string to_string(const T &t)
Definition: oop_common.h:32
PD_FLOATTYPE t_sample
Definition: m_pd.h:574
EXTERN t_symbol * gensym(const char *s)
void setPdArgumentsProperty(t_symbol *propertyName, PdArguments list)
Definition: OPInstance.h:133
void release()
Definition: OPInstance.h:327
static t_symbol * toSymbol(OPInstance *inst)
Definition: OPInstance.h:306
void addMethodOutlet(t_symbol *methodName, t_outlet *outlet)
Definition: OPInstance.h:73
#define t_outlet
Definition: m_pd.h:189
void callMethod(PdArguments list)
Definition: OPInstance.h:173
base data structure for class and instance: name, canvas, symbol
Definition: OOPDClassBase.h:77
OPInstance * _parent
Definition: OPInstance.h:67
OOPD class structure.
Definition: OPClass.h:38
Definition: oop_common.h:81
EXTERN void post(const char *fmt,...)
void callGetter(PdArguments list)
Definition: OPInstance.h:246
char * s_name
Definition: m_pd.h:112
The OOPD class instance.
Definition: OPInstance.h:44
void addMethodPointerOutlet(t_symbol *methodName, t_outlet *outlet)
Definition: OPInstance.h:83
vector< t_object * > OPProperties
vector of property boxes
Definition: oop_common.h:72
void callSetter(PdArguments list)
Definition: OPInstance.h:202