LV2 Toolkit  1.2.0
Public Member Functions | List of all members
AtomForge Class Reference

#include <atom.hpp>

Collaboration diagram for AtomForge:
Collaboration graph
[legend]

Public Member Functions

 AtomForge ()
 
 AtomForge (LV2_URID_Map *map)
 
void init (LV2_URID_Map *map)
 
LV2_Atom_Forge * cobj ()
 
ForgeRef sequence_head (ForgeFrame &frame, uint32_t unit)
 
 operator LV2_Atom_Forge * ()
 
void set_buffer (uint8_t *buf, uint32_t size)
 
ForgeRef beat_time (double beats)
 
ForgeRef frame_time (int64_t frames)
 
ForgeRef property_head (uint32_t key, uint32_t context)
 
void pop (ForgeFrame &frame)
 
ForgeRef write_atom (uint32_t size, uint32_t type)
 
ForgeRef write_path (const std::string &path)
 
ForgeRef write_resource (ForgeFrame &frame, uint32_t id, uint32_t otype)
 
ForgeRef write_blank (ForgeFrame &frame, uint32_t id, uint32_t otype)
 
ForgeRef write_bool (const bool val)
 
ForgeRef write_int (const int val)
 
ForgeRef write_float (const float val)
 
ForgeRef write_long (const int64_t val)
 
ForgeRef write_string (const char *str)
 
ForgeRef write_uri (const char *uri)
 
ForgeRef write_raw (const void *data, uint32_t size)
 
ForgeRef write_urid (LV2_URID id)
 

Detailed Description

Class wrapper around LV2_Atom_Forge

Constructor & Destructor Documentation

AtomForge ( )
inline

Uninitialized AtomForge.

Note
Client code must call AtomForge::init() before using otherwise written output will be unpredictable
AtomForge ( LV2_URID_Map *  map)
inline

Initialized AtomForge.

Parameters
mapThe LV2_URID_Map to use for initialization

Member Function Documentation

ForgeRef beat_time ( double  beats)
inline

Forge frame time (in a sequence)

LV2_Atom_Forge* cobj ( )
inline

Get the underlying atom forge

Returns
The forge
ForgeRef frame_time ( int64_t  frames)
inline

Forge frame time (in a sequence). The returned ForgeRef is to an LV2_Atom_Event

void init ( LV2_URID_Map *  map)
inline

Initialize the underlying atom forge

Parameters
mapThe mapping function needed for init
void pop ( ForgeFrame &  frame)
inline

Pop a forge frame

Parameters
frameThe frame to pop
ForgeRef property_head ( uint32_t  key,
uint32_t  context 
)
inline

Forge a property header

Parameters
keyThe URID for the key
contextThe context
ForgeRef sequence_head ( ForgeFrame &  frame,
uint32_t  unit 
)
inline

Forge the header of a sequence

void set_buffer ( uint8_t *  buf,
uint32_t  size 
)
inline

Set the forge's buffer

Parameters
bufThe buffer to use
sizeThe size of the buffer
ForgeRef write_atom ( uint32_t  size,
uint32_t  type 
)
inline

Write an atom header

Parameters
sizeThe atom's body size
typeThe atom's body type
Returns
A reference to the written atom
ForgeRef write_blank ( ForgeFrame &  frame,
uint32_t  id,
uint32_t  otype 
)
inline

Forge a blank object

Parameters
frame
id
otype
ForgeRef write_bool ( const bool  val)
inline

Forge a boolean value

Parameters
valThe value to write
ForgeRef write_float ( const float  val)
inline

Forge a float value

Parameters
valThe value to write
ForgeRef write_int ( const int  val)
inline

Forge an integeger value

Parameters
valThe value to write
ForgeRef write_long ( const int64_t  val)
inline

Forge a long integer value

Parameters
valThe value to write
ForgeRef write_path ( const std::string &  path)
inline

Write an atom path from string

Parameters
pathThe path to forge
Returns
An Atom
ForgeRef write_raw ( const void *  data,
uint32_t  size 
)
inline

Forge raw data

Parameters
dataThe data to write
sizeThe size in bytes of data
ForgeRef write_resource ( ForgeFrame &  frame,
uint32_t  id,
uint32_t  otype 
)
inline

Forge an atom resource

Parameters
frame
id
otype
Returns
A reference to the Atom
ForgeRef write_string ( const char *  str)
inline

Forge a string value

Parameters
valThe value to write
ForgeRef write_uri ( const char *  uri)
inline

Forge a uri value

Parameters
valThe value to write
ForgeRef write_urid ( LV2_URID  id)
inline

Forge a URID value

Parameters
idThe URID to write

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