19 #ifndef OMNI_TYPEIDMEMORY_H_
20 #define OMNI_TYPEIDMEMORY_H_
25 #include <QDataStream>
32 template<
typename INTERFACE>
49 _buf.open(QIODevice::WriteOnly);
50 QDataStream _s(&_buf);
60 if (
memory_.count(_id) == 0)
return;
63 QDataStream _s(
memory_.at(_id));
std::map< Id, QByteArray > memory_
Definition: TypeIdMemory.h:68
virtual Id getTypeId() const =0
Returns type id of object.
void restore(interface_type *_t) const
Restore object with interface in memory, if exists.
Definition: TypeIdMemory.h:56
void clear()
Clear memory.
Definition: TypeIdMemory.h:39
void store(interface_type const *_t)
Store object with interface in memory.
Definition: TypeIdMemory.h:44
Helper class to store objects with a certain type id in QBuffer Used in GUI for storing previously s...
Definition: TypeIdMemory.h:33
Mapping interface with one or several inputs and shader Holds inputs and shader. ...
Definition: Interface.h:54
INTERFACE interface_type
Our interface type.
Definition: TypeIdMemory.h:36