fhq-server  v0.2.33
Documentation for fhq-server. FreeHackQuest is an open source platform for competitions of computer security.
Public Member Functions | Private Attributes | List of all members
CmdInputDef Class Reference

CmdInputDef - helper api for define input params and descrip it for docs. More...

#include <cmd_handlers.h>

Public Member Functions

 CmdInputDef (const std::string &sName, const std::string &sDescription)
 
 CmdInputDef ()
 
CmdInputDefoptional ()
 
CmdInputDefrequired ()
 
CmdInputDefstring_ ()
 
CmdInputDefinteger_ ()
 
CmdInputDefany_ ()
 
CmdInputDefbool_ ()
 
CmdInputDefdescription (const std::string &sDescription)
 
CmdInputDefminval (int minval)
 
CmdInputDefmaxval (int maxval)
 
nlohmann::json toJson ()
 
const std::string & getType ()
 
const std::string & getType () const
 
const std::string & getName ()
 
const std::string & getName () const
 
const std::string & getRestrict ()
 
const std::string & getRestrict () const
 
const std::string & getDescription ()
 
const std::string & getDescription () const
 
bool isRequired ()
 
bool isInteger ()
 
bool isString ()
 
bool isBool ()
 
bool isAny ()
 
bool isMinVal ()
 
int getMinVal ()
 
bool isMaxVal ()
 
int getMaxVal ()
 
CmdInputDefaddValidator (WsjcppValidatorStringBase *pValidatorStringBase)
 
const std::vector< WsjcppValidatorStringBase * > & listOfValidators ()
 

Private Attributes

std::string m_sType
 
std::string m_sName
 
std::string m_sRestrict
 
std::string m_sDescription
 
int m_nMinVal
 
bool m_bSettedMinVal
 
int m_nMaxVal
 
bool m_bSettedMaxVal
 
std::string CMD_INPUT_DEF_TYPE_INTEGER = "integer"
 
std::string CMD_INPUT_DEF_TYPE_STRING = "string"
 
std::string CMD_INPUT_DEF_TYPE_BOOL = "boolean"
 
std::string CMD_INPUT_DEF_TYPE_ANY = "any"
 
std::vector< WsjcppValidatorStringBase * > m_vValidatorsString
 

Detailed Description

CmdInputDef - helper api for define input params and descrip it for docs.

Constructor & Destructor Documentation

◆ CmdInputDef() [1/2]

CmdInputDef::CmdInputDef ( const std::string &  sName,
const std::string &  sDescription 
)

◆ CmdInputDef() [2/2]

CmdInputDef::CmdInputDef ( )

Member Function Documentation

◆ addValidator()

CmdInputDef & CmdInputDef::addValidator ( WsjcppValidatorStringBase pValidatorStringBase)

◆ any_()

CmdInputDef & CmdInputDef::any_ ( )

◆ bool_()

CmdInputDef & CmdInputDef::bool_ ( )

◆ description()

CmdInputDef & CmdInputDef::description ( const std::string &  sDescription)

◆ getDescription() [1/2]

const std::string & CmdInputDef::getDescription ( )

◆ getDescription() [2/2]

const std::string & CmdInputDef::getDescription ( ) const

◆ getMaxVal()

int CmdInputDef::getMaxVal ( )

◆ getMinVal()

int CmdInputDef::getMinVal ( )

◆ getName() [1/2]

const std::string & CmdInputDef::getName ( )

◆ getName() [2/2]

const std::string & CmdInputDef::getName ( ) const

◆ getRestrict() [1/2]

const std::string & CmdInputDef::getRestrict ( )

◆ getRestrict() [2/2]

const std::string & CmdInputDef::getRestrict ( ) const

◆ getType() [1/2]

const std::string & CmdInputDef::getType ( )

◆ getType() [2/2]

const std::string & CmdInputDef::getType ( ) const

◆ integer_()

CmdInputDef & CmdInputDef::integer_ ( )

◆ isAny()

bool CmdInputDef::isAny ( )

◆ isBool()

bool CmdInputDef::isBool ( )

◆ isInteger()

bool CmdInputDef::isInteger ( )

◆ isMaxVal()

bool CmdInputDef::isMaxVal ( )

◆ isMinVal()

bool CmdInputDef::isMinVal ( )

◆ isRequired()

bool CmdInputDef::isRequired ( )

◆ isString()

bool CmdInputDef::isString ( )

◆ listOfValidators()

const std::vector< WsjcppValidatorStringBase * > & CmdInputDef::listOfValidators ( )

◆ maxval()

CmdInputDef & CmdInputDef::maxval ( int  maxval)

◆ minval()

CmdInputDef & CmdInputDef::minval ( int  minval)

◆ optional()

CmdInputDef & CmdInputDef::optional ( )

◆ required()

CmdInputDef & CmdInputDef::required ( )

◆ string_()

CmdInputDef & CmdInputDef::string_ ( )

◆ toJson()

nlohmann::json CmdInputDef::toJson ( )

Member Data Documentation

◆ CMD_INPUT_DEF_TYPE_ANY

std::string CmdInputDef::CMD_INPUT_DEF_TYPE_ANY = "any"
private

◆ CMD_INPUT_DEF_TYPE_BOOL

std::string CmdInputDef::CMD_INPUT_DEF_TYPE_BOOL = "boolean"
private

◆ CMD_INPUT_DEF_TYPE_INTEGER

std::string CmdInputDef::CMD_INPUT_DEF_TYPE_INTEGER = "integer"
private

◆ CMD_INPUT_DEF_TYPE_STRING

std::string CmdInputDef::CMD_INPUT_DEF_TYPE_STRING = "string"
private

◆ m_bSettedMaxVal

bool CmdInputDef::m_bSettedMaxVal
private

◆ m_bSettedMinVal

bool CmdInputDef::m_bSettedMinVal
private

◆ m_nMaxVal

int CmdInputDef::m_nMaxVal
private

◆ m_nMinVal

int CmdInputDef::m_nMinVal
private

◆ m_sDescription

std::string CmdInputDef::m_sDescription
private

◆ m_sName

std::string CmdInputDef::m_sName
private

◆ m_sRestrict

std::string CmdInputDef::m_sRestrict
private

◆ m_sType

std::string CmdInputDef::m_sType
private

◆ m_vValidatorsString

std::vector<WsjcppValidatorStringBase *> CmdInputDef::m_vValidatorsString
private

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