ndn::nfd::StatusDataset Class Reference

Base class of NFD StatusDataset. More...

#include <ndn-cxx/mgmt/nfd/status-dataset.hpp>

+ Inheritance diagram for ndn::nfd::StatusDataset:
+ Collaboration diagram for ndn::nfd::StatusDataset:

Classes

class  ParseResultError
 Indicates reassembled payload cannot be parsed as ResultType. More...
 

Public Types

using ParamType = int
 If defined, specifies constructor argument type; otherwise, the constructor has no arguments. More...
 
using ResultType = std::vector< int >
 Specifies the result type, usually a vector. More...
 

Public Member Functions

virtual ~StatusDataset ()
 
Name getDatasetPrefix (const Name &prefix) const
 Constructs a name prefix for the dataset. More...
 
ResultType parseResult (ConstBufferPtr payload) const
 Parses a result from reassembled payload. More...
 

Protected Member Functions

 StatusDataset (const PartialName &datasetName)
 Constructs a StatusDataset instance with given sub-prefix. More...
 

Detailed Description

Base class of NFD StatusDataset.

See also
https://redmine.named-data.net/projects/nfd/wiki/StatusDataset

Definition at line 43 of file status-dataset.hpp.

Member Typedef Documentation

◆ ParamType

If defined, specifies constructor argument type; otherwise, the constructor has no arguments.

Definition at line 54 of file status-dataset.hpp.

◆ ResultType

using ndn::nfd::StatusDataset::ResultType = std::vector<int>

Specifies the result type, usually a vector.

Definition at line 69 of file status-dataset.hpp.

Constructor & Destructor Documentation

◆ ~StatusDataset()

ndn::nfd::StatusDataset::~StatusDataset ( )
virtualdefault

◆ StatusDataset()

ndn::nfd::StatusDataset::StatusDataset ( const PartialName datasetName)
explicitprotected

Constructs a StatusDataset instance with given sub-prefix.

Parameters
datasetNamedataset name after top-level prefix, such as faces/list

Definition at line 28 of file status-dataset.cpp.

Member Function Documentation

◆ getDatasetPrefix()

Name ndn::nfd::StatusDataset::getDatasetPrefix ( const Name prefix) const

Constructs a name prefix for the dataset.

Parameters
prefixtop-level prefix, such as ndn:/localhost/nfd
Returns
Name prefix without version and segment components.

Definition at line 36 of file status-dataset.cpp.

◆ parseResult()

ResultType ndn::nfd::StatusDataset::parseResult ( ConstBufferPtr  payload) const

Parses a result from reassembled payload.

Parameters
payloadreassembled payload
Exceptions
tlv::Errorcannot parse payload