B2BITS FIX Antenna C++  2.29.0
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. More...
 

Public Member Functions

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...
 
template<typename Iterator >
 MemBlock (Iterator aBegin, Iterator aEnd) throw ()
 Constructor Constructs instance from address to memory and size. More...
 
 MemBlock () throw ()
 Default constructor. More...
 
value_type const & operator[] (std::size_t index) const throw ()
 Indexer. More...
 
std::size_t size () const throw ()
 Returns size of the block. More...
 

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.

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

◆ 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::MemBlock< CharType >::compareTo(), and Engine::MemBlock< CharType >::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.

◆ size()

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

Returns size of the block.

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