Public Types | Public Member Functions | Static Public Member Functions

Engine::BasicString< CharType > Class Template Reference

Represents ASCII string. More...

#include <B2BITS_String.h>

Inheritance diagram for Engine::BasicString< CharType >:
Collaboration diagram for Engine::BasicString< CharType >:

List of all members.

Public Types

typedef BasicString< value_typeMyT
typedef CharType value_type
 Provides access to the template parameter.

Public Member Functions

 BasicString ()
 Default constructor.
 BasicString (const value_type *aData, size_t aSize)
 Constructor Constructs instance from address to memory and size.
 BasicString (value_type const *aData)
 Constructor Constructs instance from ANSI string.
 BasicString (std::basic_string< CharType > const &str)
 Constructor Constructs instance from std::basic_string.
int compareTo (BasicString rv) const
bool equals (BasicString rv) const
std::basic_string< value_typetoStdString () const
 Converts AsciiString to std::string.
std::basic_string< value_typetoString () const
 Converts AsciiString to std::string This method creates copy of the stored buffer and returns it as std::string.

Static Public Member Functions

template<int N>
static MyT fromStr (value_type const (&data)[N])
 Constructor Creates instance from array of char.

Detailed Description

template<typename CharType>
class Engine::BasicString< CharType >

Represents ASCII string.

Definition at line 134 of file B2BITS_String.h.


Member Typedef Documentation

template<typename CharType >
typedef BasicString<value_type> Engine::BasicString< CharType >::MyT

Definition at line 139 of file B2BITS_String.h.

template<typename CharType >
typedef CharType Engine::BasicString< CharType >::value_type

Provides access to the template parameter.

Reimplemented from Engine::MemBlock< CharType >.

Definition at line 138 of file B2BITS_String.h.


Constructor & Destructor Documentation

template<typename CharType >
Engine::BasicString< CharType >::BasicString (  ) [inline]

Default constructor.

Definition at line 142 of file B2BITS_String.h.

template<typename CharType >
Engine::BasicString< CharType >::BasicString ( const value_type aData,
size_t  aSize 
) [inline]

Constructor Constructs instance from address to memory and size.

Parameters:
dataaddress to the block
sizesize of the block

Definition at line 149 of file B2BITS_String.h.

template<typename CharType >
Engine::BasicString< CharType >::BasicString ( std::basic_string< CharType > const &  str ) [inline]

Constructor Constructs instance from std::basic_string.

Parameters:
strSource string

Definition at line 157 of file B2BITS_String.h.

template<typename CharType >
Engine::BasicString< CharType >::BasicString ( value_type const *  aData ) [inline]

Constructor Constructs instance from ANSI string.

Parameters:
dataaddress to the ASCII string

Definition at line 165 of file B2BITS_String.h.


Member Function Documentation

template<typename CharType >
int Engine::BasicString< CharType >::compareTo ( BasicString< CharType >  rv ) const [inline]
template<typename CharType >
bool Engine::BasicString< CharType >::equals ( BasicString< CharType >  rv ) const [inline]

Definition at line 211 of file B2BITS_String.h.

References Engine::BasicString< CharType >::compareTo().

template<typename CharType >
template<int N>
static MyT Engine::BasicString< CharType >::fromStr ( value_type const (&)  data[N] ) [inline, static]

Constructor Creates instance from array of char.

Creates instance from array of char

Parameters:

Definition at line 180 of file B2BITS_String.h.

References Engine::MemBlock< CharType >::data().

template<typename CharType >
std::basic_string<value_type> Engine::BasicString< CharType >::toStdString (  ) const [inline]

Converts AsciiString to std::string.

This method creates copy of the stored buffer and returns it as std::string.

Definition at line 218 of file B2BITS_String.h.

References Engine::MemBlock< CharType >::data(), and Engine::MemBlock< CharType >::size().

template<typename CharType >
std::basic_string<value_type> Engine::BasicString< CharType >::toString (  ) const [inline]

Converts AsciiString to std::string This method creates copy of the stored buffer and returns it as std::string.

Use AsciiString::toStdString instead

Definition at line 223 of file B2BITS_String.h.

References Engine::MemBlock< CharType >::data(), and Engine::MemBlock< CharType >::size().