\hypertarget{classComSquare_1_1Ram_1_1Ram}{}\doxysection{Com\+Square\+::Ram\+::Ram Class Reference}
\label{classComSquare_1_1Ram_1_1Ram}\index{ComSquare::Ram::Ram@{ComSquare::Ram::Ram}}


{\ttfamily \#include $<$Ram.\+hpp$>$}



Inheritance diagram for Com\+Square\+::Ram\+::Ram\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=210pt]{classComSquare_1_1Ram_1_1Ram__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for Com\+Square\+::Ram\+::Ram\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=210pt]{classComSquare_1_1Ram_1_1Ram__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classComSquare_1_1Ram_1_1Ram_a7361a1d93a70c54c5d08404edbb323c2}{Ram}} (size\+\_\+t size)
\begin{DoxyCompactList}\small\item\em Load a rom from it\textquotesingle{}s path. \end{DoxyCompactList}\item 
\mbox{\hyperlink{classComSquare_1_1Ram_1_1Ram_a54fa93f64b12fc852458acf1c6895cf7}{$\sim$\+Ram}} ()
\begin{DoxyCompactList}\small\item\em Destructor that free the ram. \end{DoxyCompactList}\item 
uint8\+\_\+t \mbox{\hyperlink{classComSquare_1_1Ram_1_1Ram_a873f2becaa9b63d8864bb43eaae89fc6}{read}} (\mbox{\hyperlink{Ints_8hpp_a89f009aaf5d1964a000f44f09fa0bcf8}{uint24\+\_\+t}} addr) override
\begin{DoxyCompactList}\small\item\em Read from the ram. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classComSquare_1_1Ram_1_1Ram_a0f42b342ebf151574c1e523719f9cf52}{write}} (\mbox{\hyperlink{Ints_8hpp_a89f009aaf5d1964a000f44f09fa0bcf8}{uint24\+\_\+t}} addr, uint8\+\_\+t data) override
\begin{DoxyCompactList}\small\item\em Write data to the ram. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
uint8\+\_\+t $\ast$ \mbox{\hyperlink{classComSquare_1_1Ram_1_1Ram_a305d5bb1e067213b35173f0888ed13d4}{\+\_\+data}}
\begin{DoxyCompactList}\small\item\em The ram. (Can be used for W\+Ram, S\+Ram, V\+Ram etc) \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{classComSquare_1_1Ram_1_1Ram_ae184636dc9066b2032aff4a76578f1b1}{\+\_\+size}}
\begin{DoxyCompactList}\small\item\em The size of the ram. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classComSquare_1_1Ram_1_1Ram_a7361a1d93a70c54c5d08404edbb323c2}\label{classComSquare_1_1Ram_1_1Ram_a7361a1d93a70c54c5d08404edbb323c2}} 
\index{ComSquare::Ram::Ram@{ComSquare::Ram::Ram}!Ram@{Ram}}
\index{Ram@{Ram}!ComSquare::Ram::Ram@{ComSquare::Ram::Ram}}
\doxysubsubsection{\texorpdfstring{Ram()}{Ram()}}
{\footnotesize\ttfamily Com\+Square\+::\+Ram\+::\+Ram\+::\+Ram (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{size }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [explicit]}}



Load a rom from it\textquotesingle{}s path. 

\mbox{\Hypertarget{classComSquare_1_1Ram_1_1Ram_a54fa93f64b12fc852458acf1c6895cf7}\label{classComSquare_1_1Ram_1_1Ram_a54fa93f64b12fc852458acf1c6895cf7}} 
\index{ComSquare::Ram::Ram@{ComSquare::Ram::Ram}!````~Ram@{$\sim$Ram}}
\index{````~Ram@{$\sim$Ram}!ComSquare::Ram::Ram@{ComSquare::Ram::Ram}}
\doxysubsubsection{\texorpdfstring{$\sim$Ram()}{~Ram()}}
{\footnotesize\ttfamily Com\+Square\+::\+Ram\+::\+Ram\+::$\sim$\+Ram (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Destructor that free the ram. 



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classComSquare_1_1Ram_1_1Ram_a873f2becaa9b63d8864bb43eaae89fc6}\label{classComSquare_1_1Ram_1_1Ram_a873f2becaa9b63d8864bb43eaae89fc6}} 
\index{ComSquare::Ram::Ram@{ComSquare::Ram::Ram}!read@{read}}
\index{read@{read}!ComSquare::Ram::Ram@{ComSquare::Ram::Ram}}
\doxysubsubsection{\texorpdfstring{read()}{read()}}
{\footnotesize\ttfamily uint8\+\_\+t Com\+Square\+::\+Ram\+::\+Ram\+::read (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{Ints_8hpp_a89f009aaf5d1964a000f44f09fa0bcf8}{uint24\+\_\+t}}}]{addr }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



Read from the ram. 


\begin{DoxyParams}{Parameters}
{\em addr} & The address to read from. The address 0x0 should refer to the first byte of this ram. \\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em \mbox{\hyperlink{classComSquare_1_1InvalidAddress}{Invalid\+Address}}} & will be thrown if the address is more than the size of the ram. \\
\hline
\end{DoxyExceptions}
\begin{DoxyReturn}{Returns}
Return the data at the address. 
\end{DoxyReturn}


Implements \mbox{\hyperlink{classComSquare_1_1Memory_1_1IMemory_a8459ed12c4172ee29ecdc84330f99ff7}{Com\+Square\+::\+Memory\+::\+I\+Memory}}.

\mbox{\Hypertarget{classComSquare_1_1Ram_1_1Ram_a0f42b342ebf151574c1e523719f9cf52}\label{classComSquare_1_1Ram_1_1Ram_a0f42b342ebf151574c1e523719f9cf52}} 
\index{ComSquare::Ram::Ram@{ComSquare::Ram::Ram}!write@{write}}
\index{write@{write}!ComSquare::Ram::Ram@{ComSquare::Ram::Ram}}
\doxysubsubsection{\texorpdfstring{write()}{write()}}
{\footnotesize\ttfamily void Com\+Square\+::\+Ram\+::\+Ram\+::write (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{Ints_8hpp_a89f009aaf5d1964a000f44f09fa0bcf8}{uint24\+\_\+t}}}]{addr,  }\item[{uint8\+\_\+t}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



Write data to the ram. 


\begin{DoxyParams}{Parameters}
{\em addr} & The address to write to. The address 0x0 should refer to the first byte of this ram. \\
\hline
{\em data} & The data to write. \\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em \mbox{\hyperlink{classComSquare_1_1InvalidAddress}{Invalid\+Address}}} & will be thrown if the address is more than the size of the ram. \\
\hline
\end{DoxyExceptions}


Implements \mbox{\hyperlink{classComSquare_1_1Memory_1_1IMemory_a449bc89798a0b86028bb0413106514d9}{Com\+Square\+::\+Memory\+::\+I\+Memory}}.



\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{classComSquare_1_1Ram_1_1Ram_a305d5bb1e067213b35173f0888ed13d4}\label{classComSquare_1_1Ram_1_1Ram_a305d5bb1e067213b35173f0888ed13d4}} 
\index{ComSquare::Ram::Ram@{ComSquare::Ram::Ram}!\_data@{\_data}}
\index{\_data@{\_data}!ComSquare::Ram::Ram@{ComSquare::Ram::Ram}}
\doxysubsubsection{\texorpdfstring{\_data}{\_data}}
{\footnotesize\ttfamily uint8\+\_\+t$\ast$ Com\+Square\+::\+Ram\+::\+Ram\+::\+\_\+data\hspace{0.3cm}{\ttfamily [private]}}



The ram. (Can be used for W\+Ram, S\+Ram, V\+Ram etc) 

\mbox{\Hypertarget{classComSquare_1_1Ram_1_1Ram_ae184636dc9066b2032aff4a76578f1b1}\label{classComSquare_1_1Ram_1_1Ram_ae184636dc9066b2032aff4a76578f1b1}} 
\index{ComSquare::Ram::Ram@{ComSquare::Ram::Ram}!\_size@{\_size}}
\index{\_size@{\_size}!ComSquare::Ram::Ram@{ComSquare::Ram::Ram}}
\doxysubsubsection{\texorpdfstring{\_size}{\_size}}
{\footnotesize\ttfamily size\+\_\+t Com\+Square\+::\+Ram\+::\+Ram\+::\+\_\+size\hspace{0.3cm}{\ttfamily [private]}}



The size of the ram. 



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
sources/\+Ram/\mbox{\hyperlink{Ram_8hpp}{Ram.\+hpp}}\item 
sources/\+Ram/\mbox{\hyperlink{Ram_8cpp}{Ram.\+cpp}}\end{DoxyCompactItemize}
