esp8266ndn
NDN Arduino library for ESP8266 and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
ndnph::StaticRegion< C > Class Template Reference

Region with statically allocated memory. More...

#include <region.hpp>

Inherits ndnph::Region.

Public Member Functions

 StaticRegion ()
 
 ~StaticRegion ()=default
 
- Public Member Functions inherited from ndnph::Region
 Region (uint8_t *buf, size_t cap)
 
uint8_t * alloc (size_t size)
 Allocate a buffer with no alignment requirement. More...
 
uint8_t * allocA (size_t size)
 Allocate a region aligned to multiple of sizeof(void*). More...
 
bool free (const uint8_t *first, const uint8_t *last)
 Deallocate (part of) last allocated buffer. More...
 
bool free (const uint8_t *ptr, size_t size)
 
template<typename T , typename... Arg>
T * make (Arg &&... arg)
 Allocate and create an item, and return its pointer. More...
 
template<typename RefType , typename... Arg>
RefType create (Arg &&... arg)
 Allocate and create an object, and return its reference. More...
 
void reset ()
 Discard allocated items. More...
 
size_t available () const
 Compute remaining space for alloc(). More...
 
size_t availableA () const
 Compute remaining space for allocA(). More...
 
size_t size () const
 Compute utilized space. More...
 

Additional Inherited Members

- Public Types inherited from ndnph::Region
enum  { ALIGNMENT = sizeof(void*) }
 
- Static Public Member Functions inherited from ndnph::Region
template<typename T >
static constexpr T sizeofAligned (T size)
 
- Protected Member Functions inherited from ndnph::Region
uint8_t * getArray ()
 

Detailed Description

template<int C>
class ndnph::StaticRegion< C >

Region with statically allocated memory.

Template Parameters
Ccapacity.

Constructor & Destructor Documentation

◆ StaticRegion()

template<int C>
ndnph::StaticRegion< C >::StaticRegion ( )
inline

◆ ~StaticRegion()

template<int C>
ndnph::StaticRegion< C >::~StaticRegion ( )
default

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