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

#include <MilliSlice.hh>

Inheritance diagram for dune::MilliSlice:
dune::MilliSliceFragment dune::MilliSliceWriter dune::MilliSliceFragmentWriter

Classes

struct  Header
 

Public Member Functions

 MilliSlice (uint8_t *address)
 
Header::millislice_size_t size () const
 
Header::microslice_count_t microSliceCount () const
 
std::unique_ptr< MicroSlicemicroSlice (uint32_t index) const
 

Protected Member Functions

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

Protected Attributes

uint8_t * buffer_
 

Detailed Description

Definition at line 11 of file MilliSlice.hh.

Constructor & Destructor Documentation

dune::MilliSlice::MilliSlice ( uint8_t *  address)

Definition at line 3 of file MilliSlice.cc.

4 {
5 }
uint8_t * buffer_
Definition: MilliSlice.hh:56

Member Function Documentation

uint8_t * dune::MilliSlice::data_ ( int  index) const
protected

Definition at line 32 of file MilliSlice.cc.

33 {
34  uint8_t* ms_ptr = buffer_ + sizeof(Header);
35  for (int idx = 0; idx < index; ++idx) {
36  MicroSlice tmp_ms(ms_ptr);
37  ms_ptr += tmp_ms.size();
38  }
39  return ms_ptr;
40 }
uint8_t * buffer_
Definition: MilliSlice.hh:56
dune::MilliSlice::Header const * dune::MilliSlice::header_ ( ) const
protected

Definition at line 27 of file MilliSlice.cc.

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

Definition at line 17 of file MilliSlice.cc.

18 {
19  std::unique_ptr<MicroSlice> mslice_ptr;
20  if (index < microSliceCount()) {
21  uint8_t* ms_ptr = data_(index);
22  mslice_ptr.reset(new MicroSlice(ms_ptr));
23  }
24  return mslice_ptr;
25 }
Header::microslice_count_t microSliceCount() const
Definition: MilliSlice.cc:12
uint8_t * data_(int index) const
Definition: MilliSlice.cc:32
dune::MilliSlice::Header::microslice_count_t dune::MilliSlice::microSliceCount ( ) const

Definition at line 12 of file MilliSlice.cc.

13 {
14  return header_()->microslice_count;
15 }
Header const * header_() const
Definition: MilliSlice.cc:27
dune::MilliSlice::Header::millislice_size_t dune::MilliSlice::size ( ) const

Definition at line 7 of file MilliSlice.cc.

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

Member Data Documentation

uint8_t* dune::MilliSlice::buffer_
protected

Definition at line 56 of file MilliSlice.hh.


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