IBR-DTNSuite  0.10
LinkEvent.cpp
Go to the documentation of this file.
1 /*
2  * LinkEvent.cpp
3  *
4  * Created on: 11.10.2012
5  * Author: morgenro
6  */
7 
8 #include "LinkEvent.h"
9 #include <sstream>
10 
11 namespace ibrcommon
12 {
13  LinkEvent::LinkEvent(Action action, const vinterface &iface, const vaddress &addr)
14  : _action(action), _iface(iface), _addr(addr)
15  { }
16 
18  { }
19 
21  {
22  return _iface;
23  }
24 
26  {
27  return _addr;
28  }
29 
31  {
32  return _action;
33  }
34 
35  std::string LinkEvent::toString() const
36  {
37  std::stringstream ss;
38  ss << "interface: " << _iface.toString() << ", action: " << _action << ", address: " << _addr.toString();
39  return ss.str();
40  }
41 } /* namespace ibrcommon */