Skip to content

Latest commit

 

History

History
214 lines (208 loc) · 4.69 KB

t00007.md

File metadata and controls

214 lines (208 loc) · 4.69 KB

t00007 - Smart pointers

Config

diagrams:
  t00007_class:
    type: class
    glob:
      - t00007.cc
    using_namespace: clanguml::t00007
    include:
      namespaces:
        - clanguml::t00007

Source code

File tests/t00007/t00007.cc

#include <memory>

namespace clanguml {
namespace t00007 {
class A { };

class B { };

class C { };

class R {
public:
    std::unique_ptr<A> a;
    std::shared_ptr<B> b;
    std::weak_ptr<C> c;
};
} // namespace t00007
} // namespace clanguml

Generated PlantUML diagrams

t00007_class

Generated Mermaid diagrams

t00007_class

Generated JSON models

{
  "diagram_type": "class",
  "elements": [
    {
      "bases": [],
      "display_name": "A",
      "id": "791012980272136155",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "A",
      "namespace": "clanguml::t00007",
      "source_location": {
        "column": 7,
        "file": "t00007.cc",
        "line": 5,
        "translation_unit": "t00007.cc"
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "B",
      "id": "5571050502189662274",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "B",
      "namespace": "clanguml::t00007",
      "source_location": {
        "column": 7,
        "file": "t00007.cc",
        "line": 7,
        "translation_unit": "t00007.cc"
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "C",
      "id": "7776249429434912544",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "C",
      "namespace": "clanguml::t00007",
      "source_location": {
        "column": 7,
        "file": "t00007.cc",
        "line": 9,
        "translation_unit": "t00007.cc"
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "R",
      "id": "535246997770401258",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "a",
          "source_location": {
            "column": 24,
            "file": "t00007.cc",
            "line": 13,
            "translation_unit": "t00007.cc"
          },
          "type": "std::unique_ptr<A>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "b",
          "source_location": {
            "column": 24,
            "file": "t00007.cc",
            "line": 14,
            "translation_unit": "t00007.cc"
          },
          "type": "std::shared_ptr<B>"
        },
        {
          "access": "public",
          "is_static": false,
          "name": "c",
          "source_location": {
            "column": 22,
            "file": "t00007.cc",
            "line": 15,
            "translation_unit": "t00007.cc"
          },
          "type": "std::weak_ptr<C>"
        }
      ],
      "methods": [],
      "name": "R",
      "namespace": "clanguml::t00007",
      "source_location": {
        "column": 7,
        "file": "t00007.cc",
        "line": 11,
        "translation_unit": "t00007.cc"
      },
      "template_parameters": [],
      "type": "class"
    }
  ],
  "name": "t00007_class",
  "package_type": "namespace",
  "relationships": [
    {
      "access": "public",
      "destination": "791012980272136155",
      "label": "a",
      "source": "535246997770401258",
      "type": "aggregation"
    },
    {
      "access": "public",
      "destination": "5571050502189662274",
      "label": "b",
      "source": "535246997770401258",
      "type": "association"
    },
    {
      "access": "public",
      "destination": "5571050502189662274",
      "label": "b",
      "source": "535246997770401258",
      "type": "association"
    },
    {
      "access": "public",
      "destination": "7776249429434912544",
      "label": "c",
      "source": "535246997770401258",
      "type": "association"
    },
    {
      "access": "public",
      "destination": "7776249429434912544",
      "label": "c",
      "source": "535246997770401258",
      "type": "association"
    }
  ],
  "using_namespace": "clanguml::t00007"
}