#include <QueuePolicy.h>
Public Types | |
enum | q_policy_t { INVALID_QP = 0, FIFO, MOFO, MOPR, LINEAR_MOPR, SHLI, LEPR } |
Queuing policies p. More... | |
Static Public Member Functions | |
static const char * | qp_to_str (q_policy_t qp) |
Utility function to convert type code to const char*. | |
static q_policy_t | str_to_qp (const char *str) |
static QueueComp * | policy (q_policy_t qp, const Stats *stats=NULL, const Table *nodes=NULL, u_int min_forward=0) |
Factory method for creating QueuePolicy comparator instance. |
Definition at line 32 of file QueuePolicy.h.
QueueComp * prophet::QueuePolicy::policy | ( | QueuePolicy::q_policy_t | qp, | |
const Stats * | stats = NULL , |
|||
const Table * | nodes = NULL , |
|||
u_int | min_forward = 0 | |||
) | [inline, static] |
Factory method for creating QueuePolicy comparator instance.
It is the caller's responsibility to ensure that pointers supplied as parameters to this factory method are valid for the lifetime of the returned QueueComp instance and any of its copies.
Definition at line 351 of file QueuePolicy.h.
References FIFO, INVALID_QP, LEPR, LINEAR_MOPR, MOFO, MOPR, and SHLI.
Referenced by prophet::Controller::Controller(), prophet::Repository::Repository(), and prophet::Controller::set_queue_policy().
static const char* prophet::QueuePolicy::qp_to_str | ( | q_policy_t | qp | ) | [inline, static] |
Utility function to convert type code to const char*.
Definition at line 52 of file QueuePolicy.h.
References CASE, FIFO, LEPR, LINEAR_MOPR, MOFO, MOPR, and SHLI.
Referenced by dtn::ProphetCommand::exec(), prophet::Repository::set_comparator(), and prophet::Controller::set_queue_policy().
static q_policy_t prophet::QueuePolicy::str_to_qp | ( | const char * | str | ) | [inline, static] |
Definition at line 68 of file QueuePolicy.h.
References FIFO, INVALID_QP, LEPR, LINEAR_MOPR, MOFO, MOPR, and SHLI.