eosim::core::EntityComp EoSimulator Programmer's Manual
NAME
EntityComp: Entity Comparator
SYNOPSIS
#include <eosim/core/entity.hpp>
namespace eosim {
namespace core {
class EntityComp {
public:
EntityComp () {}
virtual ~EntityComp () {}
virtual bool compare (Entity* e1_, Entity* e2_) = 0;
};
}
}
DESCRIPTION
This is the parent class of all Entity Comparators. Comparators are user defined classes which are used to order queues.
CLASS OPERATIONS
EntityComp ():
The constructor creates an EntityComp.
~EntityComp ():
The destructor of EntityComp.
bool compare (Entity* e1_, Entity* e2_):
This abstract operation compares e1_ and e2_. This is the main operations of Comparators. The programmer has to give a method to this operation to implement a specific comparator.
SEE ALSO
eosim::utils::EntityQueueOrdered