From 178d54b0d14acc2c8a9afabdd888825c1635c347 Mon Sep 17 00:00:00 2001 From: Nomango Date: Thu, 16 Apr 2020 10:06:36 +0800 Subject: [PATCH] [chore] update Doxygen comments --- src/kiwano/2d/Button.h | 7 +++++++ src/kiwano/2d/Component.h | 12 ++++++++++++ src/kiwano/core/Serializable.h | 16 ++++++++++++++-- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/kiwano/2d/Button.h b/src/kiwano/2d/Button.h index 946f40dc..197be05b 100644 --- a/src/kiwano/2d/Button.h +++ b/src/kiwano/2d/Button.h @@ -26,6 +26,11 @@ namespace kiwano KGE_DECLARE_SMART_PTR(Button); +/** + * \addtogroup Component + * @{ + */ + /** * \~chinese * @brief 按钮 @@ -109,6 +114,8 @@ private: Callback mouse_out_callback_; }; +/** @} */ + inline void Button::SetClickCallback(const Callback& func) { click_callback_ = func; diff --git a/src/kiwano/2d/Component.h b/src/kiwano/2d/Component.h index 8e62ca30..3830b8ba 100644 --- a/src/kiwano/2d/Component.h +++ b/src/kiwano/2d/Component.h @@ -32,6 +32,16 @@ class Event; KGE_DECLARE_SMART_PTR(Component); +/** + * \~chinese + * \defgroup Component 组件 + */ + +/** + * \addtogroup Component + * @{ + */ + /// \~chinese /// @brief 组件列表 typedef IntrusiveList ComponentList; @@ -94,6 +104,8 @@ private: Actor* actor_; }; +/** @} */ + inline bool Component::IsEnable() const { return enabled_; diff --git a/src/kiwano/core/Serializable.h b/src/kiwano/core/Serializable.h index 821865cc..c160cf7d 100644 --- a/src/kiwano/core/Serializable.h +++ b/src/kiwano/core/Serializable.h @@ -24,6 +24,15 @@ namespace kiwano { +/** + * \~chinese + * \defgroup Serialization 序列化 + */ + +/** + * \addtogroup Serialization + * @{ + */ /// \~chinese /// @brief 序列化器 @@ -230,7 +239,7 @@ class Serializable { public: /// \~chinese - /// @brief 序列化为字符串 + /// @brief 序列化为字节串 inline Vector Serialize() const { Vector data; @@ -240,7 +249,7 @@ public: } /// \~chinese - /// @brief 从字符串反序列化 + /// @brief 从字节串反序列化 inline void Deserialize(const Vector& data) { ByteDeserializer deserializer(data); @@ -438,4 +447,7 @@ inline Deserializer& operator>>(Deserializer& deserializer, math::TransformT> transform.position >> transform.rotation >> transform.scale >> transform.skew; } +/** @} */ + + } // namespace kiwano