2010-11-12 16:16:22 +01:00
|
|
|
#include "Buffer.h"
|
|
|
|
|
2010-11-12 21:37:12 +01:00
|
|
|
Buffer::Buffer( std::string _id )
|
2010-11-12 16:16:22 +01:00
|
|
|
{
|
|
|
|
id = _id;
|
|
|
|
}
|
|
|
|
|
|
|
|
Buffer::~Buffer()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Buffer::set(frame_t data)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Glib::Mutex::Lock lock(mutex_);
|
|
|
|
frame = data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-11-12 21:37:12 +01:00
|
|
|
void Buffer::set_id(std::string _id)
|
|
|
|
{
|
|
|
|
Glib::Mutex::Lock lock(mutex_);
|
|
|
|
id = _id;
|
|
|
|
}
|
|
|
|
|
2011-05-08 20:08:34 +02:00
|
|
|
void Buffer::set_selected(bool _selected)
|
|
|
|
{
|
|
|
|
Glib::Mutex::Lock lock(mutex_);
|
|
|
|
selected = _selected;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-11-12 16:16:22 +01:00
|
|
|
frame_t Buffer::get()
|
|
|
|
{
|
|
|
|
Glib::Mutex::Lock lock(mutex_);
|
|
|
|
return frame;
|
|
|
|
}
|
|
|
|
|
2010-11-12 21:37:12 +01:00
|
|
|
std::string Buffer::get_id()
|
2010-11-12 16:16:22 +01:00
|
|
|
{
|
|
|
|
Glib::Mutex::Lock lock(mutex_);
|
|
|
|
return id;
|
|
|
|
}
|
2011-05-08 20:08:34 +02:00
|
|
|
|
|
|
|
bool Buffer::get_selected()
|
|
|
|
{
|
|
|
|
Glib::Mutex::Lock lock(mutex_);
|
|
|
|
return selected;
|
|
|
|
}
|