Xyris  0.5
Memory::MemoryMap Class Reference

#include <MemoryMap.hpp>

+ Collaboration diagram for Memory::MemoryMap:

Public Member Functions

size_t Count ()
 
SectionGet (size_t idx)
 
Section operator[] (size_t idx) const
 
Sectionoperator[] (size_t idx)
 

Private Attributes

Section m_sections [m_max_sections]
 

Static Private Attributes

static const size_t m_max_sections = 32
 

Detailed Description

Definition at line 17 of file MemoryMap.hpp.

Member Function Documentation

◆ Count()

size_t Memory::MemoryMap::Count ( )
inline

Returns the max number of memory sections allowed in a MemoryMap.

Returns
size_t Max number of entries

Definition at line 25 of file MemoryMap.hpp.

26  {
27  return m_max_sections;
28  }
+ Here is the caller graph for this function:

◆ Get()

Section& Memory::MemoryMap::Get ( size_t  idx)
inline

Returns a reference to the memory section at the given index.

Parameters
idxMemory section index
Returns
Section& Section at index available for updating

Definition at line 36 of file MemoryMap.hpp.

37  {
38  return m_sections[idx];
39  }

◆ operator[]() [1/2]

Section& Memory::MemoryMap::operator[] ( size_t  idx)
inline

Getter bracket operator. Returns a reference to the Memory::Section at the provided index.

Parameters
idxMemory section index
Returns
Section& Reference to the Memory::Section

Definition at line 60 of file MemoryMap.hpp.

61  {
62  return m_sections[idx];
63  }

◆ operator[]() [2/2]

Section Memory::MemoryMap::operator[] ( size_t  idx) const
inline

Getter bracket operator. Returns a copy of the Memory::Section at the provided index.

Parameters
idxMemory section index
Returns
Section Copy of the Memory::Section

Definition at line 48 of file MemoryMap.hpp.

49  {
50  return m_sections[idx];
51  }

Field Documentation

◆ m_max_sections

const size_t Memory::MemoryMap::m_max_sections = 32
staticprivate

Definition at line 67 of file MemoryMap.hpp.

◆ m_sections

Section Memory::MemoryMap::m_sections[m_max_sections]
private

Definition at line 68 of file MemoryMap.hpp.


The documentation for this class was generated from the following file:
Memory::MemoryMap::m_max_sections
static const size_t m_max_sections
Definition: MemoryMap.hpp:67
Memory::MemoryMap::m_sections
Section m_sections[m_max_sections]
Definition: MemoryMap.hpp:68