ardour
Public Member Functions | Protected Attributes | List of all members
Evoral::Event< Time > Singleton Reference

#include <smf_source.h>

Inheritance diagram for Evoral::Event< Time >:
Evoral::MIDIEvent< Time >

Public Member Functions

 Event (EventType type=0, Time time=Time(), uint32_t size=0, uint8_t *buf=NULL, bool alloc=false)
 
 Event (EventType type, Time time, uint32_t size, const uint8_t *buf)
 
 Event (const Event &copy, bool alloc)
 
 ~Event ()
 
const Eventoperator= (const Event &copy)
 
void set (const uint8_t *buf, uint32_t size, Time t)
 
bool operator== (const Event &other) const
 
bool operator!= (const Event &other) const
 
bool owns_buffer () const
 
void set_buffer (uint32_t size, uint8_t *buf, bool own)
 
void realloc (uint32_t size)
 
void clear ()
 
EventType event_type () const
 
Time time () const
 
Time original_time () const
 
uint32_t size () const
 
const uint8_t * buffer () const
 
uint8_t * buffer ()
 
void set_event_type (EventType t)
 
void set_time (Time)
 
void set_original_time (Time)
 
event_id_t id () const
 
void set_id (event_id_t n)
 

Protected Attributes

EventType _type
 
Time _original_time
 
Time _nominal_time
 
uint32_t _size
 
uint8_t * _buf
 
event_id_t _id
 
bool _owns_buf
 

Detailed Description

template<typename Time>
singleton Evoral::Event< Time >

An event (much like a type generic jack_midi_event_t)

Template parameter Time is the type of the time stamp used for this event.

Definition at line 30 of file smf_source.h.

Constructor & Destructor Documentation

template<typename Time>
Evoral::Event< Time >::Event ( EventType  type = 0,
Time  time = Time(),
uint32_t  size = 0,
uint8_t *  buf = NULL,
bool  alloc = false 
)
template<typename Time>
Evoral::Event< Time >::Event ( EventType  type,
Time  time,
uint32_t  size,
const uint8_t *  buf 
)
template<typename Time>
Evoral::Event< Time >::Event ( const Event< Time > &  copy,
bool  alloc 
)

Copy copy.

If alloc is true, the buffer will be copied and this method is NOT REALTIME SAFE. Otherwise both events share a buffer and memory management semantics are the caller's problem.

template<typename Time>
Evoral::Event< Time >::~Event ( )

Member Function Documentation

template<typename Time>
const uint8_t* Evoral::Event< Time >::buffer ( ) const
inline

Definition at line 135 of file Event.hpp.

template<typename Time>
uint8_t* Evoral::Event< Time >::buffer ( )
inline

Definition at line 136 of file Event.hpp.

template<typename Time>
void Evoral::Event< Time >::clear ( )
inline

Definition at line 117 of file Event.hpp.

template<typename Time>
EventType Evoral::Event< Time >::event_type ( ) const
inline

Definition at line 131 of file Event.hpp.

template<typename Time>
event_id_t Evoral::Event< Time >::id ( ) const
inline

Definition at line 143 of file Event.hpp.

template<typename Time>
bool Evoral::Event< Time >::operator!= ( const Event< Time > &  other) const
inline

Definition at line 91 of file Event.hpp.

template<typename Time>
const Event& Evoral::Event< Time >::operator= ( const Event< Time > &  copy)
template<typename Time>
bool Evoral::Event< Time >::operator== ( const Event< Time > &  other) const
inline

Definition at line 68 of file Event.hpp.

template<typename Time>
Time Evoral::Event< Time >::original_time ( ) const
inline

Definition at line 133 of file Event.hpp.

template<typename Time>
bool Evoral::Event< Time >::owns_buffer ( ) const
inline

Definition at line 93 of file Event.hpp.

template<typename Time>
void Evoral::Event< Time >::realloc ( uint32_t  size)
inline

Definition at line 105 of file Event.hpp.

template<typename Time>
void Evoral::Event< Time >::set ( const uint8_t *  buf,
uint32_t  size,
Time  t 
)
template<typename Time>
void Evoral::Event< Time >::set_buffer ( uint32_t  size,
uint8_t *  buf,
bool  own 
)
inline

Definition at line 95 of file Event.hpp.

template<typename Time>
void Evoral::Event< Time >::set_event_type ( EventType  t)
inline

Definition at line 138 of file Event.hpp.

template<typename Time>
void Evoral::Event< Time >::set_id ( event_id_t  n)
inline

Definition at line 144 of file Event.hpp.

template<typename Time>
void Evoral::Event< Time >::set_original_time ( Time  )
template<typename Time>
void Evoral::Event< Time >::set_time ( Time  )
template<typename Time>
uint32_t Evoral::Event< Time >::size ( ) const
inline

Definition at line 134 of file Event.hpp.

template<typename Time>
Time Evoral::Event< Time >::time ( ) const
inline

Definition at line 132 of file Event.hpp.

Member Data Documentation

template<typename Time>
uint8_t* Evoral::Event< Time >::_buf
protected

Raw MIDI data

Definition at line 151 of file Event.hpp.

template<typename Time>
event_id_t Evoral::Event< Time >::_id
protected

Definition at line 152 of file Event.hpp.

template<typename Time>
Time Evoral::Event< Time >::_nominal_time
protected

Quantized version of _time, used in preference

Definition at line 149 of file Event.hpp.

template<typename Time>
Time Evoral::Event< Time >::_original_time
protected

Sample index (or beat time) at which event is valid

Definition at line 148 of file Event.hpp.

template<typename Time>
bool Evoral::Event< Time >::_owns_buf
protected

UUID for each event, should probably be 64bit or at least unsigned Whether buffer is locally allocated

Definition at line 154 of file Event.hpp.

template<typename Time>
uint32_t Evoral::Event< Time >::_size
protected

Number of uint8_ts of data in buffer

Definition at line 150 of file Event.hpp.

template<typename Time>
EventType Evoral::Event< Time >::_type
protected

Type of event (application relative, NOT MIDI 'type')

Definition at line 147 of file Event.hpp.


The documentation for this singleton was generated from the following files: