Public Types | Public Member Functions

Engine::MemBlock< T > Class Template Reference

Represents reference to the memory block. More...

#include <B2BITS_String.h>

List of all members.

Public Types

typedef T value_type
 Provides access to the template parameter.

Public Member Functions

value_type const * begin () const
 Returns pointer to first character.
int compareTo (MemBlock rv) const
 Compares two MemBlock.
value_type const * data () const
 Returns pointer to the first character of the block.
value_type const * end () const
 Returns pointer to the next after last character.
 MemBlock (const value_type *aData, size_t aSize)
 Constructor Constructs instance from address to memory and size.
 MemBlock ()
 Default constructor.
value_type const & operator[] (size_t index) const
 Indexer.
size_t size () const
 Returns size of the block.

Detailed Description

template<typename T>
class Engine::MemBlock< T >

Represents reference to the memory block.

Object does not own stored memory block.

Definition at line 62 of file B2BITS_String.h.


Member Typedef Documentation

template<typename T>
typedef T Engine::MemBlock< T >::value_type

Provides access to the template parameter.

Reimplemented in Engine::BasicString< CharType >.

Definition at line 65 of file B2BITS_String.h.


Constructor & Destructor Documentation

template<typename T>
Engine::MemBlock< T >::MemBlock ( 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 122 of file B2BITS_String.h.

template<typename T>
Engine::MemBlock< T >::MemBlock (  ) [inline]

Default constructor.

Definition at line 125 of file B2BITS_String.h.


Member Function Documentation

template<typename T>
value_type const* Engine::MemBlock< T >::begin (  ) const [inline]

Returns pointer to first character.

Definition at line 80 of file B2BITS_String.h.

template<typename T>
int Engine::MemBlock< T >::compareTo ( MemBlock< T >  rv ) const [inline]

Compares two MemBlock.

Returns:
The return value indicates the relationship between the buffers.

Definition at line 91 of file B2BITS_String.h.

Referenced by Engine::operator!=(), Engine::operator<(), Engine::operator==(), and Engine::operator>().

template<typename T>
value_type const* Engine::MemBlock< T >::data (  ) const [inline]

Returns pointer to the first character of the block.

Note:
Memory block does not have null-termination character. Use size method to get size of the block.

Definition at line 71 of file B2BITS_String.h.

Referenced by Engine::BasicString< CharType >::compareTo(), Engine::MemBlock< CharType >::compareTo(), and Engine::MemBlock< CharType >::operator[]().

template<typename T>
value_type const* Engine::MemBlock< T >::end (  ) const [inline]

Returns pointer to the next after last character.

Definition at line 77 of file B2BITS_String.h.

template<typename T>
value_type const& Engine::MemBlock< T >::operator[] ( size_t  index ) const [inline]

Indexer.

Definition at line 83 of file B2BITS_String.h.

template<typename T>
size_t Engine::MemBlock< T >::size (  ) const [inline]

Returns size of the block.

Definition at line 74 of file B2BITS_String.h.

Referenced by Engine::BasicString< CharType >::compareTo(), and Engine::MemBlock< CharType >::compareTo().