JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
List of all members
Steinberg::IAttributes Class Referenceabstract

Object Data Archive Interface. More...

#include "ipersistent.h"

Inheritance diagram for Steinberg::IAttributes:
Steinberg::FUnknown Steinberg::IAttributes2

Public Member Functions

Methods to write attributes
virtual tresult PLUGIN_API set (IAttrID attrID, const FVariant &data)=0
 Store any data in the archive.
 
virtual tresult PLUGIN_API queue (IAttrID listID, const FVariant &data)=0
 Store a list of data in the archive.
 
virtual tresult PLUGIN_API setBinaryData (IAttrID attrID, void *data, uint32 bytes, bool copyBytes)=0
 Store binary data in the archive.
 
- Public Member Functions inherited from Steinberg::FUnknown
virtual tresult PLUGIN_API queryInterface (const TUID _iid, void **obj)=0
 Query for a pointer to the specified interface.
 
virtual uint32 PLUGIN_API addRef ()=0
 Adds a reference and returns the new reference count.
 
virtual uint32 PLUGIN_API release ()=0
 Releases a reference and returns the new reference count.
 

Methods to read attributes

static const FUID iid
 
virtual tresult PLUGIN_API get (IAttrID attrID, FVariant &data)=0
 Get data previously stored to the archive.
 
virtual tresult PLUGIN_API unqueue (IAttrID listID, FVariant &data)=0
 Get list of data previously stored to the archive.
 
virtual int32 PLUGIN_API getQueueItemCount (IAttrID)=0
 Get the amount of items in a queue.
 
virtual tresult PLUGIN_API resetQueue (IAttrID attrID)=0
 Reset a queue.
 
virtual tresult PLUGIN_API resetAllQueues ()=0
 Reset all queues in the archive.
 
virtual tresult PLUGIN_API getBinaryData (IAttrID attrID, void *data, uint32 bytes)=0
 Read binary data from the archive.
 
virtual uint32 PLUGIN_API getBinaryDataSize (IAttrID attrID)=0
 Get the size in bytes of binary data in the archive.
 

Additional Inherited Members

- Static Public Attributes inherited from Steinberg::FUnknown
static const FUID iid
 

Detailed Description

Object Data Archive Interface.

All data stored to the archive are identified by a string (IAttrID), which must be unique on each IAttribute level.

The basic set/get methods make use of the FVariant class defined in 'funknown.h'. For a more convenient usage of this interface, you should use the functions defined in namespace PAttributes (public.sdk/source/common/pattributes.h+cpp) !!

Definition at line 79 of file ipersistent.h.

Member Function Documentation

◆ getBinaryData()

virtual tresult PLUGIN_API Steinberg::IAttributes::getBinaryData ( IAttrID  attrID,
void *  data,
uint32  bytes 
)
pure virtual

Read binary data from the archive.

The data is copied into the passed buffer. The size of that buffer must fit the size of data stored in the archive which can be queried via IAttributes::getBinaryDataSize

◆ queue()

virtual tresult PLUGIN_API Steinberg::IAttributes::queue ( IAttrID  listID,
const FVariant data 
)
pure virtual

Store a list of data in the archive.

Please note that the type of data is not mixable! So you can only store a list of integers or a list of doubles/strings/etc. You can also store a list of subattributes or other objects that implement the IPersistent interface.

◆ resetQueue()

virtual tresult PLUGIN_API Steinberg::IAttributes::resetQueue ( IAttrID  attrID)
pure virtual

Reset a queue.

If you need to restart reading a queue, you have to reset it. You can reset a queue at any time.

◆ set()

virtual tresult PLUGIN_API Steinberg::IAttributes::set ( IAttrID  attrID,
const FVariant data 
)
pure virtual

Store any data in the archive.

It is even possible to store sub-attributes by creating a new IAttributes instance via the IHostClasses interface and pass it to the parent in the FVariant. In this case the archive must take the ownership of the newly created object, which is true for all objects that have been created only for storing. You tell the archive to take ownership by adding the FVariant::kOwner flag to the FVariant::type member (data.type |= FVariant::kOwner). When using the PAttributes functions, this is done through a function parameter.

◆ setBinaryData()

virtual tresult PLUGIN_API Steinberg::IAttributes::setBinaryData ( IAttrID  attrID,
void *  data,
uint32  bytes,
bool  copyBytes 
)
pure virtual

Store binary data in the archive.

Parameter 'copyBytes' specifies if the passed data should be copied. The archive cannot take the ownership of binary data. Either it just references a buffer in order to write it to a file (copyBytes = false) or it copies the data to its own buffers (copyBytes = true). When binary data should be stored in the default pool for example, you must always copy it!

◆ unqueue()

virtual tresult PLUGIN_API Steinberg::IAttributes::unqueue ( IAttrID  listID,
FVariant data 
)
pure virtual

Get list of data previously stored to the archive.

As long as there are queue members the method will return kResultTrue. When the queue is empty, the methods returns kResultFalse. All lists except from object lists can be reset which means that the items can be read once again.

See also
IAttributes::resetQueue

Member Data Documentation

◆ iid

const FUID Steinberg::IAttributes::iid
static

Definition at line 134 of file ipersistent.h.


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