nfd::tools::nfdc::ExecuteContext Class Reference

Context for command execution. More...

#include <tools/nfdc/execute-command.hpp>

+ Collaboration diagram for nfd::tools::nfdc::ExecuteContext:

Public Member Functions

ndn::time::nanoseconds getTimeout () const
 
ndn::nfd::CommandFailureCallback makeCommandFailureHandler (const std::string &commandName)
 
ndn::nfd::CommandOptions makeCommandOptions () const
 
ndn::nfd::DatasetFailureCallback makeDatasetFailureHandler (const std::string &datasetName)
 

Public Attributes

const CommandArgumentsargs
 
ndn::nfd::Controller & controller
 
std::ostream & err
 error stream More...
 
int exitCode
 program exit code More...
 
ndn::Face & face
 
ndn::KeyChain & keyChain
 
std::string_view noun
 
std::ostream & out
 output stream More...
 
std::string_view verb
 

Detailed Description

Context for command execution.

Definition at line 50 of file execute-command.hpp.

Member Function Documentation

◆ getTimeout()

time::nanoseconds nfd::tools::nfdc::ExecuteContext::getTimeout ( ) const
Returns
timeout for each step

Definition at line 32 of file execute-command.cpp.

◆ makeCommandFailureHandler()

ndn::nfd::CommandFailureCallback nfd::tools::nfdc::ExecuteContext::makeCommandFailureHandler ( const std::string &  commandName)
Returns
handler for command execution failure
Parameters
commandNamecommand name used in error message (present continuous tense)

Definition at line 45 of file execute-command.cpp.

◆ makeCommandOptions()

ndn::nfd::CommandOptions nfd::tools::nfdc::ExecuteContext::makeCommandOptions ( ) const

Definition at line 38 of file execute-command.cpp.

◆ makeDatasetFailureHandler()

ndn::nfd::DatasetFailureCallback nfd::tools::nfdc::ExecuteContext::makeDatasetFailureHandler ( const std::string &  datasetName)
Returns
handler for dataset retrieval failure
Parameters
datasetNamedataset name used in error message (noun phrase)

Definition at line 54 of file execute-command.cpp.

Member Data Documentation

◆ args

const CommandArguments& nfd::tools::nfdc::ExecuteContext::args

Definition at line 76 of file execute-command.hpp.

◆ controller

ndn::nfd::Controller& nfd::tools::nfdc::ExecuteContext::controller

Definition at line 84 of file execute-command.hpp.

◆ err

std::ostream& nfd::tools::nfdc::ExecuteContext::err

error stream

Definition at line 80 of file execute-command.hpp.

◆ exitCode

int nfd::tools::nfdc::ExecuteContext::exitCode

program exit code

Definition at line 78 of file execute-command.hpp.

◆ face

ndn::Face& nfd::tools::nfdc::ExecuteContext::face

Definition at line 82 of file execute-command.hpp.

◆ keyChain

ndn::KeyChain& nfd::tools::nfdc::ExecuteContext::keyChain

Definition at line 83 of file execute-command.hpp.

◆ noun

std::string_view nfd::tools::nfdc::ExecuteContext::noun

Definition at line 74 of file execute-command.hpp.

◆ out

std::ostream& nfd::tools::nfdc::ExecuteContext::out

output stream

Definition at line 79 of file execute-command.hpp.

◆ verb

std::string_view nfd::tools::nfdc::ExecuteContext::verb

Definition at line 75 of file execute-command.hpp.