\hypertarget{classComponent}{}\doxysection{Component Class Reference}
\label{classComponent}\index{Component@{Component}}


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



Inheritance diagram for Component\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{d0/d6a/classComponent__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classComponent_a8775db6d1a2c1afc2e77cd3c8f39da6f}{Component}} ()
\item 
\mbox{\hyperlink{classComponent_ab8378fa275af98e568a7e91d33d867af}{$\sim$\+Component}} ()
\item 
virtual void \mbox{\hyperlink{classComponent_a9c764c2a5607ef52629458d361ebf16e}{Update}} (SDL\+\_\+\+Event e, int frame, std\+::vector$<$ std\+::string $>$ broadcast\+List)
\item 
virtual void \mbox{\hyperlink{classComponent_ab856bdb8c4357a080d7abcf99871a573}{Render}} (SDL\+\_\+\+Renderer $\ast$ren)
\item 
virtual void \mbox{\hyperlink{classComponent_a92af5bb942ea9633515a0c0e16a0bb8c}{Show\+Component\+Editor}} (bool $\ast$show\+Editor)
\item 
virtual bool \mbox{\hyperlink{classComponent_aed93a0ec70ebc71f34f02eb0a3ad4006}{Has\+Tag}} (Component\+Tag t)
\item 
virtual const char $\ast$ \mbox{\hyperlink{classComponent_a6ad359e7f57daa4ba249aaf5c88da052}{Component\+Type\+Name}} ()
\item 
void \mbox{\hyperlink{classComponent_aea8f0f460a62d86183020bd667b6cbf0}{Parse\+And\+Update\+Broadcast}} (std\+::vector$<$ std\+::string $>$ broadcast\+List)
\end{DoxyCompactItemize}
\doxysubsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classComponent_ab9b45a6a11e943c86770a1b3e085c25c}\label{classComponent_ab9b45a6a11e943c86770a1b3e085c25c} 
std\+::vector$<$ Component\+Tag $>$ {\bfseries tags}
\item 
\Hypertarget{classComponent_a929d29b8cdb9447b70f5e7d990c7d0f0}\label{classComponent_a929d29b8cdb9447b70f5e7d990c7d0f0} 
std\+::vector$<$ std\+::string $>$ {\bfseries previous\+Broadcasts}
\item 
\Hypertarget{classComponent_a7d03b8c23a6fa95fd83f08ad88cd59ee}\label{classComponent_a7d03b8c23a6fa95fd83f08ad88cd59ee} 
std\+::vector$<$ std\+::string $>$ {\bfseries pending\+Broadcasts}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Virtual class for all components to inherit from. Contains all the functionality for Game Objects.

\begin{DoxySeeAlso}{See also}
\doxylink{classGameObject}{Game\+Object} 
\end{DoxySeeAlso}


\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{classComponent_a8775db6d1a2c1afc2e77cd3c8f39da6f}\label{classComponent_a8775db6d1a2c1afc2e77cd3c8f39da6f} 
\index{Component@{Component}!Component@{Component}}
\index{Component@{Component}!Component@{Component}}
\doxysubsubsection{\texorpdfstring{Component()}{Component()}}
{\footnotesize\ttfamily Component\+::\+Component (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Construct a new \doxylink{classComponent}{Component} object \Hypertarget{classComponent_ab8378fa275af98e568a7e91d33d867af}\label{classComponent_ab8378fa275af98e568a7e91d33d867af} 
\index{Component@{Component}!````~Component@{$\sim$Component}}
\index{````~Component@{$\sim$Component}!Component@{Component}}
\doxysubsubsection{\texorpdfstring{$\sim$Component()}{\string~Component()}}
{\footnotesize\ttfamily Component\+::$\sim$\+Component (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Destroy the \doxylink{classComponent}{Component} object 

\doxysubsection{Member Function Documentation}
\Hypertarget{classComponent_a6ad359e7f57daa4ba249aaf5c88da052}\label{classComponent_a6ad359e7f57daa4ba249aaf5c88da052} 
\index{Component@{Component}!ComponentTypeName@{ComponentTypeName}}
\index{ComponentTypeName@{ComponentTypeName}!Component@{Component}}
\doxysubsubsection{\texorpdfstring{ComponentTypeName()}{ComponentTypeName()}}
{\footnotesize\ttfamily virtual const char $\ast$ Component\+::\+Component\+Type\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}

The name of the component type. Used by the GUI

\begin{DoxySeeAlso}{See also}
\doxylink{classGameMakerGUI_a39546dd352c9c5d198f61e34011131b4}{Game\+Maker\+GUI\+::\+Create\+Component()} 
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
the name of the component 
\end{DoxyReturn}


Reimplemented in \mbox{\hyperlink{classControllerComponent_a8bf49679c87b14a4eb1e90e8046b0b67}{Controller\+Component}}, \mbox{\hyperlink{classHealthComponent_a14144ba98cdc2ce2fbb96ec31cf38a6d}{Health\+Component}}, \mbox{\hyperlink{classRigidbodyComponent_a4e89f2337c4ebe6f720bdad08ece917b}{Rigidbody\+Component}}, \mbox{\hyperlink{classSpriteComponent_a9f2e32f4d314f0b5f903c0730011656e}{Sprite\+Component}}, \mbox{\hyperlink{classTileMapComponent_a4883b607bd0e6aec69e1d6a95e572eac}{Tile\+Map\+Component}}, and \mbox{\hyperlink{classTransformComponent_aebd4b99e08cce915dd3929ad54befcbc}{Transform\+Component}}.

Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{d8/d6b/classComponent_a6ad359e7f57daa4ba249aaf5c88da052_icgraph}
\end{center}
\end{figure}
\Hypertarget{classComponent_aed93a0ec70ebc71f34f02eb0a3ad4006}\label{classComponent_aed93a0ec70ebc71f34f02eb0a3ad4006} 
\index{Component@{Component}!HasTag@{HasTag}}
\index{HasTag@{HasTag}!Component@{Component}}
\doxysubsubsection{\texorpdfstring{HasTag()}{HasTag()}}
{\footnotesize\ttfamily bool Component\+::\+Has\+Tag (\begin{DoxyParamCaption}\item[{Component\+Tag}]{t }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}

Checks if the component has the given tag


\begin{DoxyParams}{Parameters}
{\em t} & the tag to be checked \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if the component has t 
\end{DoxyReturn}
\Hypertarget{classComponent_aea8f0f460a62d86183020bd667b6cbf0}\label{classComponent_aea8f0f460a62d86183020bd667b6cbf0} 
\index{Component@{Component}!ParseAndUpdateBroadcast@{ParseAndUpdateBroadcast}}
\index{ParseAndUpdateBroadcast@{ParseAndUpdateBroadcast}!Component@{Component}}
\doxysubsubsection{\texorpdfstring{ParseAndUpdateBroadcast()}{ParseAndUpdateBroadcast()}}
{\footnotesize\ttfamily void Component\+::\+Parse\+And\+Update\+Broadcast (\begin{DoxyParamCaption}\item[{std\+::vector$<$ std\+::string $>$}]{broadcast\+List }\end{DoxyParamCaption})}

Communicate with other components. Removes previous broadcasts by this \doxylink{classComponent}{Component} and adds any new ones. Reads any relevant broadcasts from other Components.


\begin{DoxyParams}{Parameters}
{\em broadcast\+List} & the persistent list of broadcasts \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxylink{classComponent_a9c764c2a5607ef52629458d361ebf16e}{Update()} 
\end{DoxySeeAlso}
Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{d8/d6b/classComponent_aea8f0f460a62d86183020bd667b6cbf0_icgraph}
\end{center}
\end{figure}
\Hypertarget{classComponent_ab856bdb8c4357a080d7abcf99871a573}\label{classComponent_ab856bdb8c4357a080d7abcf99871a573} 
\index{Component@{Component}!Render@{Render}}
\index{Render@{Render}!Component@{Component}}
\doxysubsubsection{\texorpdfstring{Render()}{Render()}}
{\footnotesize\ttfamily void Component\+::\+Render (\begin{DoxyParamCaption}\item[{SDL\+\_\+\+Renderer $\ast$}]{ren }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}

Renders the component (if it has anything to render)


\begin{DoxyParams}{Parameters}
{\em ren} & the SDL renderer to be displayed upon \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxylink{classIGraphicsEngineRenderer}{IGraphics\+Engine\+Renderer} 
\end{DoxySeeAlso}


Reimplemented in \mbox{\hyperlink{classHealthComponent_a196e71923fbf5458a243846e5b71fa6f}{Health\+Component}}, \mbox{\hyperlink{classProjectileComponent_aee9362f7012bd2f0ca5088c63a175dd7}{Projectile\+Component}}, \mbox{\hyperlink{classSpriteComponent_a843ce3d3a2f37cce8ecc8418969b3607}{Sprite\+Component}}, \mbox{\hyperlink{classTileMapComponent_a76dc9312b1d3c4b0193598e55661749f}{Tile\+Map\+Component}}, and \mbox{\hyperlink{classTransformComponent_aedc094eb1922c3cfe116e6d67191400e}{Transform\+Component}}.

\Hypertarget{classComponent_a92af5bb942ea9633515a0c0e16a0bb8c}\label{classComponent_a92af5bb942ea9633515a0c0e16a0bb8c} 
\index{Component@{Component}!ShowComponentEditor@{ShowComponentEditor}}
\index{ShowComponentEditor@{ShowComponentEditor}!Component@{Component}}
\doxysubsubsection{\texorpdfstring{ShowComponentEditor()}{ShowComponentEditor()}}
{\footnotesize\ttfamily void Component\+::\+Show\+Component\+Editor (\begin{DoxyParamCaption}\item[{bool $\ast$}]{show\+Editor }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}

Using Imgui, render an editor for this component

\begin{DoxySeeAlso}{See also}
\doxylink{classGameMakerGUI_a2cc6da97c0f4b45175ddc9683308866e}{Game\+Maker\+GUI\+::\+Render\+Editor()} 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em show\+Editor} & \\
\hline
\end{DoxyParams}


Reimplemented in \mbox{\hyperlink{classControllerComponent_ac55c98ab7c759f014314998b9db372a4}{Controller\+Component}}, \mbox{\hyperlink{classHealthComponent_a8ee269e60d65fb673c09ed1678ee433d}{Health\+Component}}, \mbox{\hyperlink{classRigidbodyComponent_a397796f2f8deb197ee0f0d96eb6ba23d}{Rigidbody\+Component}}, \mbox{\hyperlink{classSpriteComponent_a574dfd6e371ececbcb9067a9d18453ea}{Sprite\+Component}}, \mbox{\hyperlink{classTileMapComponent_a93f28aae22fc29581cd56cc710760ce5}{Tile\+Map\+Component}}, and \mbox{\hyperlink{classTransformComponent_a2db75c6b70fcf13c086f02ac41953057}{Transform\+Component}}.

Here is the caller graph for this function\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{d8/d6b/classComponent_a92af5bb942ea9633515a0c0e16a0bb8c_icgraph}
\end{center}
\end{figure}
\Hypertarget{classComponent_a9c764c2a5607ef52629458d361ebf16e}\label{classComponent_a9c764c2a5607ef52629458d361ebf16e} 
\index{Component@{Component}!Update@{Update}}
\index{Update@{Update}!Component@{Component}}
\doxysubsubsection{\texorpdfstring{Update()}{Update()}}
{\footnotesize\ttfamily void Component\+::\+Update (\begin{DoxyParamCaption}\item[{SDL\+\_\+\+Event}]{e,  }\item[{int}]{frame,  }\item[{std\+::vector$<$ std\+::string $>$}]{broadcast\+List }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}

Updates the state of the component object. Called by the \doxylink{classEngine}{Engine} every tick


\begin{DoxyParams}{Parameters}
{\em e} & any inputs given by the user \\
\hline
{\em frame} & what frame is the game currently displaying \\
\hline
{\em broadcast\+List} & a list to be used to send messages between components \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxylink{classComponent_aea8f0f460a62d86183020bd667b6cbf0}{Parse\+And\+Update\+Broadcast()} 
\end{DoxySeeAlso}


Reimplemented in \mbox{\hyperlink{classControllerComponent_a15980f62cf3400a2829e78d6e0073ea1}{Controller\+Component}}, \mbox{\hyperlink{classProjectileComponent_a38c9c6161b276691004f672991795b54}{Projectile\+Component}}, \mbox{\hyperlink{classRigidbodyComponent_afc82759bee18cd1bd0cc90d7482307c1}{Rigidbody\+Component}}, \mbox{\hyperlink{classSpriteComponent_ae8f47512e84273fd8f5312920affb275}{Sprite\+Component}}, \mbox{\hyperlink{classTileMapComponent_a767f1d52ce56bde32a2366f18e6dcd50}{Tile\+Map\+Component}}, \mbox{\hyperlink{classTransformComponent_ae808ac3be0106babc97e92afb8f93a96}{Transform\+Component}}, and \mbox{\hyperlink{classHealthComponent_ab754979c3a0ac83d2fb7e163dd168d18}{Health\+Component}}.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
include/Component.\+hpp\item 
src/Component.\+cpp\end{DoxyCompactItemize}
