Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
Public Types | Signals | Public Member Functions | Private Attributes
ResourceHandler Class Reference
Inheritance diagram for ResourceHandler:
[legend]

Public Types

using Key = std::string
 
using Value = QPixmap
 
using future_iterator = typename QMap< Key, QFuture< Value > >::iterator
 
using future_const_iterator = typename QMap< Key, QFuture< Value > >::const_iterator
 
using iterator = typename QMap< Key, Value >::iterator
 
using const_iterator = typename QMap< Key, Value >::const_iterator
 

Signals

void valueReady (const std::string &)
 

Public Member Functions

 ResourceHandler (QObject *_parent)
 
 ResourceHandler (std::function< Value(Key const &)> const &t_builder)
 
void setBuilder (std::function< Value(Key const &)> const &t_builder)
 
Value buildInMainThread (Key const &key)
 
bool isReady () const
 
iterator find (Key const &key)
 
const_iterator find (Key const &key) const
 
future_iterator isFuture (Key const &key)
 
future_const_iterator isFuture (Key const &key) const
 
void sendKey (Key const &key)
 

Private Attributes

std::function< Value(Key const &)> builder
 
QMap< Key, QFuture< Value > > futureMap
 
QMap< Key, Value > finalMap
 

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