HRCore V1.1.0
A High Resolution Calculation Library
|
An implement of Storage::Interface as Virtual MMU. More...
#include <VirtualMMU.hpp>
Public Member Functions | |
virtual item_t | at (size_t n) |
Access to storage[pos]. More... | |
virtual item_t | begin () override |
Return the first item of storage. More... | |
virtual item_t | end () override |
Returns the last item of storage. More... | |
virtual size_t | length () override |
Get the length of storage. More... | |
virtual item_t | next (item_t cur) override |
Get next item. More... | |
virtual item_t | prev (item_t cur) override |
virtual bool | shrink (size_t c) override |
Remove data from the end to shrink the size to a given length. More... | |
virtual bool | extend (size_t c) override |
Extend the storage to a given length. More... | |
virtual Interface * | newObject () override |
Get a new object of same type. More... | |
virtual void | delObject (const Interface *ptr) override |
Delete a object from newObject() More... | |
virtual item_t | begin ()=0 |
Return the first item of storage. More... | |
virtual item_t | end ()=0 |
Returns the last item of storage. More... | |
virtual item_t | next (item_t cur)=0 |
Get next item. More... | |
virtual item_t | prev (item_t cur)=0 |
virtual item_t | at (size_t pos)=0 |
Access to storage[pos]. More... | |
virtual size_t | length ()=0 |
Get the length of storage. More... | |
virtual bool | shrink (size_t len)=0 |
Remove data from the end to shrink the size to a given length. More... | |
virtual bool | extend (size_t len)=0 |
Extend the storage to a given length. More... | |
virtual Interface * | newObject ()=0 |
Get a new object of same type. More... | |
virtual void | delObject (const Interface *ptr)=0 |
Delete a object from newObject() More... | |
An implement of Storage::Interface as Virtual MMU.
N | The number of items in each memory unit. |
Definition at line 24 of file VirtualMMU.hpp.
|
inline |
Definition at line 40 of file VirtualMMU.hpp.
|
inlinevirtual |
Definition at line 45 of file VirtualMMU.hpp.
|
inlinevirtual |
Access to storage[pos].
pos | The index of item, starting from 0. |
Implements HRCore::Storage::Interface.
Definition at line 52 of file VirtualMMU.hpp.
|
inlineoverridevirtual |
Return the first item of storage.
Implements HRCore::Storage::Interface.
Definition at line 67 of file VirtualMMU.hpp.
|
inlineoverridevirtual |
Delete a object from newObject()
ptr | The pointer of object to be deleted |
Implements HRCore::Storage::Interface.
Definition at line 130 of file VirtualMMU.hpp.
|
inlineoverridevirtual |
Returns the last item of storage.
Implements HRCore::Storage::Interface.
Definition at line 68 of file VirtualMMU.hpp.
|
inlineoverridevirtual |
Extend the storage to a given length.
len | Final length. |
Implements HRCore::Storage::Interface.
Definition at line 118 of file VirtualMMU.hpp.
|
inlineoverridevirtual |
Get the length of storage.
Implements HRCore::Storage::Interface.
Definition at line 69 of file VirtualMMU.hpp.
|
inlineoverridevirtual |
Get a new object of same type.
Implements HRCore::Storage::Interface.
Definition at line 129 of file VirtualMMU.hpp.
|
inlineoverridevirtual |
Get next item.
cur | Current item. |
Implements HRCore::Storage::Interface.
Definition at line 71 of file VirtualMMU.hpp.
|
inlineoverridevirtual |
cur | Current item. |
Implements HRCore::Storage::Interface.
Definition at line 88 of file VirtualMMU.hpp.
|
inlineoverridevirtual |
Remove data from the end to shrink the size to a given length.
len | The length to be remained. |
Implements HRCore::Storage::Interface.
Definition at line 105 of file VirtualMMU.hpp.