Go to the documentation of this file.
15 #ifndef _FASTCDR_CDRBUFFER_H_
16 #define _FASTCDR_CDRBUFFER_H_
28 #if defined(_WIN32) || !defined(FASTCDR_ARM32)
30 return static_cast<uint32_t
>(val);
34 #endif // if defined(_WIN32) || !defined(FASTCDR_ARM32)
62 , current_position_(&buffer_[index])
76 ptrdiff_t diff = current_position_ - buffer_;
78 current_position_ = buffer_ + diff;
91 current_position_ = buffer_ + diff;
104 memcpy(current_position_, &
data,
sizeof(_T));
112 template<
typename _T>
117 memcpy(&
data, current_position_,
sizeof(_T));
132 memcpy(current_position_, src,
size);
148 memcpy(
dst, current_position_,
size);
160 current_position_ += num_bytes;
167 current_position_ -= num_bytes;
213 return current_position_;
225 return !(other_iterator == *
this);
231 char* buffer_ {
nullptr};
234 char* current_position_ {
nullptr};
265 const size_t bufferSize);
272 , m_internalBuffer(true)
276 std::swap(m_internalBuffer, fbuffer.m_internalBuffer);
285 std::swap(m_internalBuffer, fbuffer.m_internalBuffer);
346 size_t min_size_inc);
357 char* buffer_ {
nullptr };
363 bool m_internalBuffer {
true };
368 #endif // _FASTCDR_FASTCDRBUFFER_H_
void memcopy(const void *src, const size_t size)
This function copies a buffer into the raw buffer.
FastBuffer(FastBuffer &&fbuffer)
Move constructor.
void reserve(T &, std::size_t)
char * buffer_
Pointer to the raw buffer.
void rmemcopy(void *dst, const size_t size)
This function copies from the raw buffer to a external buffer.
_FastBuffer_iterator iterator
size_t getBufferSize() const
This function returns the size of the allocated memory of the stream that the eprosima::fastcdr::Fast...
iterator begin()
This function returns a iterator that points to the begining of the stream.
ring_iterator< RS, C > operator-(ring_iterator< RS, C > it, int i) nsrs_noexcept
span_constexpr std::size_t size(span< T, Extent > const &spn)
constexpr automagic_flags operator&(automagic_flags left, automagic_flags right) noexcept
uint32_t size_to_uint32(size_t val)
bool operator==(QwtEventPattern::MousePattern b1, QwtEventPattern::MousePattern b2)
Compare operator.
NLOHMANN_BASIC_JSON_TPL_DECLARATION void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL &j1, nlohmann::NLOHMANN_BASIC_JSON_TPL &j2) noexcept(//NOLINT(readability-inconsistent-declaration-parameter-name) is_nothrow_move_constructible< nlohmann::NLOHMANN_BASIC_JSON_TPL >::value &&//NOLINT(misc-redundant-expression) is_nothrow_move_assignable< nlohmann::NLOHMANN_BASIC_JSON_TPL >::value)
exchanges the values of two JSON objects
constexpr bool operator!=(const optional< T > &lhs, const optional< U > &rhs)
\group relop
char * getBuffer() const
This function returns the stream that the eprosima::fastcdr::FastBuffers uses to serialize data.
std::ostream & operator<<(std::ostream &out, const Interval< Scalar, Value > &i)
This class represents a stream of bytes that contains (or will contain) serialized data....
_FastBuffer_iterator(char *buffer, size_t index)
Constructor. The iterator points to the indicated position.
char * current_position_
Current position in the raw buffer.
iterator end()
This function returns a iterator that points to the end of the stream.
This class implements the iterator used to go through a FastBuffer.
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:44