---
name: "corelinux_MemoryStorage"
section: "3"
platform: "linux"
package: "libcorelinux-dev"
version: "0.4.32-5"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/corelinux_MemoryStorage"
---

# corelinux\_MemoryStorage(3)

MemoryStorage is type of Storage characterized as transient and high speed.

## NAME

corelinux::MemoryStorage - **MemoryStorage** is type of **Storage** characterized as transient and high speed.

## SYNOPSIS

`#include <MemoryStorage.hpp>`

Inherits **corelinux::TransientStorage**, and **corelinux::Synchronized**.

### Public Member Functions

**MemoryStorage** (**MemoryIdentifierCref**, IntCref, VoidPtr)\
 *Constructor for storage object.*  bool **operator==** (**MemoryStorageCref**) const \
 *Compares identifier.*  **operator MemoryIdentifierCref** (void) const \
 *Returns identifier.*  void **operator+** (Int)  throw ( BoundsException )\
 *Increment current pointer.*  void **operator-** (Int)  throw ( BoundsException )\
 *Decrement current pointer.*  template\<class T\> **operator T** (void)  throw ( BoundsException )\
 *Reads current location as type.*  template\<class T\> **operator T \*** (void)  throw ( BoundsException )\
 *Reads current location as type pointer.*  template\<class T\> T & **operator=** (T &aT)  throw ( BoundsException )\
 *Data assignment.*  **MemoryStorageRef** **operator\[\]** (Int offset)  throw ( BoundsException )\
 *Subscript offset operator.*  template\<class Type, class Xexec\> void **forEach** (Xexec aExec)  throw ( Assertion )\
 *forEach invokes the callers method to perform whatever operation they want on the type reference in the segment space.*  template\<class Type, class Xexec, class Test\> void **forEach** (Xexec aExec, Test aTest)  throw ( Assertion )\
 *forEach that invokes the callers method if the callers test method returns true*

### Protected Member Functions

**MemoryStorage** (void)  throw ( Assertion )\
 *Default is never called.*  **MemoryStorage** (**MemoryStorageCref**)\
 *Copy called by* **Memory***.*  virtual **~MemoryStorage** (void)\
 *Virtual destructor.*  **MemoryStorageRef** **operator=** (**MemoryStorageCref**)\
 *Assignment called by* **Memory***.*  VoidPtr **getBasePointer** (void)\
 *Internal reference to base.*

### Friends

class **Memory**\

## Detailed Description

**MemoryStorage** is type of **Storage** characterized as transient and high speed.

The interface provides pointer semantics with the addition of bounds error checking.

## Constructor & Destructor Documentation

### corelinux::MemoryStorage::MemoryStorage (MemoryIdentifierCref, IntCref, VoidPtr)

Constructor for storage object. **Parameters:**

*MemoryIdentifier* a unique id \
 *Int* size of region in bytes \
 *void* \* to base address of region

## Member Function Documentation

### template\<class Type, class Xexec, class Test\> void corelinux::MemoryStorage::forEach (Xexec aExec, Test aTest) throw ( Assertion )` [inline]`

forEach that invokes the callers method if the callers test method returns true **Parameters:**

*Xexec* call to templated type \
 *Test* call to templated type

### template\<class Type, class Xexec\> void corelinux::MemoryStorage::forEach (Xexec aExec) throw ( Assertion )` [inline]`

forEach invokes the callers method to perform whatever operation they want on the type reference in the segment space. **Parameters:**

*Xexec* call to templated type

## Author

Generated automatically by Doxygen for CoreLinux++ from the source code.
