/* * Memory.h * * Created on: Nov 12, 2013 * Author: ron1234 */ #ifndef MEMORY_H_ #define MEMORY_H_ namespace std { /* * Define Memory location types */ enum memIndex{I,U,L,N,F,D}; typedef struct { memIndex memLocationType; union { int *intPtr; unsigned *unsignedPtr; long *longPtr; unsigned long *unslongPtr; float *floatPtr; double *doublePtr; }var; }memLocationPtr; class Memory { int numOfmemLocations; int memoryBlockType; memLocationPtr memLocations; memIndex indicies; public: void *memoryBlockWrite; Memory(); virtual ~Memory(); void *read(unsigned int address); void write(unsigned int address, void *value); }; } /* namespace std */ #endif /* MEMORY_H_ */