mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-04 02:36:31 +00:00
127 lines
14 KiB
HTML
127 lines
14 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.17"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Bomberman: sources/System/Event/EventSystem.hpp Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Bomberman
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.17 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_08d237fc27d4ecd563f71c5d52f2fecc.html">sources</a></li><li class="navelem"><a class="el" href="dir_dbff9d19e82c23288cf26fa638b485e8.html">System</a></li><li class="navelem"><a class="el" href="dir_05ee5a4d406e98379bcf64c7739332c4.html">Event</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">EventSystem.hpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="EventSystem_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// Created by Zoe Roux on 6/1/21.</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>  </div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#pragma once</span></div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>  </div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include <<a class="code" href="System_8hpp.html">System/System.hpp</a>></span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include <vector></span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#include <functional></span></div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>  </div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="keyword">namespace </span><a class="code" href="namespaceBBM.html">BBM</a></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> {</div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="classBBM_1_1EventSystem.html"> 13</a></span>  <span class="keyword">class </span><a class="code" href="classBBM_1_1EventSystem.html">EventSystem</a> : <span class="keyword">public</span> <a class="code" href="classWAL_1_1System.html">WAL::System</a><></div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  {</div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="classBBM_1_1EventSystem.html#a711a6c41488047e4b74cda672b3a9fe1"> 17</a></span>  std::list<std::function<void (<a class="code" href="classWAL_1_1Entity.html">WAL::Entity</a> &)>> <a class="code" href="classBBM_1_1EventSystem.html#a711a6c41488047e4b74cda672b3a9fe1">_events</a>;</div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="classBBM_1_1EventSystem.html#acabb2810dc9e40330874a5abc3c87a3c"> 19</a></span>  std::list<std::function<void (<a class="code" href="classWAL_1_1Wal.html">WAL::Wal</a> &)>> <a class="code" href="classBBM_1_1EventSystem.html#acabb2810dc9e40330874a5abc3c87a3c">_globalEvents</a>;</div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <span class="keywordtype">void</span> <a class="code" href="classBBM_1_1EventSystem.html#ad1c707556366c47fe3619dcbb0d46dc5">dispatchEvent</a>(<span class="keyword">const</span> std::function<<span class="keywordtype">void</span> (<a class="code" href="classWAL_1_1Entity.html">WAL::Entity</a> &)>& event);</div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  </div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  <span class="keywordtype">void</span> <a class="code" href="classBBM_1_1EventSystem.html#ad1c707556366c47fe3619dcbb0d46dc5">dispatchEvent</a>(<span class="keyword">const</span> std::function<<span class="keywordtype">void</span> (<a class="code" href="classWAL_1_1Wal.html">WAL::Wal</a> &)>& event);</div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  </div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="keywordtype">void</span> <a class="code" href="classBBM_1_1EventSystem.html#aa5e3d7591f5a7d3b42857b24c726bb82">onUpdate</a>(<a class="code" href="classWAL_1_1ViewEntity.html">WAL::ViewEntity<></a> &entity, std::chrono::nanoseconds dtime) <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="keywordtype">void</span> <a class="code" href="classBBM_1_1EventSystem.html#aa538b4d3ed1cc6b4865df3ad61295c49">onSelfUpdate</a>(std::chrono::nanoseconds dtime) <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  </div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keyword">explicit</span> <a class="code" href="classBBM_1_1EventSystem.html#ae7fe6f2cfb1b2fdf5e58378c6e4f1af0">EventSystem</a>(<a class="code" href="classWAL_1_1Wal.html">WAL::Wal</a> &wal);</div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <a class="code" href="classBBM_1_1EventSystem.html#ae7fe6f2cfb1b2fdf5e58378c6e4f1af0">EventSystem</a>(<span class="keyword">const</span> <a class="code" href="classBBM_1_1EventSystem.html">EventSystem</a> &) = <span class="keywordflow">default</span>;</div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="classBBM_1_1EventSystem.html#a968c907153d98370e7184a4453b0967d">~EventSystem</a>() <span class="keyword">override</span> = <span class="keywordflow">default</span>;</div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <a class="code" href="classBBM_1_1EventSystem.html">EventSystem</a> &<a class="code" href="classBBM_1_1EventSystem.html#a93c4ef606fb52f9412c503dcce953ecd">operator=</a>(<span class="keyword">const</span> <a class="code" href="classBBM_1_1EventSystem.html">EventSystem</a> &) = <span class="keyword">delete</span>;</div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  };</div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> }</div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<div class="ttc" id="aclassBBM_1_1EventSystem_html_acabb2810dc9e40330874a5abc3c87a3c"><div class="ttname"><a href="classBBM_1_1EventSystem.html#acabb2810dc9e40330874a5abc3c87a3c">BBM::EventSystem::_globalEvents</a></div><div class="ttdeci">std::list< std::function< void(WAL::Wal &)> > _globalEvents</div><div class="ttdoc">The list of events that occurred in the last update.</div><div class="ttdef"><b>Definition:</b> EventSystem.hpp:19</div></div>
|
|
<div class="ttc" id="aclassWAL_1_1ViewEntity_html"><div class="ttname"><a href="classWAL_1_1ViewEntity.html">WAL::ViewEntity</a></div><div class="ttdef"><b>Definition:</b> View.hpp:19</div></div>
|
|
<div class="ttc" id="aSystem_8hpp_html"><div class="ttname"><a href="System_8hpp.html">System.hpp</a></div></div>
|
|
<div class="ttc" id="anamespaceBBM_html"><div class="ttname"><a href="namespaceBBM.html">BBM</a></div><div class="ttdef"><b>Definition:</b> AnimationsComponent.cpp:9</div></div>
|
|
<div class="ttc" id="aclassWAL_1_1Wal_html"><div class="ttname"><a href="classWAL_1_1Wal.html">WAL::Wal</a></div><div class="ttdoc">The main WAL class, it is used to setup and run the ECS.</div><div class="ttdef"><b>Definition:</b> Wal.hpp:27</div></div>
|
|
<div class="ttc" id="aclassWAL_1_1Entity_html"><div class="ttname"><a href="classWAL_1_1Entity.html">WAL::Entity</a></div><div class="ttdoc">An entity of the WAL's ECS.</div><div class="ttdef"><b>Definition:</b> Entity.hpp:20</div></div>
|
|
<div class="ttc" id="aclassBBM_1_1EventSystem_html_aa538b4d3ed1cc6b4865df3ad61295c49"><div class="ttname"><a href="classBBM_1_1EventSystem.html#aa538b4d3ed1cc6b4865df3ad61295c49">BBM::EventSystem::onSelfUpdate</a></div><div class="ttdeci">void onSelfUpdate(std::chrono::nanoseconds dtime) override</div><div class="ttdoc">A method called after all entities that this system manage has been updated.</div><div class="ttdef"><b>Definition:</b> EventSystem.cpp:29</div></div>
|
|
<div class="ttc" id="aclassBBM_1_1EventSystem_html_ae7fe6f2cfb1b2fdf5e58378c6e4f1af0"><div class="ttname"><a href="classBBM_1_1EventSystem.html#ae7fe6f2cfb1b2fdf5e58378c6e4f1af0">BBM::EventSystem::EventSystem</a></div><div class="ttdeci">EventSystem(WAL::Wal &wal)</div><div class="ttdoc">A default constructor.</div><div class="ttdef"><b>Definition:</b> EventSystem.cpp:9</div></div>
|
|
<div class="ttc" id="aclassBBM_1_1EventSystem_html_a93c4ef606fb52f9412c503dcce953ecd"><div class="ttname"><a href="classBBM_1_1EventSystem.html#a93c4ef606fb52f9412c503dcce953ecd">BBM::EventSystem::operator=</a></div><div class="ttdeci">EventSystem & operator=(const EventSystem &)=delete</div><div class="ttdoc">An event system is not assignable.</div></div>
|
|
<div class="ttc" id="aclassWAL_1_1System_html"><div class="ttname"><a href="classWAL_1_1System.html">WAL::System</a></div><div class="ttdoc">A base system of WAL.</div><div class="ttdef"><b>Definition:</b> System.hpp:22</div></div>
|
|
<div class="ttc" id="aclassBBM_1_1EventSystem_html_a968c907153d98370e7184a4453b0967d"><div class="ttname"><a href="classBBM_1_1EventSystem.html#a968c907153d98370e7184a4453b0967d">BBM::EventSystem::~EventSystem</a></div><div class="ttdeci">~EventSystem() override=default</div><div class="ttdoc">A default destructor.</div></div>
|
|
<div class="ttc" id="aclassBBM_1_1EventSystem_html_a711a6c41488047e4b74cda672b3a9fe1"><div class="ttname"><a href="classBBM_1_1EventSystem.html#a711a6c41488047e4b74cda672b3a9fe1">BBM::EventSystem::_events</a></div><div class="ttdeci">std::list< std::function< void(WAL::Entity &)> > _events</div><div class="ttdoc">The list of events that occurred in the last update.</div><div class="ttdef"><b>Definition:</b> EventSystem.hpp:17</div></div>
|
|
<div class="ttc" id="aclassBBM_1_1EventSystem_html_ad1c707556366c47fe3619dcbb0d46dc5"><div class="ttname"><a href="classBBM_1_1EventSystem.html#ad1c707556366c47fe3619dcbb0d46dc5">BBM::EventSystem::dispatchEvent</a></div><div class="ttdeci">void dispatchEvent(const std::function< void(WAL::Entity &)> &event)</div><div class="ttdoc">Inform the system that a new event has occurred and it should run the given method on every entities.</div><div class="ttdef"><b>Definition:</b> EventSystem.cpp:13</div></div>
|
|
<div class="ttc" id="aclassBBM_1_1EventSystem_html"><div class="ttname"><a href="classBBM_1_1EventSystem.html">BBM::EventSystem</a></div><div class="ttdef"><b>Definition:</b> EventSystem.hpp:13</div></div>
|
|
<div class="ttc" id="aclassBBM_1_1EventSystem_html_aa5e3d7591f5a7d3b42857b24c726bb82"><div class="ttname"><a href="classBBM_1_1EventSystem.html#aa5e3d7591f5a7d3b42857b24c726bb82">BBM::EventSystem::onUpdate</a></div><div class="ttdeci">void onUpdate(WAL::ViewEntity<> &entity, std::chrono::nanoseconds dtime) override</div><div class="ttdef"><b>Definition:</b> EventSystem.cpp:23</div></div>
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.17
|
|
</small></address>
|
|
</body>
|
|
</html>
|