BLPAPI C++
3.21.0
|
#include <blpapi_types.h>
Public Types | |
typedef const char | element_type |
typedef char | value_type |
typedef std::size_t | size_type |
typedef std::ptrdiff_t | difference_type |
typedef const char * | pointer |
typedef const char * | const_pointer |
typedef const char & | reference |
typedef const char & | const_reference |
typedef const char * | iterator |
typedef const char * | const_iterator |
typedef std::reverse_iterator< iterator > | reverse_iterator |
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
Public Member Functions | |
Bytes () noexcept | |
Bytes (pointer ptr, size_type length) noexcept | |
void | assign (pointer ptr, size_type length) noexcept |
iterator | begin () const noexcept |
iterator | end () const noexcept |
reverse_iterator | rbegin () const noexcept |
reverse_iterator | rend () const noexcept |
reference | front () const |
reference | back () const |
reference | operator[] (size_type index) const |
pointer | data () const noexcept |
size_type | size () const noexcept |
bool | empty () const noexcept |
Bytes | first (size_type count) const |
Bytes | last (size_type count) const |
Bytes | subspan (size_type offset, size_type count=static_cast< std::size_t >(-1)) const |
template<typename BYTE_CONTAINER , typename std::enable_if< IsByteContainer< BYTE_CONTAINER, iterator >::value, bool >::type = true> | |
operator BYTE_CONTAINER () const | |
Bytes is used as a byte array representation.
It contains the pointer and size of a contiguous block of memory - byte array. Data is not copied into Bytes, i.e. it needs to live longer than the corresponding Bytes object.
typedef const char* const_iterator |
typedef const char* const_pointer |
typedef const char& const_reference |
typedef std::reverse_iterator<const_iterator> const_reverse_iterator |
typedef std::ptrdiff_t difference_type |
typedef const char element_type |
typedef const char* iterator |
typedef const char* pointer |
typedef const char& reference |
typedef std::reverse_iterator<iterator> reverse_iterator |
typedef std::size_t size_type |
typedef char value_type |
Create a Bytes object pointing to a contiguous block of memory starting from the specified ptr
and having the specified length
.
Replace the content of the Bytes object to make it pointing to a contiguous block of memory starting from the specified ptr
and having the specified length
.
Bytes::reference back | ( | ) | const |
Return a reference to the last element in the byte array. Calling back
on an empty byte array results in undefined behavior.
|
noexcept |
Return an iterator to the first element of the byte array. If the byte array is empty, the returned iterator will be equal to end()
.
|
noexcept |
Return a pointer to the beginning of the byte array.
|
noexcept |
Check if the byte array is empty.
|
noexcept |
Return an iterator to the element following the last element of the byte array. This element acts as a placeholder; attempting to access it results in undefined behavior.
Obtain a byte array that is a view over the first specified count
elements of this byte array. The behavior is undefined if count > size()
.
Bytes::reference front | ( | ) | const |
Return a reference to the first element in the byte array. Calling front
on an empty byte array results in undefined behavior.
Obtain a byte array that is a view over the last specified count
elements of this byte array. The behavior is undefined if count > size()
.
operator BYTE_CONTAINER | ( | ) | const |
Convert the byte array to a BYTE_CONTAINER
. BYTE_CONTAINER
is any type that can be constructed with two iterators to the beginning and the end of the byte array, i.e. BYTE_CONTAINER(begin(), end())
. Also, BYTE_CONTAINER
must provide a type value_type
such that sizeof(BYTE_CONTAINER::value_type) == 1
.
Bytes::reference operator[] | ( | size_type | index | ) | const |
Return a reference to the specified index
-th element of the byte array. The behavior is undefined if index
is out of range (i.e., if it is greater than or equal to size()
).
|
noexcept |
Return a reverse iterator to the first element of the reversed byte array. It corresponds to the last element of the non-reversed byte array. If the byte array is empty, the returned iterator is equal to rend()
.
|
noexcept |
Return a reverse iterator to the element following the last element of the reversed byte array. It corresponds to the element preceding the first element of the non-reversed byte array. This element acts as a placeholder, attempting to access it results in undefined behavior.
|
noexcept |
Return the number of elements in the byte array.
Obtain a byte array that is a view over the specified count
elements of this byte array starting at the specified offset
. If count == -1
, the number of elements in the subspan is size() - offset
(i.e., it ends at the end of *this
). The behavior is undefined if either offset
or count
is out of range. This happens if offset > size()
, or count != -1
and count > size() - offset
.