Skip to content

Commit 74345e2

Browse files
committed
deploy: 1ce42ea
1 parent 3adc233 commit 74345e2

20 files changed

+1541
-1465
lines changed

doxygen_crawl.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,13 +934,19 @@
934934
<a href="groups__mql5_8dox.html"/>
935935
<a href="index.html"/>
936936
<a href="index.html#config_sec"/>
937+
<a href="index.html#docs_sec"/>
937938
<a href="index.html#examples_sec"/>
938939
<a href="index.html#features_sec"/>
940+
<a href="index.html#install_pkg"/>
939941
<a href="index.html#install_sec"/>
942+
<a href="index.html#install_submodule"/>
943+
<a href="index.html#install_vcpkg"/>
940944
<a href="index.html#intro_sec"/>
945+
<a href="index.html#invariants_sec"/>
941946
<a href="index.html#license_sec"/>
942947
<a href="index.html#motivation_sec"/>
943948
<a href="index.html#repo_sec"/>
949+
<a href="index.html#tested_sec"/>
944950
<a href="initialization_8hpp.html"/>
945951
<a href="initialization_8hpp_source.html"/>
946952
<a href="initialization_8mqh.html"/>

index.html

Lines changed: 54 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ <h1><a class="anchor" id="config_sec"></a>
144144
<li><code>TIME_SHIELD_ENABLE_NTP_CLIENT</code> — builds the NTP client when set to <code>1</code>.</li>
145145
</ul>
146146
<p>All public symbols are declared inside the <code><a class="el" href="namespacetime__shield.html" title="Main namespace for the Time Shield library.">time_shield</a></code> namespace.</p>
147+
<h1><a class="anchor" id="invariants_sec"></a>
148+
API Invariants</h1>
149+
<ul>
150+
<li><code>ts_t</code> represents Unix time in seconds as a signed 64-bit integer with microsecond precision available through conversions.</li>
151+
<li><code>fts_t</code> stores time as double precision seconds; conversions maintain microsecond accuracy.</li>
152+
<li>ISO8601 parsing assumes the proleptic Gregorian calendar without leap seconds.</li>
153+
<li>Functions avoid throwing exceptions and use no dynamic memory internally; utilities returning <code>std::string</code> rely on the caller for allocations.</li>
154+
</ul>
147155
<h1><a class="anchor" id="examples_sec"></a>
148156
Examples</h1>
149157
<p>Here is a simple demonstration:</p>
@@ -186,23 +194,54 @@ <h1><a class="anchor" id="examples_sec"></a>
186194
</ul>
187195
<h1><a class="anchor" id="install_sec"></a>
188196
Installation</h1>
189-
<p>Time Shield is a header-only library. To use it in your C++ project:</p>
190-
<ul>
191-
<li>Add the <code>include/time_shield_cpp</code> folder to your project's include paths.</li>
192-
<li>Include the main header:</li>
193-
</ul>
194-
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="time__shield_8hpp.html">time_shield.hpp</a>&gt;</span></div>
195-
</div><!-- fragment --><p>No additional build steps or external dependencies are required.</p>
196-
<p>For MQL5/MetaTrader:</p>
197-
<ul>
198-
<li>Run <code>install_mql5.bat</code> to copy the necessary <code>.mqh</code> files to your MQL5 include directory.</li>
199-
<li>Include the main file in your MQL5 script:</li>
200-
</ul>
201-
<div class="fragment"><div class="line">#include &lt;TimeShield.mqh&gt;</div>
202-
</div><!-- fragment --><p>To build the C++ examples:</p>
197+
<h2><a class="anchor" id="install_pkg"></a>
198+
Install and <code>find_package</code></h2>
199+
<p>After installing the library (e.g., via <code>cmake --install</code>), locate it with <code>find_package</code>:</p>
200+
<div class="fragment"><div class="line">cmake_minimum_required(VERSION 3.18)</div>
201+
<div class="line">project(app LANGUAGES CXX)</div>
202+
<div class="line"> </div>
203+
<div class="line">find_package(TimeShield CONFIG REQUIRED)</div>
204+
<div class="line"> </div>
205+
<div class="line">add_executable(app main.cpp)</div>
206+
<div class="line">target_link_libraries(app PRIVATE time_shield::time_shield)</div>
207+
</div><!-- fragment --><h2><a class="anchor" id="install_submodule"></a>
208+
Git submodule with <code>add_subdirectory</code></h2>
209+
<p>Vendor the library as a submodule:</p>
210+
<div class="fragment"><div class="line">git submodule add https://github.com/NewYaroslav/time-shield-cpp external/time-shield-cpp</div>
211+
</div><!-- fragment --><p>Then include it:</p>
212+
<div class="fragment"><div class="line">add_subdirectory(external/time-shield-cpp)</div>
213+
<div class="line"> </div>
214+
<div class="line">add_executable(app main.cpp)</div>
215+
<div class="line">target_link_libraries(app PRIVATE time_shield::time_shield)</div>
216+
</div><!-- fragment --><h2><a class="anchor" id="install_vcpkg"></a>
217+
vcpkg overlay</h2>
218+
<p>Install via a local overlay port:</p>
219+
<div class="fragment"><div class="line">vcpkg install time-shield-cpp --overlay-ports=./vcpkg-overlay/ports</div>
220+
</div><!-- fragment --><p>Use the vcpkg toolchain when configuring CMake:</p>
221+
<div class="fragment"><div class="line">cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake</div>
222+
</div><!-- fragment --><p>The port is intended to be upstreamed to microsoft/vcpkg.</p>
223+
<p>For MQL5/MetaTrader, run <code>install_mql5.bat</code> to copy the <code>.mqh</code> files to your include directory.</p>
224+
<p>To build the C++ examples use the helper scripts:</p>
203225
<ul>
204-
<li>Run <code>build-examples.bat</code> to compile example programs with MSVC or your preferred toolchain.</li>
226+
<li><code>build-examples.bat</code> for Windows</li>
227+
<li><code>build_examples.sh</code> for Linux/macOS</li>
228+
<li><code>build-cb.bat</code> to generate a Code::Blocks project</li>
205229
</ul>
230+
<h1><a class="anchor" id="tested_sec"></a>
231+
Tested Platforms</h1>
232+
<table class="markdownTable">
233+
<tr class="markdownTableHead">
234+
<th class="markdownTableHeadNone">Platform </th><th class="markdownTableHeadNone">Compilers </th><th class="markdownTableHeadNone">C++ Standards </th></tr>
235+
<tr class="markdownTableRowOdd">
236+
<td class="markdownTableBodyNone">Windows </td><td class="markdownTableBodyNone">MSVC, ClangCL </td><td class="markdownTableBodyNone">11, 14, 17 </td></tr>
237+
<tr class="markdownTableRowEven">
238+
<td class="markdownTableBodyNone">Linux </td><td class="markdownTableBodyNone">GCC, Clang </td><td class="markdownTableBodyNone">11, 14, 17 </td></tr>
239+
<tr class="markdownTableRowOdd">
240+
<td class="markdownTableBodyNone">macOS </td><td class="markdownTableBodyNone">Apple Clang </td><td class="markdownTableBodyNone">11, 14, 17 </td></tr>
241+
</table>
242+
<h1><a class="anchor" id="docs_sec"></a>
243+
Online Documentation</h1>
244+
<p>The latest generated API reference is available at newyaroslav.github.io/time-shield-cpp.</p>
206245
<h1><a class="anchor" id="repo_sec"></a>
207246
Repository</h1>
208247
<p><a href="https://github.com/NewYaroslav/time-shield-cpp">Time Shield Library GitHub repository</a></p>

navtreedata.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,15 @@ var NAVTREE =
2929
[ "Why Time Shield?", "index.html#motivation_sec", null ],
3030
[ "Features", "index.html#features_sec", null ],
3131
[ "Configuration", "index.html#config_sec", null ],
32+
[ "API Invariants", "index.html#invariants_sec", null ],
3233
[ "Examples", "index.html#examples_sec", null ],
33-
[ "Installation", "index.html#install_sec", null ],
34+
[ "Installation", "index.html#install_sec", [
35+
[ "Install and find_package", "index.html#install_pkg", null ],
36+
[ "Git submodule with add_subdirectory", "index.html#install_submodule", null ],
37+
[ "vcpkg overlay", "index.html#install_vcpkg", null ]
38+
] ],
39+
[ "Tested Platforms", "index.html#tested_sec", null ],
40+
[ "Online Documentation", "index.html#docs_sec", null ],
3441
[ "Repository", "index.html#repo_sec", null ],
3542
[ "License", "index.html#license_sec", null ],
3643
[ "Topics", "topics.html", "topics" ],
@@ -71,7 +78,7 @@ var NAVTREEINDEX =
7178
"group__time__conversions.html#ga921fb410961c8321bd21b83a5569c8d4",
7279
"group__time__enums.html#gga5fa51beb76e014adfffcd028fe1804aca44f6ae61dc2e43df007f846b8ea4acf9",
7380
"group__time__structures.html#ga1721af7fc3d8b705db317fd69c4c520e",
74-
"time__utils_8hpp_source.html"
81+
"time__shield_8hpp_source.html"
7582
];
7683

7784
var SYNCONMSG = 'click to disable panel synchronization';

0 commit comments

Comments
 (0)