The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | List of all members
simple_wml::string_span Class Reference

#include <simple_wml.hpp>

Public Types

typedef const char * const_iterator
 
typedef const char * iterator
 
typedef const char value_type
 

Public Member Functions

 string_span ()
 
 string_span (const char *str, int size)
 
 string_span (const char *str)
 
 string_span (const char *begin, const char *end)
 
bool operator== (const char *o) const
 
bool operator!= (const char *o) const
 
bool operator== (const std::string &o) const
 
bool operator!= (const std::string &o) const
 
bool operator== (const string_span &o) const
 
bool operator!= (const string_span &o) const
 
bool operator< (const string_span &o) const
 
const char * begin () const
 
const char * end () const
 
int size () const
 
bool empty () const
 
bool is_null () const
 
bool to_bool (bool default_value=false) const
 
int to_int () const
 
std::string to_string () const
 
char * duplicate () const
 

Private Attributes

const char * str_
 
unsigned int size_
 

Detailed Description

Definition at line 34 of file simple_wml.hpp.

Member Typedef Documentation

Definition at line 46 of file simple_wml.hpp.

typedef const char* simple_wml::string_span::iterator

Definition at line 47 of file simple_wml.hpp.

Definition at line 48 of file simple_wml.hpp.

Constructor & Destructor Documentation

simple_wml::string_span::string_span ( )
inline

Definition at line 37 of file simple_wml.hpp.

simple_wml::string_span::string_span ( const char *  str,
int  size 
)
inline

Definition at line 39 of file simple_wml.hpp.

simple_wml::string_span::string_span ( const char *  str)
inline

Definition at line 41 of file simple_wml.hpp.

simple_wml::string_span::string_span ( const char *  begin,
const char *  end 
)
inline

Definition at line 43 of file simple_wml.hpp.

Member Function Documentation

const char* simple_wml::string_span::begin ( ) const
inline
char * simple_wml::string_span::duplicate ( ) const
bool simple_wml::string_span::empty ( ) const
inline
const char* simple_wml::string_span::end ( ) const
inline
bool simple_wml::string_span::is_null ( ) const
inline

Definition at line 95 of file simple_wml.hpp.

References str_.

Referenced by simple_wml::node::is_dirty(), and simple_wml::node::set_dirty().

bool simple_wml::string_span::operator!= ( const char *  o) const
inline

Definition at line 60 of file simple_wml.hpp.

References operator==().

bool simple_wml::string_span::operator!= ( const std::string o) const
inline

Definition at line 66 of file simple_wml.hpp.

References operator==().

bool simple_wml::string_span::operator!= ( const string_span o) const
inline

Definition at line 72 of file simple_wml.hpp.

References operator==().

bool simple_wml::string_span::operator< ( const string_span o) const
inline

Definition at line 75 of file simple_wml.hpp.

References size_, and str_.

bool simple_wml::string_span::operator== ( const char *  o) const
inline

Definition at line 50 of file simple_wml.hpp.

References size_, and str_.

Referenced by operator!=().

bool simple_wml::string_span::operator== ( const std::string o) const
inline

Definition at line 63 of file simple_wml.hpp.

References size_, and str_.

bool simple_wml::string_span::operator== ( const string_span o) const
inline

Definition at line 69 of file simple_wml.hpp.

References size_, and str_.

int simple_wml::string_span::size ( ) const
inline
bool simple_wml::string_span::to_bool ( bool  default_value = false) const
int simple_wml::string_span::to_int ( ) const

Definition at line 169 of file simple_wml.cpp.

References begin(), and size().

std::string simple_wml::string_span::to_string ( ) const

Member Data Documentation

unsigned int simple_wml::string_span::size_
private

Definition at line 106 of file simple_wml.hpp.

Referenced by empty(), end(), operator<(), operator==(), and size().

const char* simple_wml::string_span::str_
private

Definition at line 105 of file simple_wml.hpp.

Referenced by begin(), end(), is_null(), operator<(), and operator==().


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