OpcodeBase< T > Class Template Reference

#include <OpcodeBase.hpp>

Collaboration diagram for OpcodeBase< T >:

Collaboration graph
[legend]

Detailed Description

template<typename T>
class OpcodeBase< T >

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: void init(); void kontrol(); void audio; void noteoff(); void deinit(); };

Public Member Functions

int init (CSOUND *csound)
int kontrol (CSOUND *csound)
int audio (CSOUND *csound)
int noteoff (CSOUND *csound)
void log (CSOUND *csound, const char *format,...)
void warn (CSOUND *csound, const char *format,...)

Static Public Member Functions

static int init_ (CSOUND *csound, void *opcode_)
static int kontrol_ (CSOUND *csound, void *opcode)
static int audio_ (CSOUND *csound, void *opcode)
static int noteoff_ (CSOUND *csound, void *opcode)

Data Fields

OPDS h


Member Function Documentation

template<typename T>
int OpcodeBase< T >::init ( CSOUND csound  )  [inline]

References NOTOK.

template<typename T>
static int OpcodeBase< T >::init_ ( CSOUND csound,
void *  opcode_ 
) [inline, static]

template<typename T>
int OpcodeBase< T >::kontrol ( CSOUND csound  )  [inline]

References NOTOK.

Referenced by OpcodeBase< T >::kontrol_().

template<typename T>
static int OpcodeBase< T >::kontrol_ ( CSOUND csound,
void *  opcode 
) [inline, static]

template<typename T>
int OpcodeBase< T >::audio ( CSOUND csound  )  [inline]

References NOTOK.

Referenced by OpcodeBase< T >::audio_().

template<typename T>
static int OpcodeBase< T >::audio_ ( CSOUND csound,
void *  opcode 
) [inline, static]

template<typename T>
int OpcodeBase< T >::noteoff ( CSOUND csound  )  [inline]

References OK.

Referenced by OpcodeBase< T >::noteoff_().

template<typename T>
static int OpcodeBase< T >::noteoff_ ( CSOUND csound,
void *  opcode 
) [inline, static]

template<typename T>
void OpcodeBase< T >::log ( CSOUND csound,
const char *  format,
  ... 
) [inline]

References CSOUND_::MessageV.

template<typename T>
void OpcodeBase< T >::warn ( CSOUND csound,
const char *  format,
  ... 
) [inline]


Field Documentation

template<typename T>
OPDS OpcodeBase< T >::h


Generated on Sun Nov 9 00:15:55 2008 for Csound and CsoundAC by  doxygen 1.5.6