EPAM B2BITS MarketData C++ library  1.0.0
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Public Types | Public Member Functions | List of all members
B2bits::MemBlock Class Reference

#include <b2bits/types/String.h>

Public Types

typedef char value_type
 Provides access to the template parameter. More...
 

Public Member Functions

value_type const * data () const noexcept
 
std::size_t size () const noexcept
 Returns size of the block. More...
 
value_type const * end () const noexcept
 Returns pointer to the next after last character. More...
 
value_type const * begin () const noexcept
 Returns pointer to first character. More...
 
value_type const & operator[] (std::size_t index) const noexcept
 Indexer. More...
 
int compareTo (MemBlock rv) const noexcept
 
 MemBlock (const value_type *aData, size_t aSize) noexcept
 
template<typename Iterator >
 MemBlock (Iterator aBegin, Iterator aEnd) noexcept
 
 MemBlock () noexcept
 Default constructor. More...
 

Detailed Description

Memory block type. Object does not own stored memory block.

Inheritance diagram for B2bits::MemBlock:
Inheritance graph
[legend]

Member Typedef Documentation

◆ value_type

Provides access to the template parameter.

Constructor & Destructor Documentation

◆ MemBlock() [1/3]

B2bits::MemBlock::MemBlock ( const value_type aData,
size_t  aSize 
)
inlinenoexcept

Constructor Constructs instance from address to memory and size

Parameters
aDataaddress to the block
aSizesize of the block

◆ MemBlock() [2/3]

template<typename Iterator >
B2bits::MemBlock::MemBlock ( Iterator  aBegin,
Iterator  aEnd 
)
inlinenoexcept

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]

B2bits::MemBlock::MemBlock ( )
inlinenoexcept

Default constructor.

Member Function Documentation

◆ begin()

value_type const* B2bits::MemBlock::begin ( ) const
inlinenoexcept

Returns pointer to first character.

◆ compareTo()

int B2bits::MemBlock::compareTo ( MemBlock  rv) const
noexcept

Compares two MemBlock

Returns
The return value indicates the relationship between the buffers.

◆ data()

value_type const* B2bits::MemBlock::data ( ) const
inlinenoexcept

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.

◆ end()

value_type const* B2bits::MemBlock::end ( ) const
inlinenoexcept

Returns pointer to the next after last character.

◆ operator[]()

value_type const& B2bits::MemBlock::operator[] ( std::size_t  index) const
inlinenoexcept

Indexer.

◆ size()

std::size_t B2bits::MemBlock::size ( ) const
inlinenoexcept

Returns size of the block.