ndn::nfd::ControlCommand::FieldValidator Class Reference

#include <ndn-cxx/mgmt/nfd/control-command.hpp>

Public Member Functions

 FieldValidator ()
 
FieldValidatoroptional (ControlParameterField field)
 Declare an optional field. More...
 
FieldValidatorrequired (ControlParameterField field)
 Declare a required field. More...
 
void validate (const ControlParameters &parameters) const
 Verify that all required fields are present, and all present fields are either required or optional. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ FieldValidator()

ndn::nfd::ControlCommand::FieldValidator::FieldValidator ( )

Definition at line 69 of file control-command.cpp.

Member Function Documentation

◆ optional()

FieldValidator& ndn::nfd::ControlCommand::FieldValidator::optional ( ControlParameterField  field)
inline

Declare an optional field.

Definition at line 97 of file control-command.hpp.

◆ required()

FieldValidator& ndn::nfd::ControlCommand::FieldValidator::required ( ControlParameterField  field)
inline

Declare a required field.

Definition at line 88 of file control-command.hpp.

◆ validate()

void ndn::nfd::ControlCommand::FieldValidator::validate ( const ControlParameters parameters) const

Verify that all required fields are present, and all present fields are either required or optional.

Exceptions
ArgumentError

Definition at line 76 of file control-command.cpp.