aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-06-04 11:51:31 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2023-06-04 11:51:31 +0200
commit40f0d247905003af19933dc48738657cbc2c0c72 (patch)
tree06266c99bf1ad73832b0d04708e3fe14a560e755 /src
parentdf24fb019f144493a99baaaf49c093874611ddf4 (diff)
Improve documentation
Diffstat (limited to 'src')
-rw-r--r--src/binres/binres.hpp3
-rw-r--r--src/game_tab/HalfMove.hpp21
-rw-r--r--src/game_tab/right_panel/LiveEngineDialog.hpp24
3 files changed, 41 insertions, 7 deletions
diff --git a/src/binres/binres.hpp b/src/binres/binres.hpp
index cf48c14..2fd00e8 100644
--- a/src/binres/binres.hpp
+++ b/src/binres/binres.hpp
@@ -6,7 +6,6 @@
* @date 2023-05-12
*
* @copyright Copyright (c) 2023
- *
*/
#pragma once
@@ -19,6 +18,7 @@
* @param icon The icon name
* @param size Scale the icon to the specified size
* @return wxBitmap
+ * @ingroup binres
*/
wxBitmap LoadPNG(std::string icon, wxSize size);
@@ -27,6 +27,7 @@ wxBitmap LoadPNG(std::string icon, wxSize size);
*
* @param icon
* @return wxBitmap the image or wxNullBitmap if not found
+ * @ingroup binres
*/
wxBitmap LoadPNG(std::string icon);
diff --git a/src/game_tab/HalfMove.hpp b/src/game_tab/HalfMove.hpp
index eefee21..36b9888 100644
--- a/src/game_tab/HalfMove.hpp
+++ b/src/game_tab/HalfMove.hpp
@@ -27,11 +27,30 @@ public:
HalfMove(std::string move_absolute,std::string move_san, std::string fen);
HalfMove(CMI::HalfMove *m);
+ /**
+ * @brief Add mainline to the current move.
+ * If a mainline already exists, add to its variations
+ *
+ * @param m the move to add
+ */
void AddMove(HalfMove *m);
/// @brief Check if current half move is within a variation
bool IsVariation();
- /// @brief Get the root of a variation
+ /**
+ * @brief Check if pointer @a m to a HalfMove is a parent of the current one
+ *
+ * @param m
+ * @return true
+ * @return false
+ */
bool HasParent(HalfMove*m);
+ /**
+ * @brief Check if a given pointer @a m to a HalfMove is in mainline or variations of the current move.
+ *
+ * @param m
+ * @return true
+ * @return false
+ */
bool HasChild(HalfMove*m);
/// @brief Retrieve the list of moves from the current one to the first one
std::vector<HalfMove *> GetLine();
diff --git a/src/game_tab/right_panel/LiveEngineDialog.hpp b/src/game_tab/right_panel/LiveEngineDialog.hpp
index 8975ed2..d0c6c51 100644
--- a/src/game_tab/right_panel/LiveEngineDialog.hpp
+++ b/src/game_tab/right_panel/LiveEngineDialog.hpp
@@ -26,15 +26,29 @@ class LiveEngineDialog : public DialogLiveEngine {
wxTimer timer;
/// @brief The following time interval definitely need to be configure in the user settings (set to 1s for now)
std::uint32_t interval;
-
+ /**
+ * @brief Called to fetch last evaluation from the engine subprocess (stockfish, fritz etc.)
+ *
+ * @param event
+ */
+ void OnTimerTick(wxTimerEvent &event);
+ void OnClose(wxCloseEvent &e);
+ /**
+ * @brief Create the engine sub process using the uciadapter library
+ *
+ */
+ void InitEngine();
+ /// @brief Pause/Resume evaluation
+ void TogglePauseEngine(wxCommandEvent &event);
public:
LiveEngineDialog(wxWindow *parent, std::uint32_t engine_id);
~LiveEngineDialog();
- void InitEngine();
- void TogglePauseEngine(wxCommandEvent &event);
- void OnTimerTick(wxTimerEvent &event);
+ /**
+ * @brief Used setup a new position to evaluate
+ *
+ * @param fen position to evaluate
+ */
void SetFEN(std::string fen);
void StopEngine();
void StartEngine();
- void OnClose(wxCloseEvent &e);
}; \ No newline at end of file