peerplays-fc/include/fc/priority.hpp

20 lines
459 B
C++
Raw Normal View History

2012-09-08 02:50:37 +00:00
#ifndef _FC_PRIORITY_HPP_
#define _FC_PRIORITY_HPP_
namespace fc {
/**
* An integer value used to sort asynchronous tasks. The higher the
* prioirty the sooner it will be run.
*/
class priority {
public:
explicit priority( int v = 0):value(v){}
priority( const priority& p ):value(p.value){}
bool operator < ( const priority& p )const {
return value < p.value;
}
int value;
};
}
#endif // _FC_PRIORITY_HPP_