20 #include <QStringList>
75 qDebug() <<
"class : OOPD" << (long)
this << (
long)canvas;
76 _classByCanvas[canvas] = opClass;
77 _classBySymbol[symbol] = opClass;
78 _classByName[className] = opClass;
83 qDebug() <<
"inst : OOPD" << (long)
this << (
long)canvas;
84 _instanceByCanvas[canvas] = opInstance;
85 _instanceBySymbol[symbol] = opInstance;
87 _existingInstances.insert(opInstance);
95 _instanceByCanvas[canvas] = 0;
96 _instanceBySymbol[symbol] = 0;
104 if (_classByCanvas[canvas])
105 return _classByCanvas[canvas];
112 if (_classBySymbol[symbol])
113 return _classBySymbol[symbol];
120 if (_classByName[className])
121 return _classByName[className];
128 if (_instanceByCanvas[canvas])
129 return _instanceByCanvas[canvas];
136 if (_instanceBySymbol[symbol])
137 return _instanceBySymbol[symbol];
144 return (_existingInstances.find(inst) != _existingInstances.end());
149 return !(classByCanvas(canvas) || instanceByCanvas(canvas));
OPClass * classBySymbol(t_symbol *symbol)
Definition: OOPD.h:110
void unregisterInstance(OPInstance *opInstance, string className, t_canvas *canvas, t_symbol *symbol)
Definition: OOPD.h:93
void unregisterClass(OPClass *opClass, string className, t_canvas *canvas, t_symbol *symbol)
Definition: OOPD.h:90
OPInstance * instanceByCanvas(t_canvas *canvas)
Definition: OOPD.h:126
map< t_symbol *, OPInstance * > t_OPInstanceBySymbol
Definition: OOPD.h:38
#define t_canvas
Definition: m_pd.h:205
set< OPInstance * > t_existingInstances
Definition: OOPD.h:40
OPClass * classByCanvas(t_canvas *canvas)
Definition: OOPD.h:102
void registerInstance(OPInstance *opInstance, string className, t_canvas *canvas, t_symbol *symbol)
Definition: OOPD.h:81
stores global information about OOPD classes / instances
Definition: OOPD.h:51
bool canvasIsPatch(t_canvas *canvas)
Definition: OOPD.h:147
bool instanceExists(OPInstance *inst)
Definition: OOPD.h:142
map< string, OPClass * > t_OPClassByName
Definition: OOPD.h:36
map< t_symbol *, OPClass * > t_OPClassBySymbol
Definition: OOPD.h:35
static OOPD * inst()
Definition: OOPD.h:63
OOPD * instance
Definition: OOPD.cpp:20
OOPD class structure.
Definition: OPClass.h:38
Definition: oop_common.h:81
The OOPD class instance.
Definition: OPInstance.h:44
void registerClass(OPClass *opClass, string className, t_canvas *canvas, t_symbol *symbol)
Definition: OOPD.h:73
map< t_canvas *, OPInstance * > t_OPInstanceByCanvas
Definition: OOPD.h:37
vector< t_object * > OPProperties
vector of property boxes
Definition: oop_common.h:72
OPClass * classByName(string className)
Definition: OOPD.h:118
map< t_canvas *, OPClass * > t_OPClassByCanvas
Definition: OOPD.h:31
OPInstance * instanceBySymbol(t_symbol *symbol)
Definition: OOPD.h:134