Initial commit

This commit is contained in:
Michael Reber
2019-11-15 12:59:38 +01:00
parent 40a414d210
commit b880c3ccde
6814 changed files with 379441 additions and 0 deletions
@@ -0,0 +1,31 @@
MemoryCell.cpp - MemoryCell class implementation (Fig 1.21)
#include "MemoryCell.h"
/**
* Construct the MemoryCell with initialValue
*/
template <class Object>
MemoryCell<Object>::MemoryCell( const Object & initialValue )
: storedValue( initialValue )
{
}
/**
* Return the stored value.
*/
template <class Object>
const Object & MemoryCell<Object>::read( ) const
{
return storedValue;
}
/**
* Store x.
*/
template <class Object>
void MemoryCell<Object>::write( const Object & x )
{
storedValue = x;
}