summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2021-06-19 17:05:49 +0200
committerGitHub <noreply@github.com>2021-06-19 17:05:49 +0200
commit891e98fe52986efb353ed439dd2e27529496bab6 (patch)
tree940721177434e1cc8d5530ec34baf5d8b6a8d126 /docs
parent5f42d2f2c02f4942346d9f469f0b88817bb4bcf8 (diff)
downloadwiki-891e98fe52986efb353ed439dd2e27529496bab6.tar.gz
wiki-891e98fe52986efb353ed439dd2e27529496bab6.tar.bz2
wiki-891e98fe52986efb353ed439dd2e27529496bab6.zip
Update how-to-document-code.md
Diffstat (limited to 'docs')
-rw-r--r--docs/how-to-document-code.md19
1 files changed, 16 insertions, 3 deletions
diff --git a/docs/how-to-document-code.md b/docs/how-to-document-code.md
index acb606f..17f84b9 100644
--- a/docs/how-to-document-code.md
+++ b/docs/how-to-document-code.md
@@ -4,17 +4,17 @@ tableofcontents: 1
# How to document your code
-The extensive Doxygen manual ( <http://www.stack.nl/~dimitri/doxygen/manual.html,> <http://www.stack.nl/~dimitri/doxygen/commands.html> ) is well worth browsing. Doxygen provides a wide variety of options for documenting code and can be adapted for general documentation as well. This page well take you through some of the commonly used features in AzerothCore documentation.
+The extensive Doxygen manual ( https://www.doxygen.nl/manual/docblocks.html ) is well worth browsing. Doxygen provides a wide variety of options for documenting code and can be adapted for general documentation as well. This page well take you through some of the commonly used features in AzerothCore documentation.
Doxygen comment blocks are easy to create. For line comment just insert a triple forward slash.
-`/////This line will be included in the Doxygen comments for this function/class/file`
+`///This line will be included in the Doxygen comments for this function/class/file`
Commenting multiple lines is just as easy.
```
-/*!
+/**
These next few lines will form a comment block
To start a new paragraph add an empty line
To end the comment block type asterik and then forward slash.
@@ -23,6 +23,19 @@ To end the comment block type asterik and then forward slash.
By taking a few minutes as you are writing your code to write comment blocks you can tell future developers what you intended and make their life more productive and easier.
+This is an example of a documented [Hook](hooks-script.md) in our `ScriptMgr.h`:
+
+```cpp
+/**
+ * @brief This hook runs before sending the exit message during the arena queue, allowing you to run extra operations or disabling the exit message
+ *
+ * @param queue Contains information about the Arena queue
+ * @param ginfo Contains information about the group of the queue
+ * @return True if you want to continue sending the message, false if you want to disable the message
+ */
+[[nodiscard]] virtual bool OnBeforeSendExitMessageArenaQueue(BattlegroundQueue* /*queue*/, GroupQueueInfo* /*ginfo*/) { return true; }
+```
+
## Common Doxygen Tags
======================================================================================================================================