@brief an example class that demonstrates what Hyde documents. @hyde-owner fosterbrereton
| 20 | /// @brief an example class that demonstrates what Hyde documents. |
| 21 | /// @hyde-owner fosterbrereton |
| 22 | class class_example { |
| 23 | public: |
| 24 | /// Note that nested classes will not inherit their ownership from |
| 25 | /// the class that contains them, so thus need their own `hyde-owner`. |
| 26 | /// @brief an example enumeration within the class. |
| 27 | /// @hyde-owner sean-parent |
| 28 | enum class color { |
| 29 | /// this is an example description for the `red` value. |
| 30 | red, |
| 31 | /// this is an example description for the `green` value. |
| 32 | green = 42, |
| 33 | /// this is an example description for the `blue` value. |
| 34 | blue |
| 35 | }; |
| 36 | |
| 37 | /// Note that nested classes will not inherit their ownership from |
| 38 | /// the class that contains them, so thus need their own `hyde-owner`. |
| 39 | /// @brief a class definition contained within `example_class`. |
| 40 | /// @hyde-owner sean-parent |
| 41 | struct nested_class_example { |
| 42 | /// member field `_x` within the nested class example. |
| 43 | int _x{0}; |
| 44 | |
| 45 | /// member field `_y` within the nested class example. |
| 46 | int _y; |
| 47 | }; |
| 48 | |
| 49 | |
| 50 | /// a nested `typedef` expression. |
| 51 | typedef std::string typedef_example; |
| 52 | |
| 53 | /// a nested `using` expression. |
| 54 | using using_example = std::string; |
| 55 | |
| 56 | |
| 57 | /// default constructor. |
| 58 | class_example() = default; |
| 59 | |
| 60 | /// an explicit constructor that takes a single `int`. |
| 61 | /// @param x The one integer parameter this routine takes |
| 62 | explicit class_example(int x) : _x(x) {} |
| 63 | |
| 64 | |
| 65 | /// member function with a trailing return type. |
| 66 | /// @return "`_x`" |
| 67 | auto member_function_trailing_return_type() const -> int { return _x; } |
| 68 | |
| 69 | /// example member function. |
| 70 | /// @return double the value of `_x`. |
| 71 | auto member_function() { return _x *= 2; } |
| 72 | |
| 73 | |
| 74 | /// an overloaded member function that takes one parameter. |
| 75 | /// @brief A series of overloaded functions. |
| 76 | /// @param first the first parameter of the first overload. |
| 77 | void overloaded(const std::string& first); |
| 78 | |
| 79 | /// an overloaded member function that takes two parameters. |
nothing calls this directly
no outgoing calls
no test coverage detected