Explorar o código

ApiDocs. Document mapping::type::<Collections>.

lganzzzo %!s(int64=4) %!d(string=hai) anos
pai
achega
aa9d53ca5b

+ 7 - 0
src/oatpp/core/data/mapping/type/Any.hpp

@@ -36,8 +36,15 @@ namespace oatpp { namespace data { namespace mapping { namespace type {
 
 namespace __class {
 
+  /**
+   * Any class.
+   */
   class Any {
   public:
+
+    /**
+     * Class Id.
+     */
     static const ClassId CLASS_ID;
 
     static Type *getType() {

+ 19 - 0
src/oatpp/core/data/mapping/type/List.hpp

@@ -34,13 +34,27 @@ namespace oatpp { namespace data { namespace mapping { namespace type {
 
 namespace __class {
 
+  /**
+   * Abstract list class.
+   */
   class AbstractList {
   public:
+    /**
+     * Class Id.
+     */
     static const ClassId CLASS_ID;
   public:
 
+    /**
+     * Polymorphic Dispatcher
+     */
     class AbstractPolymorphicDispatcher {
     public:
+      /**
+       * Add item.
+       * @param object - List to add item to.
+       * @param item - Item to add.
+       */
       virtual void addPolymorphicItem(const type::Void& object, const type::Void& item) const = 0;
     };
 
@@ -51,6 +65,11 @@ namespace __class {
 
 }
 
+/**
+ * `ObjectWrapper` over `std::list<T>`
+ * @tparam T - Item `ObjectWrapper` type.
+ * @tparam C - Class.
+ */
 template<class T, class C>
 class ListObjectWrapper : public type::ObjectWrapper<std::list<T>, C> {
 public:

+ 1 - 1
src/oatpp/core/data/mapping/type/Object.hpp

@@ -102,7 +102,7 @@ public:
   typedef __class::Object<ObjT> TemplateObjectClass;
 public:
 
-OATPP_DEFINE_OBJECT_WRAPPER_DEFAULTS(DTOWrapper, TemplateObjectType, TemplateObjectClass)
+  OATPP_DEFINE_OBJECT_WRAPPER_DEFAULTS(DTOWrapper, TemplateObjectType, TemplateObjectClass)
 
   static DTOWrapper createShared() {
     return std::make_shared<TemplateObjectType>();

+ 33 - 12
src/oatpp/core/data/mapping/type/PairList.hpp

@@ -35,23 +35,44 @@ namespace oatpp { namespace data { namespace mapping { namespace type {
 
 namespace __class {
 
-class AbstractPairList {
-public:
-  static const ClassId CLASS_ID;
-public:
-
-  class AbstractPolymorphicDispatcher {
+  /**
+   * Abstract PairList class.
+   */
+  class AbstractPairList {
+  public:
+    /**
+     * Class id.
+     */
+    static const ClassId CLASS_ID;
   public:
-    virtual void addPolymorphicItem(const type::Void& object, const type::Void& key, const type::Void& value) const = 0;
-  };
 
-};
+    /**
+     * Polymorphic Dispatcher.
+     */
+    class AbstractPolymorphicDispatcher {
+    public:
+      /**
+       * Add key-value pair to pair-list.
+       * @param object - pair list.
+       * @param key - key.
+       * @param value - value.
+       */
+      virtual void addPolymorphicItem(const type::Void& object, const type::Void& key, const type::Void& value) const = 0;
+    };
 
-template<class Key, class Value>
-class PairList;
+  };
+
+  template<class Key, class Value>
+  class PairList;
 
 }
 
+/**
+ * `ObjectWrapper` over `std::list<std::pair<Key, Value>>`
+ * @tparam Key - Key `ObjectWrapper` type.
+ * @tparam Value - Value `ObjectWrapper` type.
+ * @tparam C - Class.
+ */
 template<class Key, class Value, class C>
 class PairListObjectWrapper : public type::ObjectWrapper<std::list<std::pair<Key, Value>>, C> {
 public:
@@ -59,7 +80,7 @@ public:
   typedef C TemplateObjectClass;
 public:
 
-OATPP_DEFINE_OBJECT_WRAPPER_DEFAULTS(PairListObjectWrapper, TemplateObjectType, TemplateObjectClass)
+  OATPP_DEFINE_OBJECT_WRAPPER_DEFAULTS(PairListObjectWrapper, TemplateObjectType, TemplateObjectClass)
 
   PairListObjectWrapper(std::initializer_list<std::pair<Key, Value>> ilist)
     : type::ObjectWrapper<TemplateObjectType, TemplateObjectClass>(std::make_shared<TemplateObjectType>(ilist))

+ 21 - 0
src/oatpp/core/data/mapping/type/UnorderedMap.hpp

@@ -35,13 +35,28 @@ namespace oatpp { namespace data { namespace mapping { namespace type {
 
 namespace __class {
 
+  /**
+   * Abstract Unordered Map class.
+   */
   class AbstractUnorderedMap {
   public:
+    /**
+     * Class Id.
+     */
     static const ClassId CLASS_ID;
   public:
 
+    /**
+     * Polymorphic Dispatcher.
+     */
     class AbstractPolymorphicDispatcher {
     public:
+      /**
+       * Add item.
+       * @param object - Unordered Map.
+       * @param key - Key.
+       * @param value - Value.
+       */
       virtual void addPolymorphicItem(const type::Void& object, const type::Void& key, const type::Void& value) const = 0;
     };
 
@@ -52,6 +67,12 @@ namespace __class {
 
 }
 
+/**
+ * `ObjectWrapper` for `std::unordered_map<Key, Value>`
+ * @tparam Key - Key `ObjectWrapper` type.
+ * @tparam Value - Value `ObjectWrapper` type.
+ * @tparam C - Class.
+ */
 template<class Key, class Value, class C>
 class UnorderedMapObjectWrapper : public type::ObjectWrapper<std::unordered_map<Key, Value>, C> {
 public:

+ 30 - 11
src/oatpp/core/data/mapping/type/UnorderedSet.hpp

@@ -34,23 +34,42 @@ namespace oatpp { namespace data { namespace mapping { namespace type {
 
 namespace __class {
 
-class AbstractUnorderedSet {
-public:
-  static const ClassId CLASS_ID;
-public:
-
-  class AbstractPolymorphicDispatcher {
+  /**
+   * Abstract Unordered Set class.
+   */
+  class AbstractUnorderedSet {
+  public:
+    /**
+     * Class Id.
+     */
+    static const ClassId CLASS_ID;
   public:
-    virtual void addPolymorphicItem(const type::Void& object, const type::Void& item) const = 0;
-  };
 
-};
+    /**
+     * Polymorphic Dispatcher.
+     */
+    class AbstractPolymorphicDispatcher {
+    public:
+      /**
+       * Add Item.
+       * @param object - UnorderedSet.
+       * @param item - Item.
+       */
+      virtual void addPolymorphicItem(const type::Void& object, const type::Void& item) const = 0;
+    };
 
-template<class T>
-class UnorderedSet;
+  };
+
+  template<class T>
+  class UnorderedSet;
 
 }
 
+/**
+ * `ObjectWrapper` over `std::unordered_set<T>`
+ * @tparam T - Key `ObjectWrapper` type.
+ * @tparam C - Class.
+ */
 template<class T, class C>
 class UnorderedSetObjectWrapper : public type::ObjectWrapper<std::unordered_set<T>, C> {
 public:

+ 19 - 0
src/oatpp/core/data/mapping/type/Vector.hpp

@@ -34,13 +34,27 @@ namespace oatpp { namespace data { namespace mapping { namespace type {
 
 namespace __class {
 
+  /**
+   * Abstract Vector Class.
+   */
   class AbstractVector {
   public:
+    /**
+     * Class Id.
+     */
     static const ClassId CLASS_ID;
   public:
 
+    /**
+     * Polymorphic Dispatcher.
+     */
     class AbstractPolymorphicDispatcher {
     public:
+      /**
+       * Add Item.
+       * @param object - Vector.
+       * @param item - Item to add.
+       */
       virtual void addPolymorphicItem(const type::Void& object, const type::Void& item) const = 0;
     };
 
@@ -51,6 +65,11 @@ namespace __class {
 
 }
 
+/**
+ * `ObjectWrapper` over `std::vector<T>`.
+ * @tparam T - Item `ObjectWrapper` type.
+ * @tparam C - Class.
+ */
 template<class T, class C>
 class VectorObjectWrapper : public type::ObjectWrapper<std::vector<T>, C> {
 public: