NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ns3::ndn::FactoryCallbackApp Class Reference

An application that can be created using the supplied callback. More...

#include <ndn-app-helper.hpp>

Inheritance diagram for ns3::ndn::FactoryCallbackApp:
Collaboration diagram for ns3::ndn::FactoryCallbackApp:

Public Types

typedef std::function< shared_ptr< void >)> FactoryCallback
 

Public Member Functions

 FactoryCallbackApp (const FactoryCallback &factory)
 

Static Public Member Functions

static ApplicationContainer Install (Ptr< Node > node, const FactoryCallback &factory)
 

Protected Member Functions

virtual void StartApplication ()
 
virtual void StopApplication ()
 

Detailed Description

An application that can be created using the supplied callback.

Example:

class SomeApp
{
public:
  SomeApp(size_t initParameter);
  ...
};

FactoryCallbackApp::Install(node, [] () -> shared_ptr<void> {
    return make_shared<SomeApp>(42);
  })
  .Start(Seconds(1.01));

Definition at line 125 of file ndn-app-helper.hpp.

Member Typedef Documentation

◆ FactoryCallback

typedef std::function<shared_ptr<void>)> ns3::ndn::FactoryCallbackApp::FactoryCallback

Definition at line 128 of file ndn-app-helper.hpp.

Constructor & Destructor Documentation

◆ FactoryCallbackApp()

ns3::ndn::FactoryCallbackApp::FactoryCallbackApp ( const FactoryCallback factory)

Definition at line 107 of file ndn-app-helper.cpp.

Member Function Documentation

◆ Install()

ApplicationContainer ns3::ndn::FactoryCallbackApp::Install ( Ptr< Node >  node,
const FactoryCallback factory 
)
static

Definition at line 113 of file ndn-app-helper.cpp.

◆ StartApplication()

void ns3::ndn::FactoryCallbackApp::StartApplication ( )
protectedvirtual

Definition at line 123 of file ndn-app-helper.cpp.

◆ StopApplication()

void ns3::ndn::FactoryCallbackApp::StopApplication ( )
protectedvirtual

Definition at line 129 of file ndn-app-helper.cpp.


The documentation for this class was generated from the following files: