senf::console Namespace Reference

Namespaces

 detail
 
 factory
 Console node factories.
 
 kw
 Keyword argument tags.
 

Classes

struct  ArgumentDoc
 Documentation for a single argument. More...
 
struct  ArgumentTraits
 Customize argument parsing. More...
 
struct  ArgumentTraits< emu::RegulatoryRule >
 
struct  CharAsString
 Parse character value as single-char string. More...
 
class  CheckedArgumentIteratorWrapper
 Wrapper checking argument iterator access for validityOutput ParseCommandInfo instance. More...
 
class  Client
 Server client instance. More...
 
class  CommandNode
 Config/console tree command node. More...
 
class  CommandOverload
 Base class for command overload of OverloadedCommandNode. More...
 
class  CommandParser
 Parse commands. More...
 
class  ConfigBundle
 Combine multiple configuration sources. More...
 
class  ConfigFile
 Console node tree based config file parser. More...
 
class  DirectoryNode
 Config/console tree directory node. More...
 
class  Executor
 Execute config/console commands. More...
 
struct  FlagCollection
 Bit-mask flag argument type. More...
 
class  GenericNode
 Config/console node tree base-class. More...
 
class  LazyDirectory
 
class  LinkNode
 Config/console tree link node. More...
 
class  OverloadedCommandNode
 Command node which allows multiple registered callbacks. More...
 
class  ParseCommandInfo
 Single parsed console command. More...
 
class  ParsedArgumentAttributor
 Argument dependent ParsedCommandBase attributes. More...
 
class  ParsedArgumentAttributorBase
 Derived class dependent ParsedCommandBase attributes. More...
 
class  ParsedCommandAttributor
 Non argument dependent ParsedCommandBase attributes. More...
 
class  ParsedCommandAttributorBase
 Generic ParsedCommandOverloadBase attributes. More...
 
class  ParsedCommandOverload
 Parsed command overload. More...
 
class  ParsedCommandOverloadBase
 CommandOverload implementation with automatic argument parsing. More...
 
class  ProgramOptions
 Console node tree based command line option parser. More...
 
struct  ReturnValueTraits
 Customize return value formating. More...
 
struct  ReturnValueTraits< emu::RegulatoryRule >
 
class  ScopedDirectory
 DirectoryNode member proxy. More...
 
class  ScopedDirectoryBase
 Internal: Marker base class for all ScopedDirectory proxies. More...
 
class  Server
 Interactive console server. More...
 
class  SimpleCommandNode
 Most simple CommandNode implementation. More...
 
class  SimpleCommandOverload
 Basic command overload. More...
 
class  SimpleOverloadAttributor
 
struct  SyntaxErrorException
 Syntax error parsing command arguments exception. More...
 
class  SysInfo
 
class  Token
 Single argument token. More...
 
class  UDPServer
 UDP Console server. More...
 
struct  UnknownNodeNameException
 Exception: Unknown node name. More...
 
struct  ValueRange
 Value range. More...
 
class  VariableAttributor
 

Functions

void senf_console_format_value (DirectoryNode::ptr value, std::ostream &os)
 
DirectoryNoderoot ()
 Get console root node. More...
 
void dump (std::ostream &os, DirectoryNode &dir=root())
 Dump console directory structure. More...
 
void moveChildren (DirectoryNode &from, DirectoryNode &to)
 
DirectoryNodeprovideDirectory (DirectoryNode &dir, std::string const &name)
 
std::ostream & operator<< (std::ostream &os, Token const &token)
 
std::ostream & operator<< (std::ostream &stream, ParseCommandInfo const &info)
 
ScopedDirectorysysdir ()
 
template<class Type >
void parse (ParseCommandInfo::TokensRange const &tokens, Type &out)
 Parse token range. More...
 
template<class Type >
std::string str (Type const &value)
 Format value. More...
 
template<class Type >
void format (Type const &value, std::ostream &os)
 Format return value. More...
 
void formatTrueFalse (bool value, std::ostream &os)
 Format boolean value as true / false. More...
 
void formatYesNo (bool value, std::ostream &os)
 Format boolean value as yes / no. More...
 
void formatEnabledDisabled (bool value, std::ostream &os)
 Format boolean value as enabled / disabled. More...
 
void formatOnOff (bool value, std::ostream &os)
 Format boolean value as on / off. More...
 
void formatOneZero (bool value, std::ostream &os)
 Format boolean value as 1 / 0. More...
 

Function Documentation

◆ dump()

void senf::console::dump ( std::ostream &  os,
DirectoryNode dir = root() 
)

Dump console directory structure.

Recursively dumps the console directory structure starting at dir. By default, dumps the complete tree beginning at the root node.

In contrast to the console 'lr' command, links are dumped by showing the absolute path to the target node.

Definition at line 52 of file Node.cc.

◆ format()

template<class Type >
void senf::console::format ( Type const &  value,
std::ostream &  os 
)

Format return value.

This helper will invoke the correct ReturnValueTraits::format function to write value into the out stream.

See also
ReturnValueTraits

◆ formatEnabledDisabled()

void senf::console::formatEnabledDisabled ( bool  value,
std::ostream &  os 
)

Format boolean value as enabled / disabled.

◆ formatOneZero()

void senf::console::formatOneZero ( bool  value,
std::ostream &  os 
)

Format boolean value as 1 / 0.

◆ formatOnOff()

void senf::console::formatOnOff ( bool  value,
std::ostream &  os 
)

Format boolean value as on / off.

◆ formatTrueFalse()

void senf::console::formatTrueFalse ( bool  value,
std::ostream &  os 
)

Format boolean value as true / false.

◆ formatYesNo()

void senf::console::formatYesNo ( bool  value,
std::ostream &  os 
)

Format boolean value as yes / no.

◆ moveChildren()

void senf::console::moveChildren ( DirectoryNode from,
DirectoryNode to 
)

Definition at line 57 of file Node.cc.

◆ operator<<() [1/2]

std::ostream & senf::console::operator<< ( std::ostream &  os,
Token const &  token 
)

Definition at line 129 of file Parse.cc.

◆ operator<<() [2/2]

std::ostream & senf::console::operator<< ( std::ostream &  stream,
ParseCommandInfo const &  info 
)

Definition at line 165 of file Parse.cc.

◆ parse()

template<class Type >
void senf::console::parse ( ParseCommandInfo::TokensRange const &  tokens,
Type &  out 
)

Parse token range.

This helper will invoke the correct ArgumentTraits::parse function to parse the input tokens into the passed in variable.

See also
ArgumentTraits

◆ provideDirectory()

DirectoryNode& senf::console::provideDirectory ( DirectoryNode dir,
std::string const &  name 
)

◆ root()

senf::console::DirectoryNode & senf::console::root ( )

Get console root node.

Definition at line 26 of file Node.cc.

◆ senf_console_format_value()

void senf::console::senf_console_format_value ( DirectoryNode::ptr  value,
std::ostream &  os 
)

Definition at line 473 of file Executor.cc.

◆ str()

template<class Type >
std::string senf::console::str ( Type const &  value)

Format value.

This helper will call the correct ArgumentTraits::str function to format value

See also
ArgumentTraits

◆ sysdir()

ScopedDirectory& senf::console::sysdir ( )