ONE - On-device Neural Engine
Loading...
Searching...
No Matches
flexbuffers::Sized Class Reference

#include <flexbuffers.h>

Collaboration diagram for flexbuffers::Sized:

Public Member Functions

 Sized (const uint8_t *data, uint8_t byte_width)
 
 Sized (const uint8_t *data, uint8_t byte_width, size_t sz)
 
size_t size () const
 
size_t read_size () const
 
- Public Member Functions inherited from flexbuffers::Object
 Object (const uint8_t *data, uint8_t byte_width)
 

Protected Attributes

size_t size_
 
- Protected Attributes inherited from flexbuffers::Object
const uint8_t * data_
 
uint8_t byte_width_
 

Detailed Description

Definition at line 225 of file flexbuffers.h.

Constructor & Destructor Documentation

◆ Sized() [1/2]

flexbuffers::Sized::Sized ( const uint8_t *  data,
uint8_t  byte_width 
)
inline

Definition at line 229 of file flexbuffers.h.

229: Object(data, byte_width), size_(read_size()) {}
size_t read_size() const

◆ Sized() [2/2]

flexbuffers::Sized::Sized ( const uint8_t *  data,
uint8_t  byte_width,
size_t  sz 
)
inline

Definition at line 231 of file flexbuffers.h.

231: Object(data, byte_width), size_(sz) {}

Member Function Documentation

◆ read_size()

size_t flexbuffers::Sized::read_size ( ) const
inline

Definition at line 234 of file flexbuffers.h.

235 {
236 return static_cast<size_t>(ReadUInt64(data_ - byte_width_, byte_width_));
237 }
const uint8_t * data_
uint64_t ReadUInt64(const uint8_t *data, uint8_t byte_width)

References flexbuffers::Object::byte_width_, flexbuffers::Object::data_, and flexbuffers::ReadUInt64().

◆ size()

Field Documentation

◆ size_

size_t flexbuffers::Sized::size_
protected

Definition at line 240 of file flexbuffers.h.

Referenced by size().


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