Jamba  3.0.2
pongasoft::VST::Message Class Reference

#include <Messaging.h>

Public Member Functions

template<typename T >
int32 getBinary (IAttributeList::AttrID id, T *iData, uint32 iSize) const
 
double getFloat (IAttributeList::AttrID id, double defaultValue) const
 
int64 getInt (IAttributeList::AttrID id, int64 defaultValue) const
 
MessageID getMessageID () const
 
template<typename T >
tresult getSerializableValue (IAttributeList::AttrID id, IParamSerializer< T > const &iSerializer, T &oValue) const
 
 Message (IMessage *message)
 
template<typename T >
tresult setBinary (IAttributeList::AttrID id, const T *iData, uint32 iSize)
 
void setFloat (IAttributeList::AttrID id, double value)
 
void setInt (IAttributeList::AttrID id, int64 value)
 
void setMessageID (MessageID messageID)
 
template<typename T >
tresult setSerializableValue (IAttributeList::AttrID id, IParamSerializer< T > const &iSerializer, T const &iValue)
 

Private Attributes

IMessage * fMessage
 

Detailed Description

Simple wrapper class with better api

Constructor & Destructor Documentation

◆ Message()

pongasoft::VST::Message::Message ( IMessage *  message)
inlineexplicit

Member Function Documentation

◆ getBinary()

template<typename T >
int32 pongasoft::VST::Message::getBinary ( IAttributeList::AttrID  id,
T *  iData,
uint32  iSize 
) const
inline

Gets a binary message.

Parameters
iDatathe array into which the binary data will be copied
iSizethe number of elements in iData array (NOT the size in bytes!)
Returns
-1 if cannot ready binary otherwise number of elements read (always <= iSize)

◆ getFloat()

double pongasoft::VST::Message::getFloat ( IAttributeList::AttrID  id,
double  defaultValue 
) const
inline

◆ getInt()

int64 pongasoft::VST::Message::getInt ( IAttributeList::AttrID  id,
int64  defaultValue 
) const
inline

◆ getMessageID()

MessageID pongasoft::VST::Message::getMessageID ( ) const
inline

◆ getSerializableValue()

template<typename T >
tresult pongasoft::VST::Message::getSerializableValue ( IAttributeList::AttrID  id,
IParamSerializer< T > const &  iSerializer,
T &  oValue 
) const

Deserializes the parameter value from an entry in the message

Returns
kResultOk if successful
Todo:
this line unnecessarily copies the data but there is no other API

◆ setBinary()

template<typename T >
tresult pongasoft::VST::Message::setBinary ( IAttributeList::AttrID  id,
const T *  iData,
uint32  iSize 
)
inline

Sets a binary message.

Parameters
iSizethe number of elements in iData array (NOT the size in bytes!)

◆ setFloat()

void pongasoft::VST::Message::setFloat ( IAttributeList::AttrID  id,
double  value 
)
inline

◆ setInt()

void pongasoft::VST::Message::setInt ( IAttributeList::AttrID  id,
int64  value 
)
inline

◆ setMessageID()

void pongasoft::VST::Message::setMessageID ( MessageID  messageID)
inline

◆ setSerializableValue()

template<typename T >
tresult pongasoft::VST::Message::setSerializableValue ( IAttributeList::AttrID  id,
IParamSerializer< T > const &  iSerializer,
T const &  iValue 
)

Serializes the parameter value as an entry in the message

Returns
kResultOk if successful

Member Data Documentation

◆ fMessage

IMessage* pongasoft::VST::Message::fMessage
private

The documentation for this class was generated from the following file: