# Doxygen style

This guide introduces a consistent style for documenting HyperDbg using [Doxygen](http://www.doxygen.org/).

If you want to create a pull request and contribute to HyperDbg, please follow the Doxygen guides in the source code.

We follow the Javadoc syntax to mark comment blocks.

These have the general form for functions, structures, enums, global variables:

```c
/**
 * Brief summary.
 *
 * Detailed description. More detail.
 * @see Some reference
 *
 * @param <name> Parameter description.
 * @return Return value description.
 */
```

#### Example:

```c
/**
 * @brief Power function in order to computer address for MSR bitmaps
 * 
 * @param Base Base for power function
 * @param Exp Exponent for power function
 * @return int Returns the result of power function
 */
int
MathPower(int Base, int Exp)
{
...
}
```

### Doxygen Tags

This is the allowed set of Doxygen tags that can be used.

* [@brief](http://www.doxygen.nl/manual/commands.html#cmdbrief):[ ](http://www.doxygen.nl/manual/commands.html#cmdbrief)Starts a paragraph that serves as a brief description.
* [@details](http://www.doxygen.nl/manual/commands.html#cmddetails): Just like [@brief](http://www.doxygen.nl/manual/commands.html#cmdbrief) starts a brief description, `\details` starts the detailed description.
* [@param](http://doxygen.org/manual/commands.html#cmdparam): Describes function parameters.
* [@return](http://doxygen.org/manual/commands.html#cmdreturn): Describes return values.
* [@see](http://doxygen.org/manual/commands.html#cmdsa): Describes a cross-reference to classes, functions, methods, variables, files, or URL.
* [@warning](http://www.doxygen.nl/manual/commands.html#cmdwarning): Starts a paragraph where one or more warning messages may be entered.

Also, don't forget to add your name on top of the file with `@author` tag.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hyperdbg.org/contribution/style-guide/doxygen-style.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
