B2BITS FIX Antenna C++ 2.32.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Engine::MemBlock< T > Class Template Reference

Represents reference to the memory block. More...

#include <B2BITS_String.h>

Public Types

typedef T value_type
 Provides access to the template parameter.
 

Public Member Functions

value_type const * begin () const throw ()
 Returns pointer to first character.
 
int compareTo (MemBlock rv) const throw ()
 Compares two MemBlock.
 
value_type const * data () const throw ()
 Returns pointer to the first character of the block.
 
value_type const * end () const throw ()
 Returns pointer to the next after last character.
 
 MemBlock () throw ()
 Default constructor.
 
 MemBlock (const value_type *aData, size_t aSize) throw ()
 Constructor Constructs instance from address to memory and size.
 
template<typename Iterator >
 MemBlock (Iterator aBegin, Iterator aEnd) throw ()
 Constructor Constructs instance from address to memory and size.
 
value_type const & operator[] (std::size_t index) const throw ()
 Indexer.
 
std::size_t size () const throw ()
 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.

Member Typedef Documentation

◆ value_type

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

Provides access to the template parameter.

Constructor & Destructor Documentation

◆ MemBlock() [1/3]

template<typename T >
Engine::MemBlock< T >::MemBlock ( 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

◆ MemBlock() [2/3]

template<typename T >
template<typename Iterator >
Engine::MemBlock< T >::MemBlock ( Iterator aBegin,
Iterator aEnd )
throw ( )
inline

Constructor Constructs instance from address to memory and size.

Parameters
aBeginaddress to the first byte of the block
aEndaddress of the byte after last byte of the block

◆ MemBlock() [3/3]

template<typename T >
Engine::MemBlock< T >::MemBlock ( )
throw ( )
inline

Default constructor.

Member Function Documentation

◆ begin()

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

Returns pointer to first character.

◆ compareTo()

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

Compares two MemBlock.

Returns
The return value indicates the relationship between the buffers.

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

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

◆ data()

template<typename T >
value_type const * Engine::MemBlock< T >::data ( ) const
throw ( )
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.

Referenced by Engine::StringEx::append(), Engine::MemBlock< T >::compareTo(), and Engine::MemBlock< T >::operator[]().

◆ end()

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

Returns pointer to the next after last character.

◆ operator[]()

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

Indexer.

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

◆ size()

template<typename T >
std::size_t Engine::MemBlock< T >::size ( ) const
throw ( )
inline

Returns size of the block.

Referenced by Engine::StringEx::append(), and Engine::MemBlock< T >::compareTo().