Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dune::MicroSlice Class Reference

#include <MicroSlice.hh>

Inheritance diagram for dune::MicroSlice:
dune::MicroSliceWriter

Classes

struct  Header
 

Public Member Functions

 MicroSlice (uint8_t *address)
 
Header::microslice_size_t size () const
 
Header::nanoslice_count_t nanoSliceCount () const
 
std::unique_ptr< NanoSlicenanoSlice (uint32_t index) const
 

Protected Member Functions

Header const * header_ () const
 
uint8_t * data_ (uint32_t index) const
 

Protected Attributes

uint8_t * buffer_
 

Detailed Description

Definition at line 11 of file MicroSlice.hh.

Constructor & Destructor Documentation

dune::MicroSlice::MicroSlice ( uint8_t *  address)

Definition at line 3 of file MicroSlice.cc.

4 {
5 }
uint8_t * buffer_
Definition: MicroSlice.hh:53

Member Function Documentation

uint8_t * dune::MicroSlice::data_ ( uint32_t  index) const
protected

Definition at line 32 of file MicroSlice.cc.

33 {
34  uint8_t* ns_ptr = reinterpret_cast<uint8_t *>(buffer_ + sizeof(Header));
35  for (uint32_t idx = 0; idx < index; ++idx) {
36  NanoSlice tmp_ns(ns_ptr);
37  ns_ptr += tmp_ns.size();
38  }
39  return ns_ptr;
40 }
uint8_t * buffer_
Definition: MicroSlice.hh:53
dune::MicroSlice::Header const * dune::MicroSlice::header_ ( ) const
protected

Definition at line 27 of file MicroSlice.cc.

28 {
29  return reinterpret_cast<Header const *>(buffer_);
30 }
uint8_t * buffer_
Definition: MicroSlice.hh:53
std::unique_ptr< dune::NanoSlice > dune::MicroSlice::nanoSlice ( uint32_t  index) const

Definition at line 17 of file MicroSlice.cc.

18 {
19  std::unique_ptr<NanoSlice> nslice_ptr;
20  if (index < nanoSliceCount()) {
21  uint8_t* ns_ptr = data_(index);
22  nslice_ptr.reset(new NanoSlice(ns_ptr));
23  }
24  return nslice_ptr;
25 }
uint8_t * data_(uint32_t index) const
Definition: MicroSlice.cc:32
Header::nanoslice_count_t nanoSliceCount() const
Definition: MicroSlice.cc:12
dune::MicroSlice::Header::nanoslice_count_t dune::MicroSlice::nanoSliceCount ( ) const

Definition at line 12 of file MicroSlice.cc.

13 {
14  return header_()->nanoslice_count;
15 }
Header const * header_() const
Definition: MicroSlice.cc:27
dune::MicroSlice::Header::microslice_size_t dune::MicroSlice::size ( ) const

Definition at line 7 of file MicroSlice.cc.

8 {
9  return header_()->microslice_size;
10 }
Header const * header_() const
Definition: MicroSlice.cc:27

Member Data Documentation

uint8_t* dune::MicroSlice::buffer_
protected

Definition at line 53 of file MicroSlice.hh.


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