#include <token.h>
Public Types | |
enum | Status { LOCKED = 1, READY = 0, CACHE = -1, REMOVE = -2, OUTSIDE = -3 } |
Resource loading status. More... | |
Public Member Functions | |
Priority | getPriority () |
bool | isInCache () |
bool | isLocked () |
bool | lock () |
return false if resource not in highest query. remember to unlock when done | |
bool | operator< (const Token &a) const |
bool | operator> (const Token &a) const |
void | pushPriority () |
copy priority to swap space [do not use, should be private] | |
bool | remove () |
can't be removed if locked and will return false | |
void | setPriority (const Priority &p) |
the new priority will be effective only after a call to Controller::updatePriorities() | |
Token () | |
bool | unlock () |
assumes it was locked first and 1 unlock for each lock. | |
Public Attributes | |
mt::atomicInt | count |
swap space used in updatePriorities [do not use, should be private] | |
Priority | new_priority |
set in the main thread [do not use, should be private] | |
Priority | priority |
enum vcg::Token::Status |
vcg::Token< Priority >::Token | ( | ) | [inline] |
Priority vcg::Token< Priority >::getPriority | ( | ) | [inline] |
bool vcg::Token< Priority >::isInCache | ( | ) | [inline] |
bool vcg::Token< Priority >::isLocked | ( | ) | [inline] |
bool vcg::Token< Priority >::lock | ( | ) | [inline] |
bool vcg::Token< Priority >::operator< | ( | const Token< Priority > & | a | ) | const [inline] |
bool vcg::Token< Priority >::operator> | ( | const Token< Priority > & | a | ) | const [inline] |
void vcg::Token< Priority >::pushPriority | ( | ) | [inline] |
bool vcg::Token< Priority >::remove | ( | ) | [inline] |
void vcg::Token< Priority >::setPriority | ( | const Priority & | p | ) | [inline] |
the new priority will be effective only after a call to Controller::updatePriorities()
bool vcg::Token< Priority >::unlock | ( | ) | [inline] |
mt::atomicInt vcg::Token< Priority >::count |
Priority vcg::Token< Priority >::new_priority |
Priority vcg::Token< Priority >::priority |