Skip to content

Commit

Permalink
version 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
archibalduk committed Jun 22, 2024
1 parent fc4beb9 commit 197b78a
Show file tree
Hide file tree
Showing 108 changed files with 3,393 additions and 866 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# EHM DAL: A data abstraction layer for Eastside Hockey Manager 1
![GitHub last commit](https://img.shields.io/github/last-commit/archibalduk/EHM_DAL?style=flat-square) ![GitHub](https://img.shields.io/github/license/archibalduk/EHM_DAL?style=flat-square) ![GitHub top language](https://img.shields.io/github/languages/top/archibalduk/EHM_DAL?style=flat-square)
![GitHub tag](https://img.shields.io/github/v/tag/archibalduk/EHM_DAL) ![GitHub last commit](https://img.shields.io/github/last-commit/archibalduk/EHM_DAL?style=flat-square) ![GitHub](https://img.shields.io/github/license/archibalduk/EHM_DAL?style=flat-square) ![GitHub top language](https://img.shields.io/github/languages/top/archibalduk/EHM_DAL?style=flat-square)

EHM DAL is an unofficial data abstraction layer for Eastside Hockey Manger 1 databases and saved games which you can integrate into your own Qt/C++ projects. EHM DAL provides a library of functions which enable an EHM database or saved game to be loaded and parsed without needing to code any of your own file i/o functions or any database structures. Parsing a database or saved game is as simple as integrating the EHM DAL library into your Qt/C++ project and then adding the following code:

```
// The following code will open and process a database
auto db{ehm_dal::Database()};
db.read("C:\\Program Files (x86)\\Steam\\steamapps\\common\\Eastside Hockey Manager\\data\\database\\database.db");
auto db_manager{ehm_dal::file_io::DatabaseFileManager()};
db_manager.read("C:\\Program Files (x86)\\Steam\\steamapps\\common\\Eastside Hockey Manager\\data\\database\\database.db");
// The following code will open and process a saved game
auto sav{ehm_dal::SavedGame()};
sav.read("C:\\Users\\archibalduk\\Documents\\Sports Interactive\\EHM\\games\\Test.sav");
auto sav_manager{ehm_dal::file_io::SavedGameFileManager()};
sav_manager.read("C:\\Users\\archibalduk\\Documents\\Sports Interactive\\EHM\\games\\Test.sav");
```

EHM DAL's database table classes inherit from [QAbstractTableModel](https://doc.qt.io/qt-6/qabstracttablemodel.html) and are therefore compatible [Qt's model/view architecture](https://doc.qt.io/qt-6/model-view-programming.html). This means that database tables can be easily assigned to Qt's view widgets such as [QTableView](https://doc.qt.io/qt-6/qtableview.html).
Expand All @@ -35,7 +35,7 @@ Data can be accessed using [QModelIndex](https://doc.qt.io/qt-6/qmodelindex.html
3. Few details of EHM saved game tables are known and will therefore require the user to figure out the structure and implement their own code.

## System Requirements
* [Qt 6.7.1](https://www.qt.io/download-open-source) (or higher) (msvc 2019 build or higher)
* [Qt 6.7.2](https://www.qt.io/download-open-source) (or higher) (msvc 2019 build or higher)
* [Microsoft Visual Studio 2022](https://visualstudio.microsoft.com/vs/community/) or [Microsoft Visual Studio Build Tools 2022](https://visualstudio.microsoft.com/downloads/?q=build+tools#build-tools-for-visual-studio-2022)

## Author
Expand Down
1 change: 1 addition & 0 deletions docs/annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
<tr id="row_0_4_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_4_" class="arrow" onclick="toggleFolder('0_4_')">&#9658;</span><span class="icona"><span class="icon">N</span></span><b>file_io</b></td><td class="desc"></td></tr>
<tr id="row_0_4_0_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classehm__dal_1_1file__io_1_1_abstract_file_manager.html" target="_self">AbstractFileManager</a></td><td class="desc">Base class providing simple read and write file access to database and saved game files </td></tr>
<tr id="row_0_4_1_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classehm__dal_1_1file__io_1_1_database_file_manager.html" target="_self">DatabaseFileManager</a></td><td class="desc">Simple read and write access to a database </td></tr>
<tr id="row_0_4_2_" class="even" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classehm__dal_1_1file__io_1_1_saved_game_file_manager.html" target="_self">SavedGameFileManager</a></td><td class="desc"></td></tr>
<tr id="row_0_5_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_5_" class="arrow" onclick="toggleFolder('0_5_')">&#9658;</span><span class="icona"><span class="icon">N</span></span><b>flags</b></td><td class="desc"></td></tr>
<tr id="row_0_5_0_" class="odd" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classehm__dal_1_1flags_1_1_flag.html" target="_self">Flag</a></td><td class="desc"></td></tr>
<tr id="row_0_5_1_" class="odd" style="display:none;"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classehm__dal_1_1flags_1_1_flag_database.html" target="_self">FlagDatabase</a></td><td class="desc"></td></tr>
Expand Down
3 changes: 2 additions & 1 deletion docs/annotated_dup.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ var annotated_dup =
] ],
[ "file_io", null, [
[ "AbstractFileManager", "classehm__dal_1_1file__io_1_1_abstract_file_manager.html", "classehm__dal_1_1file__io_1_1_abstract_file_manager" ],
[ "DatabaseFileManager", "classehm__dal_1_1file__io_1_1_database_file_manager.html", "classehm__dal_1_1file__io_1_1_database_file_manager" ]
[ "DatabaseFileManager", "classehm__dal_1_1file__io_1_1_database_file_manager.html", "classehm__dal_1_1file__io_1_1_database_file_manager" ],
[ "SavedGameFileManager", "classehm__dal_1_1file__io_1_1_saved_game_file_manager.html", "classehm__dal_1_1file__io_1_1_saved_game_file_manager" ]
] ],
[ "flags", null, [
[ "Flag", "classehm__dal_1_1flags_1_1_flag.html", null ],
Expand Down
9 changes: 5 additions & 4 deletions docs/classehm__dal_1_1_saved_game-members.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@

<p>This is the complete list of members for <a class="el" href="classehm__dal_1_1_saved_game.html">ehm_dal::SavedGame</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html#a8b9b7d58e754b8dfc81d4989018d5dfc">data</a>()</td><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html">ehm_dal::SavedGame</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html#a155a1f76185f19fc60cc50fbb9451582">read</a>(const QString &amp;file_path)</td><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html">ehm_dal::SavedGame</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html#a08b047bbf3ecb95f8aac9e6a93044e65">SavedGame</a>()</td><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html">ehm_dal::SavedGame</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html#aa43dfcf7aae0a5c538b7a8ecd151eb3a">~SavedGame</a>()</td><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html">ehm_dal::SavedGame</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html#a6e6873e437990371b3d6c493f73e12f0">clearAll</a>()</td><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html">ehm_dal::SavedGame</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html#a8b9b7d58e754b8dfc81d4989018d5dfc">data</a>()</td><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html">ehm_dal::SavedGame</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html#a155a1f76185f19fc60cc50fbb9451582">read</a>(const QString &amp;file_path)</td><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html">ehm_dal::SavedGame</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html#a08b047bbf3ecb95f8aac9e6a93044e65">SavedGame</a>()</td><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html">ehm_dal::SavedGame</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html#aa43dfcf7aae0a5c538b7a8ecd151eb3a">~SavedGame</a>()</td><td class="entry"><a class="el" href="classehm__dal_1_1_saved_game.html">ehm_dal::SavedGame</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
Expand Down
4 changes: 4 additions & 0 deletions docs/classehm__dal_1_1_saved_game.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
&#160;</td><td class="memItemRight" valign="bottom"><b>~SavedGame</b> ()</td></tr>
<tr class="memdesc:aa43dfcf7aae0a5c538b7a8ecd151eb3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor. <br /></td></tr>
<tr class="separator:aa43dfcf7aae0a5c538b7a8ecd151eb3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e6873e437990371b3d6c493f73e12f0"><td class="memItemLeft" align="right" valign="top"><a id="a6e6873e437990371b3d6c493f73e12f0" name="a6e6873e437990371b3d6c493f73e12f0"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>clearAll</b> ()</td></tr>
<tr class="memdesc:a6e6873e437990371b3d6c493f73e12f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear all of the saved game tables. <br /></td></tr>
<tr class="separator:a6e6873e437990371b3d6c493f73e12f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a155a1f76185f19fc60cc50fbb9451582"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classehm__dal_1_1_saved_game.html#a155a1f76185f19fc60cc50fbb9451582">read</a> (const QString &amp;file_path)</td></tr>
<tr class="memdesc:a155a1f76185f19fc60cc50fbb9451582"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the .sav file at <code>file_path</code> and parses the saved game and the <a class="el" href="classehm__dal_1_1_database.html" title="The Database class parses the database.db file and provides access to its tables.">Database</a> within. <br /></td></tr>
<tr class="separator:a155a1f76185f19fc60cc50fbb9451582"><td class="memSeparator" colspan="2">&#160;</td></tr>
Expand Down
1 change: 1 addition & 0 deletions docs/classehm__dal_1_1_saved_game.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var classehm__dal_1_1_saved_game =
[
[ "SavedGame", "classehm__dal_1_1_saved_game.html#a08b047bbf3ecb95f8aac9e6a93044e65", null ],
[ "~SavedGame", "classehm__dal_1_1_saved_game.html#aa43dfcf7aae0a5c538b7a8ecd151eb3a", null ],
[ "clearAll", "classehm__dal_1_1_saved_game.html#a6e6873e437990371b3d6c493f73e12f0", null ],
[ "data", "classehm__dal_1_1_saved_game.html#a8b9b7d58e754b8dfc81d4989018d5dfc", null ],
[ "read", "classehm__dal_1_1_saved_game.html#a155a1f76185f19fc60cc50fbb9451582", null ]
];
7 changes: 4 additions & 3 deletions docs/classehm__dal_1_1file__io_1_1_abstract_file_manager.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@
<div class="dyncontent">
<div class="center"><img src="classehm__dal_1_1file__io_1_1_abstract_file_manager__inherit__graph.png" border="0" usemap="#aehm__dal_1_1file__io_1_1_abstract_file_manager_inherit__map" alt="Inheritance graph"/></div>
<map name="aehm__dal_1_1file__io_1_1_abstract_file_manager_inherit__map" id="aehm__dal_1_1file__io_1_1_abstract_file_manager_inherit__map">
<area shape="rect" title="The AbstractFileManager class is a base class providing simple read and write file access to database..." alt="" coords="8,5,177,45"/>
<area shape="rect" title="The AbstractFileManager class is a base class providing simple read and write file access to database..." alt="" coords="111,5,280,45"/>
<area shape="rect" href="classehm__dal_1_1file__io_1_1_database_file_manager.html" title="The DatabaseFileManager class provides simple read and write access to a database." alt="" coords="5,93,180,133"/>
<area shape="rect" href="classehm__dal_1_1file__io_1_1_saved_game_file_manager.html" title=" " alt="" coords="204,93,395,133"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
Expand Down Expand Up @@ -212,7 +213,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a54829b45f5c07b21a37658c0

<p>Returns the file manager descriptor. E.g. This will return "database" for a database file manager. </p>

<p>Implemented in <a class="el" href="classehm__dal_1_1file__io_1_1_database_file_manager.html#af4de3105686b08b44e1765654b13715c">ehm_dal::file_io::DatabaseFileManager</a>.</p>
<p>Implemented in <a class="el" href="classehm__dal_1_1file__io_1_1_database_file_manager.html#af4de3105686b08b44e1765654b13715c">ehm_dal::file_io::DatabaseFileManager</a>, and <a class="el" href="classehm__dal_1_1file__io_1_1_saved_game_file_manager.html#a2a7cc73dc8c71360c5e701143ca47bdc">ehm_dal::file_io::SavedGameFileManager</a>.</p>

</div>
</div>
Expand Down Expand Up @@ -241,7 +242,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#ada0b092147c764cf3621a8ab

<p>Returns a list of supported file type filters for <code>QFileDialog</code>. </p>

<p>Implemented in <a class="el" href="classehm__dal_1_1file__io_1_1_database_file_manager.html#a8546901b3efc822af68451756f869819">ehm_dal::file_io::DatabaseFileManager</a>.</p>
<p>Implemented in <a class="el" href="classehm__dal_1_1file__io_1_1_database_file_manager.html#a8546901b3efc822af68451756f869819">ehm_dal::file_io::DatabaseFileManager</a>, and <a class="el" href="classehm__dal_1_1file__io_1_1_saved_game_file_manager.html#a1810a7ca435099e88625f2e9187406e3">ehm_dal::file_io::SavedGameFileManager</a>.</p>

</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<map id="ehm_dal::file_io::AbstractFileManager" name="ehm_dal::file_io::AbstractFileManager">
<area shape="rect" id="node1" title="The AbstractFileManager class is a base class providing simple read and write file access to database..." alt="" coords="8,5,177,45"/>
<area shape="rect" id="node1" title="The AbstractFileManager class is a base class providing simple read and write file access to database..." alt="" coords="111,5,280,45"/>
<area shape="rect" id="node2" href="$classehm__dal_1_1file__io_1_1_database_file_manager.html" title="The DatabaseFileManager class provides simple read and write access to a database." alt="" coords="5,93,180,133"/>
<area shape="rect" id="node3" href="$classehm__dal_1_1file__io_1_1_saved_game_file_manager.html" title=" " alt="" coords="204,93,395,133"/>
</map>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6f5f21c2976248927571575e2503c81b
60b65e7f7ad559fdec7305ae56967dc9
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 197b78a

Please sign in to comment.