OpenWareLaboratory
PatchParameter.cpp
Go to the documentation of this file.
1 #include "PatchParameter.h"
2 #include "PatchProcessor.h"
3 #include "SmoothValue.h"
4 #include "message.h"
5 
6 PatchProcessor* getInitialisingPatchProcessor();
7 
8 #define PATCH_PARAMETER_NO_PID -1
9 
10 template<typename T>
12 
13 // copy ctors: superceded by assignment operators
14 /* PatchParameter(PatchParameter<T>& other); */
15 /* PatchParameter(const PatchParameter<T>& other); */
16 
17 // template<typename T>
18 // PatchParameter<T>::PatchParameter(PatchParameter<T>& other) :
19 // pid(other.pid), value(other.value) {
20 // // copy ctor
21 // // register for update callback in copy constructor
22 // if(pid != PATCH_PARAMETER_NO_PID)
23 // getInitialisingPatchProcessor()->setPatchParameter(pid, this);
24 // }
25 
26 // template<typename T>
27 // PatchParameter<T>::PatchParameter(const PatchParameter<T>& other) :
28 // pid(other.pid), value(other.value) {
29 // // copy ctor
30 // // register for update callback in copy constructor
31 // if(pid != PATCH_PARAMETER_NO_PID)
32 // getInitialisingPatchProcessor()->setPatchParameter(pid, this);
33 // }
34 
35 template<typename T>
37  pid = other.pid;
38  value = other.value;
39  if(pid != PATCH_PARAMETER_NO_PID)
40  getInitialisingPatchProcessor()->setPatchParameter(pid, this);
41  return *this;
42 }
43 
44 template class PatchParameter<int>;
45 template class PatchParameter<float>;
PatchParameter< T > & operator=(const PatchParameter< T > &other)
#define PATCH_PARAMETER_NO_PID
PatchProcessor * getInitialisingPatchProcessor()