14 #ifndef HTGS_IDATA_HPP 15 #define HTGS_IDATA_HPP 93 bool operator()(
const std::shared_ptr<IData> p1,
const std::shared_ptr<IData> p2)
const {
103 return p1->compare(p2);
119 virtual bool compare(
const std::shared_ptr<IData> p2)
const {
120 return this->
getOrder() > p2->getOrder();
137 #endif //HTGS_IDATA_HPP size_t order
The ordering of the data (lowest first)
Definition: IData.hpp:132
Class to hold any type of data.
Definition: IData.hpp:60
IData()
Constructs an IData with default ordering = 0.
Definition: IData.hpp:67
virtual bool compare(const std::shared_ptr< IData > p2) const
Virtual IData comparison function, can be used for custom ordering.
Definition: IData.hpp:119
IData(size_t order)
Constructs IData with integer ordering.
Definition: IData.hpp:76
bool operator()(const std::shared_ptr< IData > p1, const std::shared_ptr< IData > p2) const
Compares two IData pointers for ordering.
Definition: IData.hpp:93
Definition: Bookkeeper.hpp:23
virtual ~IData()
Destructor.
Definition: IData.hpp:83
size_t getOrder() const
Gets the order of this IData.
Definition: IData.hpp:127