DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Classes | Public Member Functions | Protected Member Functions | Friends
GUI::String Class Reference

Simple STL-based string class. More...

#include <gui_tk.h>

List of all members.

Classes

class  Native
 Simple pointer encapsulation class for memory management. More...
class  NativeArray
 Simple pointer encapsulation class for memory management. More...
class  NativeObject

Public Member Functions

template<typename STR >
 String (const STR &src)
 Allocate a new String initialized from native string.
template<class InputIterator >
 String (InputIterator a, InputIterator b)
 Taken from STL.
 String (const String &src)
 Copy-constructor.
 String ()
 Allocate a new String.
 ~String ()
 Deallocate a String.
template<typename T >
 operator T () const
 Convert to native representation.
template<typename T >
bool operator== (const T &src) const
 Compare with native representation.
bool operator== (const String &src) const
 Compare with other Strings.
template<typename T >
bool operator!= (const T &src) const
 Compare with native representation.
bool operator!= (const String &src) const
 Compare with other Strings.
Stringoperator= (const String &)
 Explicit declaration of default = operator.

Protected Member Functions

void addNative (Native *dest) const
 Manage a native string's memory.

Friends

class NativeString

Detailed Description

Simple STL-based string class.

This is intended as internal helper class to allow gui::tk to work with any kind of string objects. While you can use this in normal application code, you should better use the string class of your application framework (like Qt). If you don't have any, use std::string.

It supports arbitrary characters, no character set is implied. Conversion from/to usual string types like char* is automatic but not thread-safe for non-class types.

Definition at line 432 of file gui_tk.h.


Member Function Documentation

template<typename T >
GUI::String::operator T ( ) const [inline]

Convert to native representation.

For pointer types like char*, the returned pointer is usually only valid as long as this object exists, or until it is modified and cast to the same type again.

Definition at line 485 of file gui_tk.h.


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