pinocchio  3.7.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
 
Loading...
Searching...
No Matches
StaticBuffer Struct Reference

Static buffer with pre-allocated memory. More...

#include <pinocchio/serialization/static-buffer.hpp>

Public Member Functions

 StaticBuffer (const size_t n)
  
 
chardata ()
 Returns the pointer on the data.
 
const chardata () const
 Returns the pointer on the data (const version)
 
void resize (const size_t new_size)
 Increase the capacity of the vector to a value that's greater or equal to new_size.
 
size_t size () const
 Returns the current size of the buffer.
 

Protected Attributes

std::vector< charm_data
 
size_t m_size
 

Detailed Description

Static buffer with pre-allocated memory.

Definition at line 16 of file static-buffer.hpp.

Constructor & Destructor Documentation

◆ StaticBuffer()

StaticBuffer ( const size_t  n)
inlineexplicit

 

Defautl constructor from a given size

Definition at line 20 of file static-buffer.hpp.

Member Function Documentation

◆ data() [1/2]

char * data ( )
inline

Returns the pointer on the data.

Definition at line 33 of file static-buffer.hpp.

◆ data() [2/2]

const char * data ( ) const
inline

Returns the pointer on the data (const version)

Definition at line 39 of file static-buffer.hpp.

◆ resize()

void resize ( const size_t  new_size)
inline

Increase the capacity of the vector to a value that's greater or equal to new_size.

Parameters
[in]new_sizeNew capacity of the buffer.

Definition at line 48 of file static-buffer.hpp.

◆ size()

size_t size ( ) const
inline

Returns the current size of the buffer.

Definition at line 27 of file static-buffer.hpp.

Member Data Documentation

◆ m_data

std::vector<char> m_data
protected

Definition at line 56 of file static-buffer.hpp.

◆ m_size

size_t m_size
protected

Definition at line 55 of file static-buffer.hpp.


The documentation for this struct was generated from the following file: