#include <SessionTable.h>
Public Types | |
typedef std::map< EndpointID, Session * > | SessionMap |
typedef SessionMap::const_iterator | iterator |
Public Member Functions | |
SessionTable () | |
Session * | lookup_session (const EndpointID &eid) const |
void | add_session (Session *s) |
Session * | get_session (const EndpointID &eid) |
bool | empty () const |
size_t | size () const |
void | dump (oasys::StringBuffer *buf) const |
iterator | begin () const |
iterator | end () const |
Protected Attributes | |
SessionMap | table_ |
Definition at line 34 of file SessionTable.h.
typedef SessionMap::const_iterator dtn::SessionTable::iterator |
Definition at line 37 of file SessionTable.h.
typedef std::map<EndpointID, Session*> dtn::SessionTable::SessionMap |
Definition at line 36 of file SessionTable.h.
dtn::SessionTable::SessionTable | ( | ) |
Definition at line 30 of file SessionTable.cc.
void dtn::SessionTable::add_session | ( | Session * | s | ) |
Definition at line 47 of file SessionTable.cc.
References ASSERT, dtn::Session::eid(), lookup_session(), and table_.
Referenced by get_session().
iterator dtn::SessionTable::begin | ( | ) | const [inline] |
Definition at line 49 of file SessionTable.h.
References table_.
Referenced by dtn::TableBasedRouter::reroute_all_sessions().
void dtn::SessionTable::dump | ( | oasys::StringBuffer * | buf | ) | const |
Definition at line 68 of file SessionTable.cc.
References dtn::EndpointID::c_str(), dtn::Session::eid(), dtn::Session::subscribers(), table_, and dtn::Session::upstream().
Referenced by dtn::TableBasedRouter::get_routing_state().
bool dtn::SessionTable::empty | ( | ) | const [inline] |
Definition at line 45 of file SessionTable.h.
References table_.
Referenced by dtn::TableBasedRouter::get_routing_state().
iterator dtn::SessionTable::end | ( | ) | const [inline] |
Definition at line 50 of file SessionTable.h.
References table_.
Referenced by dtn::TableBasedRouter::reroute_all_sessions().
Session * dtn::SessionTable::get_session | ( | const EndpointID & | eid | ) |
Definition at line 56 of file SessionTable.cc.
References add_session(), and lookup_session().
Referenced by dtn::TableBasedRouter::get_session_for_bundle(), dtn::TableBasedRouter::handle_registration_added(), and dtn::TableBasedRouter::handle_session_bundle().
Session * dtn::SessionTable::lookup_session | ( | const EndpointID & | eid | ) | const |
Definition at line 36 of file SessionTable.cc.
References table_.
Referenced by add_session(), and get_session().
size_t dtn::SessionTable::size | ( | ) | const [inline] |
Definition at line 46 of file SessionTable.h.
References table_.
Referenced by dtn::TableBasedRouter::get_routing_state(), and dtn::TableBasedRouter::reroute_all_sessions().
SessionMap dtn::SessionTable::table_ [protected] |
Definition at line 53 of file SessionTable.h.
Referenced by add_session(), begin(), dump(), empty(), end(), lookup_session(), and size().