Public Types | Public Member Functions | Public Attributes
vcg::Token< Priority > Class Template Reference

#include <token.h>

List of all members.

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

Detailed Description

template<typename Priority>
class vcg::Token< Priority >

Definition at line 21 of file token.h.


Member Enumeration Documentation

template<typename Priority >
enum vcg::Token::Status

Resource loading status.

Enumerator:
LOCKED 
READY 
CACHE 
REMOVE 
OUTSIDE 

Definition at line 29 of file token.h.


Constructor & Destructor Documentation

template<typename Priority >
vcg::Token< Priority >::Token ( ) [inline]

Definition at line 39 of file token.h.


Member Function Documentation

template<typename Priority >
Priority vcg::Token< Priority >::getPriority ( ) [inline]

Definition at line 47 of file token.h.

template<typename Priority >
bool vcg::Token< Priority >::isInCache ( ) [inline]

Definition at line 81 of file token.h.

template<typename Priority >
bool vcg::Token< Priority >::isLocked ( ) [inline]

Definition at line 74 of file token.h.

template<typename Priority >
bool vcg::Token< Priority >::lock ( ) [inline]

return false if resource not in highest query. remember to unlock when done

Definition at line 52 of file token.h.

template<typename Priority >
bool vcg::Token< Priority >::operator< ( const Token< Priority > &  a) const [inline]

Definition at line 88 of file token.h.

template<typename Priority >
bool vcg::Token< Priority >::operator> ( const Token< Priority > &  a) const [inline]

Definition at line 99 of file token.h.

template<typename Priority >
void vcg::Token< Priority >::pushPriority ( ) [inline]

copy priority to swap space [do not use, should be private]

Definition at line 84 of file token.h.

template<typename Priority >
bool vcg::Token< Priority >::remove ( ) [inline]

can't be removed if locked and will return false

Definition at line 64 of file token.h.

template<typename Priority >
void vcg::Token< Priority >::setPriority ( const Priority &  p) [inline]

the new priority will be effective only after a call to Controller::updatePriorities()

Definition at line 42 of file token.h.

template<typename Priority >
bool vcg::Token< Priority >::unlock ( ) [inline]

assumes it was locked first and 1 unlock for each lock.

Definition at line 59 of file token.h.


Member Data Documentation

template<typename Priority >
mt::atomicInt vcg::Token< Priority >::count

swap space used in updatePriorities [do not use, should be private]

Definition at line 36 of file token.h.

template<typename Priority >
Priority vcg::Token< Priority >::new_priority

set in the main thread [do not use, should be private]

Definition at line 34 of file token.h.

template<typename Priority >
Priority vcg::Token< Priority >::priority

Do not access these members directly. Will be moved to private shortly. used by various cache threads to sort objects [do not use, should be private]

Definition at line 32 of file token.h.


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


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:41:23