|
Csound and CsoundAC API 5.14
|
Template base class, or pseudo-virtual base class, for writing Csound opcodes in C++. More...
#include <OpcodeBase.hpp>
Public Member Functions | |
| int | audio (CSOUND *csound) |
| int | init (CSOUND *csound) |
| int | kontrol (CSOUND *csound) |
| void | log (CSOUND *csound, const char *format,...) |
| void | warn (CSOUND *csound, const char *format,...) |
Static Public Member Functions | |
| static int | audio_ (CSOUND *csound, void *opcode) |
| static int | init_ (CSOUND *csound, void *opcode) |
| static int | kontrol_ (CSOUND *csound, void *opcode) |
Data Fields | |
| OPDS | h |
Template base class, or pseudo-virtual base class, for writing Csound opcodes in C++.
Derive opcode implementation classes like this:
DerivedClass : public OpcodeBase<DerivedClass> { public: // All output fields must be declared first as MYFLT *: MYFLT *aret1; // All input fields must be declared next as MYFLT *: MYFLT *iarg1; MYFLT *karg2; MYFLT *aarg3; // All internal state variables must be declared after that: size_t state1; double state2; MYFLT state3; // Declare and implement only whichever of these are required: int init(); int kontrol(); int audio; int noteoff(); void deinit(); };
| int OpcodeBase< T >::audio | ( | CSOUND * | csound | ) | [inline] |
References NOTOK.
Referenced by OpcodeBase< T >::audio_().
| static int OpcodeBase< T >::audio_ | ( | CSOUND * | csound, |
| void * | opcode | ||
| ) | [inline, static] |
References OpcodeBase< T >::audio().
| int OpcodeBase< T >::init | ( | CSOUND * | csound | ) | [inline] |
References NOTOK.
Referenced by OpcodeBase< T >::init_().
| static int OpcodeBase< T >::init_ | ( | CSOUND * | csound, |
| void * | opcode | ||
| ) | [inline, static] |
References OpcodeBase< T >::init().
| int OpcodeBase< T >::kontrol | ( | CSOUND * | csound | ) | [inline] |
References NOTOK.
Referenced by OpcodeBase< T >::kontrol_().
| static int OpcodeBase< T >::kontrol_ | ( | CSOUND * | csound, |
| void * | opcode | ||
| ) | [inline, static] |
References OpcodeBase< T >::kontrol().
| void OpcodeBase< T >::log | ( | CSOUND * | csound, |
| const char * | format, | ||
| ... | |||
| ) | [inline] |
References CSOUND_::MessageV.
| void OpcodeBase< T >::warn | ( | CSOUND * | csound, |
| const char * | format, | ||
| ... | |||
| ) | [inline] |
References CSOUNDMSG_WARNING, CSOUND_::GetDebug, CSOUND_::GetMessageLevel, CSOUND_::MessageV, and WARNMSG.
| OPDS OpcodeBase< T >::h |
1.7.4