The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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::stringget_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< size_t > args
 
bool args_end
 

Detailed Description

Definition at line 29 of file map_command_handler.hpp.

Constructor & Destructor Documentation

events::cmd_arg_parser::cmd_arg_parser ( )
inline

Definition at line 32 of file map_command_handler.hpp.

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

Definition at line 39 of file map_command_handler.hpp.

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

Member Function Documentation

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

Definition at line 86 of file map_command_handler.hpp.

References args, args_end, and str_.

Referenced by get_arg(), and get_data().

std::string events::cmd_arg_parser::get_arg ( unsigned  n) const
inline
std::string events::cmd_arg_parser::get_cmd ( ) const
inline
std::string events::cmd_arg_parser::get_data ( unsigned  n) const
inline
const std::string& events::cmd_arg_parser::get_str ( ) const
inline

Definition at line 54 of file map_command_handler.hpp.

References str_.

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

Member Data Documentation

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

Definition at line 100 of file map_command_handler.hpp.

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

bool events::cmd_arg_parser::args_end
mutableprivate

Definition at line 101 of file map_command_handler.hpp.

Referenced by advance_to_arg(), and parse().

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

Definition at line 99 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: