The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Functions | Variables
sdl2.hpp File Reference
#include <string>
#include <vector>
Include dependency graph for sdl2.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 sdl
 

Functions

std::string get_token (const std::string &string, std::string::const_iterator &begin, const char separator)
 Gets a token from a string. More...
 

Variables

std::vector< sdl::twindow * > windows
 Contains the windows created by the user. More...
 

Function Documentation

std::string get_token ( const std::string string,
std::string::const_iterator &  begin,
const char  separator 
)

Gets a token from a string.

Tokens are separated by a single separator character.

Parameters
stringThe string to search for tokens.
[in,out]beginInput:
  • The beginning of the current token. The text until the next separator is matched. Output:
  • The position of the next token or the end of the string if the separator character was not found.
separatorThe character marking the separation between tokens.
Returns
The matched string. The match is either until the separator character, or if the character is not found until the end of the string.

Definition at line 121 of file sdl2.cpp.

References gui2::event::find().

Referenced by execute_command().

Variable Documentation

std::vector<sdl::twindow*> windows

Contains the windows created by the user.

Note
The pointers are leaked when the program terminates, leaving it to the OS to do the cleanup.

Definition at line 33 of file sdl2.cpp.