-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Version 5.0.0 release
- Loading branch information
Showing
1,004 changed files
with
123,901 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<!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.15"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
<title>reVision: src/Managers/AssetManager.h 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">reVision | ||
 <span id="projectnumber">5.0.0</span> | ||
</div> | ||
<div id="projectbrief">Video game engine project.</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<!-- end header part --> | ||
<!-- Generated by Doxygen 1.8.15 --> | ||
<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_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_d71c2fe00ed3b147a8f961a1bf80b6a4.html">Managers</a></li> </ul> | ||
</div> | ||
</div><!-- top --> | ||
<div class="header"> | ||
<div class="headertitle"> | ||
<div class="title">AssetManager.h</div> </div> | ||
</div><!--header--> | ||
<div class="contents"> | ||
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#ifndef ASSETMANAGER_H</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="preprocessor">#define ASSETMANAGER_H</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">#include "Assets/Asset.h"</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include "Utilities/MappedChar.h"</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include <deque></span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include <shared_mutex></span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</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> constexpr <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> ASSETMANAGER_MAX_THREADS = 8u;</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="keyword">using</span> Asset_Work_Order = std::function<void(<span class="keywordtype">void</span>)>;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> </div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="class_asset_manager.html"> 15</a></span> <span class="keyword">class </span><a class="code" href="class_asset_manager.html">AssetManager</a> {</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>  <span class="comment">// Public Methods</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"></span> [[nodiscard]] Shared_Asset <a class="code" href="class_asset_manager.html#adc2ee6a064cdfc0bf56b1619af71c953">shareAsset</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* assetType, <span class="keyword">const</span> std::string& filename, <span class="keyword">const</span> std::function<Shared_Asset(<span class="keywordtype">void</span>)>& constructor, <span class="keyword">const</span> <span class="keywordtype">bool</span>& threaded);</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  <span class="keywordtype">void</span> <a class="code" href="class_asset_manager.html#ad0e3cc8f6d3c695e07b9c01025a86312">beginWorkOrder</a>();</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="keywordtype">void</span> <a class="code" href="class_asset_manager.html#ad125a95ba65885b8d0eba81946aea30f">submitNotifyee</a>(<span class="keyword">const</span> std::pair<std::shared_ptr<bool>, std::function<<span class="keywordtype">void</span>()>>& callBack);</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="keywordtype">void</span> <a class="code" href="class_asset_manager.html#a544e2aa8b646452f304a7a87df4f6a29">notifyObservers</a>();</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordtype">bool</span> <a class="code" href="class_asset_manager.html#ad72d1ad886de2d65a31692396d6edcb7">readyToUse</a>();</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keywordtype">bool</span> <a class="code" href="class_asset_manager.html#a349d0ff98a845102f28e9e0ad3de0cb0">hasChanged</a>();</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="comment">// Private Attributes</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  std::shared_mutex m_mutexAssets;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <a class="code" href="class_vector_map.html">VectorMap<Shared_Asset></a> m_assetMap;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  std::shared_mutex m_mutexWorkorders;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  std::deque<Asset_Work_Order> m_workOrders;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> </div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  std::shared_mutex m_mutexNofications;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  std::vector<std::pair<std::shared_ptr<bool>, std::function<void()>>> m_notifyees;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordtype">bool</span> m_changed = <span class="keyword">true</span>;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> };</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="preprocessor">#endif // ASSETMANAGER_H</span></div><div class="ttc" id="class_asset_manager_html_ad0e3cc8f6d3c695e07b9c01025a86312"><div class="ttname"><a href="class_asset_manager.html#ad0e3cc8f6d3c695e07b9c01025a86312">AssetManager::beginWorkOrder</a></div><div class="ttdeci">void beginWorkOrder()</div><div class="ttdoc">Pop's the first work order and completes it.</div><div class="ttdef"><b>Definition:</b> AssetManager.cpp:42</div></div> | ||
<div class="ttc" id="class_asset_manager_html_a349d0ff98a845102f28e9e0ad3de0cb0"><div class="ttname"><a href="class_asset_manager.html#a349d0ff98a845102f28e9e0ad3de0cb0">AssetManager::hasChanged</a></div><div class="ttdeci">bool hasChanged()</div><div class="ttdoc">Retrieves whether or not any changes have occurred to this manager since the last check.</div><div class="ttdef"><b>Definition:</b> AssetManager.cpp:95</div></div> | ||
<div class="ttc" id="class_vector_map_html"><div class="ttname"><a href="class_vector_map.html">VectorMap< Shared_Asset ></a></div></div> | ||
<div class="ttc" id="class_asset_manager_html_ad72d1ad886de2d65a31692396d6edcb7"><div class="ttname"><a href="class_asset_manager.html#ad72d1ad886de2d65a31692396d6edcb7">AssetManager::readyToUse</a></div><div class="ttdeci">bool readyToUse()</div><div class="ttdoc">Retrieves whether or not this manager is ready to use.</div><div class="ttdef"><b>Definition:</b> AssetManager.cpp:78</div></div> | ||
<div class="ttc" id="class_asset_manager_html_ad125a95ba65885b8d0eba81946aea30f"><div class="ttname"><a href="class_asset_manager.html#ad125a95ba65885b8d0eba81946aea30f">AssetManager::submitNotifyee</a></div><div class="ttdeci">void submitNotifyee(const std::pair< std::shared_ptr< bool >, std::function< void()>> &callBack)</div><div class="ttdoc">Forwards an asset-is-finalized notification request, which will be activated from the main thread.</div><div class="ttdef"><b>Definition:</b> AssetManager.cpp:58</div></div> | ||
<div class="ttc" id="class_asset_manager_html_a544e2aa8b646452f304a7a87df4f6a29"><div class="ttname"><a href="class_asset_manager.html#a544e2aa8b646452f304a7a87df4f6a29">AssetManager::notifyObservers</a></div><div class="ttdeci">void notifyObservers()</div><div class="ttdoc">From the main thread, calls all notification calls (for completed asset loading).</div><div class="ttdef"><b>Definition:</b> AssetManager.cpp:65</div></div> | ||
<div class="ttc" id="class_asset_manager_html_adc2ee6a064cdfc0bf56b1619af71c953"><div class="ttname"><a href="class_asset_manager.html#adc2ee6a064cdfc0bf56b1619af71c953">AssetManager::shareAsset</a></div><div class="ttdeci">Shared_Asset shareAsset(const char *assetType, const std::string &filename, const std::function< Shared_Asset(void)> &constructor, const bool &threaded)</div><div class="ttdoc">Checks if an asset already exists with the given filename, fetching if true.</div><div class="ttdef"><b>Definition:</b> AssetManager.cpp:7</div></div> | ||
<div class="ttc" id="class_asset_manager_html"><div class="ttname"><a href="class_asset_manager.html">AssetManager</a></div><div class="ttdoc">Manages the storage and retrieval of assets.</div><div class="ttdef"><b>Definition:</b> AssetManager.h:15</div></div> | ||
</div><!-- fragment --></div><!-- contents --> | ||
<!-- 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.15 | ||
</small></address> | ||
</body> | ||
</html> |
Oops, something went wrong.