B2BITS FIX Antenna HFT  1.0.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Engine::BasicString< CharType > Class Template Reference

Represents ASCII std::string. More...

#include <B2BITS_String.h>

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

Public Types

typedef BasicString< value_typeMyT
 
typedef CharType value_type
 Provides access to the template parameter. More...
 
- Public Types inherited from Engine::MemBlock< CharType >
typedef CharType value_type
 Provides access to the template parameter. More...
 

Public Member Functions

 BasicString () throw ()
 Default constructor. More...
 
 BasicString (const value_type *aData, size_t aSize) throw ()
 Constructor Constructs instance from address to memory and size. More...
 
 BasicString (std::basic_string< CharType > const &str) throw ()
 Constructor Constructs instance from std::basic_string. More...
 
 BasicString (value_type const *aData) throw ()
 Constructor Constructs instance from ANSI std::string. More...
 
int compareTo (BasicString rv) const throw ()
 Compares the current string with the passed one. More...
 
bool equals (BasicString rv) const throw ()
 Returns true if strings are equal. More...
 
std::basic_string< value_typetoStdString () const
 Converts AsciiString to std::string. More...
 
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. More...
 
- Public Member Functions inherited from Engine::MemBlock< CharType >
value_type const * begin () const throw ()
 Returns pointer to first character. More...
 
int compareTo (MemBlock rv) const throw ()
 Compares two MemBlock. More...
 
value_type const * data () const throw ()
 Returns pointer to the first character of the block. More...
 
value_type const * end () const throw ()
 Returns pointer to the next after last character. More...
 
 MemBlock (const value_type *aData, size_t aSize) throw ()
 Constructor Constructs instance from address to memory and size. More...
 
 MemBlock () throw ()
 Default constructor. More...
 
value_type const & operator[] (size_t index) const throw ()
 Indexer. More...
 
size_t size () const throw ()
 Returns size of the block. More...
 

Static Public Member Functions

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

Detailed Description

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

Represents ASCII std::string.

Member Typedef Documentation

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

Provides access to the template parameter.

Constructor & Destructor Documentation

template<typename CharType >
Engine::BasicString< CharType >::BasicString ( )
throw (
)
inline

Default constructor.

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

Constructor Constructs instance from address to memory and size.

Parameters
aDataaddress to the block
aSizesize of the block
template<typename CharType >
Engine::BasicString< CharType >::BasicString ( std::basic_string< CharType > const &  str)
throw (
)
inline

Constructor Constructs instance from std::basic_string.

Parameters
strSource std::string
template<typename CharType >
Engine::BasicString< CharType >::BasicString ( value_type const *  aData)
throw (
)
inline

Constructor Constructs instance from ANSI std::string.

Parameters
aDataaddress to the ASCII std::string

Member Function Documentation

template<typename CharType >
int Engine::BasicString< CharType >::compareTo ( BasicString< CharType >  rv) const
throw (
)
inline

Compares the current string with the passed one.

Returns
negative value if this < rv 0 if this == rv positive value if this > rv

References Engine::MemBlock< T >::compareTo().

Referenced by Engine::BasicString< CharType >::equals().

template<typename CharType >
bool Engine::BasicString< CharType >::equals ( BasicString< CharType >  rv) const
throw (
)
inline

Returns true if strings are equal.

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

template<typename CharType >
template<int N>
static MyT Engine::BasicString< CharType >::fromStr ( value_type const (&)  aData[N])
throw (
)
inlinestatic

Constructor Creates instance from array of char.

Creates instance from array of char

Parameters
aDataArray of chars
template<typename CharType >
std::basic_string<value_type> Engine::BasicString< CharType >::toStdString ( ) const
inline
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.

Deprecated:
Use AsciiString::toStdString instead

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