diagrams:
t00003_class:
type: class
glob:
- t00003.cc
using_namespace: clanguml::t00003
include:
namespaces:
- clanguml::t00003
File tests/t00003/t00003.cc
#include <functional>
#include <string>
namespace clanguml {
namespace t00003 {
class A {
public:
A() = default;
A(int i)
: private_member{i}
{
}
template <typename T>
A(T t)
: private_member{t.get()}
{
}
A(A &&) = default;
A(const A &) = delete;
virtual ~A() = default;
void basic_method() { }
static int static_method() { return 0; }
void const_method() const { }
auto auto_method() { return 1; }
A &operator++()
{
private_member++;
return *this;
}
A &operator=(A &&other) noexcept { return *this; }
A &operator=(A &other) noexcept { return *this; }
constexpr std::size_t size() const { return private_member; }
auto double_int(const int i) { return 2 * i; }
auto sum(const double a, const double b) { return a_ + b_ + c_; }
auto default_int(int i = 12) { return i + 10; }
auto default_int_braces(int i = {}) { return i + 10; }
std::string default_string(int i, std::string s = "abc")
{
return s + std::to_string(i);
}
static A create_from_int(int i) { return A(i); }
int public_member;
static int static_int;
static const int static_const_int = 1;
static const auto auto_member{10UL};
protected:
void protected_method() { }
int protected_member;
std::function<bool(const int)> compare = [this](const int v) {
return private_member > v;
};
private:
void private_method() { }
int private_member;
int a_, b_, c_;
};
int A::static_int = 1;
} // namespace t00003
} // namespace clanguml
{
"diagram_type": "class",
"elements": [
{
"bases": [],
"display_name": "A",
"id": "10975613308274365816",
"is_abstract": false,
"is_nested": false,
"is_struct": false,
"is_template": false,
"is_union": false,
"members": [
{
"access": "public",
"is_static": false,
"name": "public_member",
"source_location": {
"column": 9,
"file": "t00003.cc",
"line": 54,
"translation_unit": "t00003.cc"
},
"type": "int"
},
{
"access": "protected",
"is_static": false,
"name": "protected_member",
"source_location": {
"column": 9,
"file": "t00003.cc",
"line": 62,
"translation_unit": "t00003.cc"
},
"type": "int"
},
{
"access": "protected",
"is_static": false,
"name": "compare",
"source_location": {
"column": 36,
"file": "t00003.cc",
"line": 64,
"translation_unit": "t00003.cc"
},
"type": "std::function<bool (const int)>"
},
{
"access": "private",
"is_static": false,
"name": "private_member",
"source_location": {
"column": 9,
"file": "t00003.cc",
"line": 71,
"translation_unit": "t00003.cc"
},
"type": "int"
},
{
"access": "private",
"is_static": false,
"name": "a_",
"source_location": {
"column": 9,
"file": "t00003.cc",
"line": 72,
"translation_unit": "t00003.cc"
},
"type": "int"
},
{
"access": "private",
"is_static": false,
"name": "b_",
"source_location": {
"column": 13,
"file": "t00003.cc",
"line": 72,
"translation_unit": "t00003.cc"
},
"type": "int"
},
{
"access": "private",
"is_static": false,
"name": "c_",
"source_location": {
"column": 17,
"file": "t00003.cc",
"line": 72,
"translation_unit": "t00003.cc"
},
"type": "int"
},
{
"access": "public",
"is_static": true,
"name": "static_int",
"source_location": {
"column": 16,
"file": "t00003.cc",
"line": 55,
"translation_unit": "t00003.cc"
},
"type": "int"
},
{
"access": "public",
"is_static": true,
"name": "static_const_int",
"source_location": {
"column": 22,
"file": "t00003.cc",
"line": 56,
"translation_unit": "t00003.cc"
},
"type": "const int"
},
{
"access": "public",
"is_static": true,
"name": "auto_member",
"source_location": {
"column": 23,
"file": "t00003.cc",
"line": 57,
"translation_unit": "t00003.cc"
},
"type": "const unsigned long"
}
],
"methods": [
{
"access": "public",
"display_name": "A",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": true,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": true,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "A",
"parameters": [],
"source_location": {
"column": 5,
"file": "t00003.cc",
"line": 9,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "void"
},
{
"access": "public",
"display_name": "A",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": true,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "A",
"parameters": [
{
"name": "i",
"type": "int"
}
],
"source_location": {
"column": 5,
"file": "t00003.cc",
"line": 10,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "void"
},
{
"access": "public",
"display_name": "A",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": true,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": true,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "A",
"parameters": [
{
"name": "",
"type": "A &&"
}
],
"source_location": {
"column": 5,
"file": "t00003.cc",
"line": 21,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "void"
},
{
"access": "public",
"display_name": "A",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": true,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": true,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "A",
"parameters": [
{
"name": "",
"type": "const A &"
}
],
"source_location": {
"column": 5,
"file": "t00003.cc",
"line": 22,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "void"
},
{
"access": "public",
"display_name": "~A",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": true,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": true,
"name": "~A",
"parameters": [],
"source_location": {
"column": 13,
"file": "t00003.cc",
"line": 23,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "void"
},
{
"access": "public",
"display_name": "basic_method",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "basic_method",
"parameters": [],
"source_location": {
"column": 10,
"file": "t00003.cc",
"line": 25,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "void"
},
{
"access": "public",
"display_name": "static_method",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": true,
"is_virtual": false,
"name": "static_method",
"parameters": [],
"source_location": {
"column": 16,
"file": "t00003.cc",
"line": 26,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "int"
},
{
"access": "public",
"display_name": "const_method",
"is_const": true,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "const_method",
"parameters": [],
"source_location": {
"column": 10,
"file": "t00003.cc",
"line": 27,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "void"
},
{
"access": "public",
"display_name": "auto_method",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "auto_method",
"parameters": [],
"source_location": {
"column": 10,
"file": "t00003.cc",
"line": 28,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "int"
},
{
"access": "public",
"display_name": "operator++",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": true,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "operator++",
"parameters": [],
"source_location": {
"column": 8,
"file": "t00003.cc",
"line": 30,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "A &"
},
{
"access": "public",
"display_name": "operator=",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": true,
"is_noexcept": true,
"is_operator": true,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "operator=",
"parameters": [
{
"name": "other",
"type": "A &&"
}
],
"source_location": {
"column": 8,
"file": "t00003.cc",
"line": 36,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "A &"
},
{
"access": "public",
"display_name": "operator=",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": true,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": true,
"is_operator": true,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "operator=",
"parameters": [
{
"name": "other",
"type": "A &"
}
],
"source_location": {
"column": 8,
"file": "t00003.cc",
"line": 37,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "A &"
},
{
"access": "public",
"display_name": "size",
"is_const": true,
"is_consteval": false,
"is_constexpr": true,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "size",
"parameters": [],
"source_location": {
"column": 27,
"file": "t00003.cc",
"line": 39,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "std::size_t"
},
{
"access": "public",
"display_name": "double_int",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "double_int",
"parameters": [
{
"name": "i",
"type": "const int"
}
],
"source_location": {
"column": 10,
"file": "t00003.cc",
"line": 41,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "int"
},
{
"access": "public",
"display_name": "sum",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "sum",
"parameters": [
{
"name": "a",
"type": "const double"
},
{
"name": "b",
"type": "const double"
}
],
"source_location": {
"column": 10,
"file": "t00003.cc",
"line": 42,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "int"
},
{
"access": "public",
"display_name": "default_int",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "default_int",
"parameters": [
{
"default_value": "12",
"name": "i",
"type": "int"
}
],
"source_location": {
"column": 10,
"file": "t00003.cc",
"line": 44,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "int"
},
{
"access": "public",
"display_name": "default_int_braces",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "default_int_braces",
"parameters": [
{
"default_value": "{}",
"name": "i",
"type": "int"
}
],
"source_location": {
"column": 10,
"file": "t00003.cc",
"line": 45,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "int"
},
{
"access": "public",
"display_name": "default_string",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "default_string",
"parameters": [
{
"name": "i",
"type": "int"
},
{
"default_value": "\"abc\"",
"name": "s",
"type": "std::string"
}
],
"source_location": {
"column": 17,
"file": "t00003.cc",
"line": 47,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "std::string"
},
{
"access": "public",
"display_name": "create_from_int",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": true,
"is_virtual": false,
"name": "create_from_int",
"parameters": [
{
"name": "i",
"type": "int"
}
],
"source_location": {
"column": 14,
"file": "t00003.cc",
"line": 52,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "A"
},
{
"access": "protected",
"display_name": "protected_method",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "protected_method",
"parameters": [],
"source_location": {
"column": 10,
"file": "t00003.cc",
"line": 60,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "void"
},
{
"access": "private",
"display_name": "private_method",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": false,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "private_method",
"parameters": [],
"source_location": {
"column": 10,
"file": "t00003.cc",
"line": 69,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "void"
},
{
"access": "public",
"display_name": "A<T>",
"is_const": false,
"is_consteval": false,
"is_constexpr": false,
"is_constructor": true,
"is_copy_assignment": false,
"is_coroutine": false,
"is_defaulted": false,
"is_deleted": false,
"is_move_assignment": false,
"is_noexcept": false,
"is_operator": false,
"is_pure_virtual": false,
"is_static": false,
"is_virtual": false,
"name": "A",
"parameters": [
{
"name": "t",
"type": "T"
}
],
"template_parameters": [
{
"is_variadic": false,
"kind": "template_type",
"name": "T",
"template_parameters": []
}
],
"type": "void"
}
],
"name": "A",
"namespace": "clanguml::t00003",
"source_location": {
"column": 7,
"file": "t00003.cc",
"line": 7,
"translation_unit": "t00003.cc"
},
"template_parameters": [],
"type": "class"
}
],
"name": "t00003_class",
"package_type": "namespace",
"relationships": [],
"using_namespace": "clanguml::t00003"
}
<?xml version="1.0"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<key attr.name="id" attr.type="string" for="graph" id="gd0" />
<key attr.name="diagram_type" attr.type="string" for="graph" id="gd1" />
<key attr.name="name" attr.type="string" for="graph" id="gd2" />
<key attr.name="using_namespace" attr.type="string" for="graph" id="gd3" />
<key attr.name="id" attr.type="string" for="node" id="nd0" />
<key attr.name="type" attr.type="string" for="node" id="nd1" />
<key attr.name="name" attr.type="string" for="node" id="nd2" />
<key attr.name="stereotype" attr.type="string" for="node" id="nd3" />
<key attr.name="url" attr.type="string" for="node" id="nd4" />
<key attr.name="tooltip" attr.type="string" for="node" id="nd5" />
<key attr.name="is_template" attr.type="boolean" for="node" id="nd6" />
<key attr.name="type" attr.type="string" for="edge" id="ed0" />
<key attr.name="access" attr.type="string" for="edge" id="ed1" />
<key attr.name="label" attr.type="string" for="edge" id="ed2" />
<key attr.name="url" attr.type="string" for="edge" id="ed3" />
<graph id="g0" edgedefault="directed" parse.nodeids="canonical" parse.edgeids="canonical" parse.order="nodesfirst">
<data key="gd3">clanguml::t00003</data>
<node id="n0">
<data key="nd1">class</data>
<data key="nd2"><![CDATA[A]]></data>
<data key="nd6">false</data>
<data key="nd4">https://github.com/bkryza/clang-uml/blob/375fb0bfc3a0e0b702776c4e39f79ee848c5c67c/tests/t00003/t00003.cc#L7</data>
<data key="nd5">A</data>
</node>
</graph>
</graphml>