22
33#include < Utils.hpp>
44
5- using namespace horrible ;
6-
75namespace horrible {
8- // Horrible options utilities
9- namespace options {
10- /* *
11- * Returns the array of all registered options
12- *
13- * @returns An array of every registered option, main and external
14- */
15- std::vector<Option> const & getAll ();
16-
17- /* *
18- * Returns the toggle state of an option
19- *
20- * @param id The ID of the option to check
21- *
22- * @returns Boolean of the current value
23- */
24- bool get (std::string_view id);
25-
26- /* *
27- * Returns the chance value for an option
28- *
29- * @param id The ID of the option to check
30- *
31- * @returns Integer of the chance value
32- */
33- int getChance (std::string_view id);
34-
35- /* *
36- * Set the toggle state of an option
37- *
38- * @param id The ID of the option to toggle
39- * @param enable Boolean to toggle to
40- *
41- * @returns Boolean of the old value
42- */
43- bool set (std::string_view id, bool enable);
44-
45- /* *
46- * Returns the array of all registered option categories
47- *
48- * @returns An array of every registered option category, main and external
49- */
50- std::vector<std::string> const & getAllCategories ();
51-
52- /* *
53- * Returns if a category exists or not
54- *
55- * @param category The exact name of the category to check
56- */
57- bool doesCategoryExist (std::string_view category);
6+ namespace util {
7+ // Horrible options utilities
8+ namespace options {
9+ /* *
10+ * Returns the array of all registered options
11+ *
12+ * @returns An array of every registered option, main and external
13+ */
14+ std::vector<horrible::Option> const & getAll ();
15+
16+ /* *
17+ * Returns the toggle state of an option
18+ *
19+ * @param id The ID of the option to check
20+ *
21+ * @returns Boolean of the current value
22+ */
23+ bool get (std::string_view id);
24+
25+ /* *
26+ * Returns the chance value for an option
27+ *
28+ * @param id The ID of the option to check
29+ *
30+ * @returns Integer of the chance value
31+ */
32+ int getChance (std::string_view id);
33+
34+ /* *
35+ * Set the toggle state of an option
36+ *
37+ * @param id The ID of the option to toggle
38+ * @param enable Boolean to toggle to
39+ *
40+ * @returns Boolean of the old value
41+ */
42+ bool set (std::string_view id, bool enable);
43+
44+ /* *
45+ * Returns the array of all registered option categories
46+ *
47+ * @returns An array of every registered option category, main and external
48+ */
49+ std::vector<std::string> const & getAllCategories ();
50+
51+ /* *
52+ * Returns if a category exists or not
53+ *
54+ * @param category The exact name of the category to check
55+ */
56+ bool doesCategoryExist (std::string_view category);
57+ };
5858 };
5959};
0 commit comments