The Battle for Wesnoth  1.15.0-dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
events::cmd_arg_parser Class Reference

#include <map_command_handler.hpp>

Public Member Functions

 cmd_arg_parser ()
 
 cmd_arg_parser (const std::string &str)
 
void parse (const std::string &str)
 
const std::string & get_str () const
 
std::string get_arg (unsigned n) const
 
std::string get_data (unsigned n) const
 
std::string get_cmd () const
 

Private Member Functions

cmd_arg_parseroperator= (const cmd_arg_parser &)
 
 cmd_arg_parser (const cmd_arg_parser &)
 
void advance_to_arg (unsigned n) const
 

Private Attributes

std::string str_
 
std::vector< std::size_t > args
 
bool args_end
 

Detailed Description

Definition at line 30 of file map_command_handler.hpp.

Constructor & Destructor Documentation

◆ cmd_arg_parser() [1/3]

events::cmd_arg_parser::cmd_arg_parser ( )
inline

Definition at line 33 of file map_command_handler.hpp.

Referenced by get_cmd().

◆ cmd_arg_parser() [2/3]

events::cmd_arg_parser::cmd_arg_parser ( const std::string &  str)
inlineexplicit

Definition at line 40 of file map_command_handler.hpp.

◆ cmd_arg_parser() [3/3]

events::cmd_arg_parser::cmd_arg_parser ( const cmd_arg_parser )
private

Member Function Documentation

◆ advance_to_arg()

void events::cmd_arg_parser::advance_to_arg ( unsigned  n) const
inlineprivate

Definition at line 88 of file map_command_handler.hpp.

References args, args_end, and str_.

Referenced by get_arg(), and get_data().

◆ get_arg()

std::string events::cmd_arg_parser::get_arg ( unsigned  n) const
inline

◆ get_cmd()

std::string events::cmd_arg_parser::get_cmd ( ) const
inline

◆ get_data()

std::string events::cmd_arg_parser::get_data ( unsigned  n) const
inline

◆ get_str()

const std::string& events::cmd_arg_parser::get_str ( ) const
inline

Definition at line 55 of file map_command_handler.hpp.

References str_.

◆ operator=()

cmd_arg_parser& events::cmd_arg_parser::operator= ( const cmd_arg_parser )
private

Referenced by get_cmd().

◆ parse()

void events::cmd_arg_parser::parse ( const std::string &  str)
inline

Definition at line 47 of file map_command_handler.hpp.

References args, args_end, and str_.

Member Data Documentation

◆ args

std::vector<std::size_t> events::cmd_arg_parser::args
mutableprivate

Definition at line 102 of file map_command_handler.hpp.

Referenced by advance_to_arg(), get_arg(), get_data(), and parse().

◆ args_end

bool events::cmd_arg_parser::args_end
mutableprivate

Definition at line 103 of file map_command_handler.hpp.

Referenced by advance_to_arg(), and parse().

◆ str_

std::string events::cmd_arg_parser::str_
private

Definition at line 101 of file map_command_handler.hpp.

Referenced by advance_to_arg(), get_arg(), get_data(), get_str(), and parse().


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