Brief description of class still missing. More...
#include <RoutingTask.h>
Public Types | |
| enum | Action { None = 0, Del, Add } |
Public Member Functions | |
| Action | action () const |
| const Address & | destination () const |
| const Address & | gateway () const |
| bool | isSameGateway (const RoutingTask &o) const |
| bool | operator< (const RoutingTask &o) |
| const Address & | peer () const |
| RoutingTask () | |
| RoutingTask (const RoutingTask &o) | |
| void | setAction (Action a) |
| void | setDestination (const Address &d) |
| void | setGateway (const Address &g) |
| void | setPeer (const Address p) |
| void | toLog (int level) const |
Brief description of class still missing.
Full description of class still missing
| enum RoutingTask::Action |
| RoutingTask::RoutingTask | ( | const RoutingTask & | o | ) |
{
_peer=o._peer;
_destination=o._destination;
_gateway=o._gateway;
_action=o._action;
}
| Action RoutingTask::action | ( | ) | const [inline] |
{return _action;}
| const Address& RoutingTask::destination | ( | ) | const [inline] |
{return _destination;}
| const Address& RoutingTask::gateway | ( | ) | const [inline] |
{return _gateway;}
| bool RoutingTask::isSameGateway | ( | const RoutingTask & | o | ) | const |
{
if(_peer==o._peer && _destination==o._destination && _gateway==o._gateway) {
assert(_action!=o._action); // Make sure it is reversed actions
return true;
}
return false;
}
| bool RoutingTask::operator< | ( | const RoutingTask & | o | ) |
{
if(_peer<o._peer) return true;
else if(_peer>o._peer) return false;
else {
if(_destination<o._destination) return true;
else if(_destination>o._destination) return true;
else {
return _action<o._action; // Important: Del must be before Add
}
}
}
| const Address& RoutingTask::peer | ( | ) | const [inline] |
{return _peer;}
| void RoutingTask::setAction | ( | Action | a | ) | [inline] |
{_action=a;}
| void RoutingTask::setDestination | ( | const Address & | d | ) | [inline] |
{_destination=d;}
| void RoutingTask::setGateway | ( | const Address & | g | ) | [inline] |
{_gateway=g;}
| void RoutingTask::setPeer | ( | const Address | p | ) | [inline] |
{_peer=p;}
| void RoutingTask::toLog | ( | int | level | ) | const |
References GpCoreTools::Address::toString().