/// @brief This is class C - class C has a long comment
///
/// Vivamus integer non suscipit taciti mus etiam at primis tempor sagittis sit,
/// euismod libero facilisi aptent elementum felis blandit cursus gravida sociis
/// erat ante, eleifend lectus nullam dapibus netus feugiat curae curabitur est
/// ad.
class C : public A {
public:
/// Do nothing unless override is provided
virtualvoid foo_c() override { }
};
/// This is class D
/// which is a little like B
/// and a little like C
class D : public B, public C {
public:
/**
* Forward foo_a
*/
void foo_a() override
{
for (auto a : as)
a->foo_a();
}
/**
* Forward foo_c
*/
void foo_c() override
{
for (auto a : as)
a->foo_c();
}
private:
/// All the A pointers
std::vector<A *> as;
};
class E : virtualpublic B, publicvirtual C {
public:
///
/// Forward foo_a
///
void foo_a() override
{
for (auto a : as)
a->foo_a();
}
///
/// Forward foo_c
///
void foo_c() override
{
for (auto a : as)
a->foo_c();
}
private:
/// All the A pointers
std::vector<A *> as;
};
} // namespace t00002
} // namespace clanguml
Generated PlantUML diagrams
Generated Mermaid diagrams
Generated JSON models
{
"diagram_type": "class",
"elements": [
{
"bases": [],
"comment": {
"brief": [
" This is class A\n"
],
"formatted": "\\brief This is class A",
"paragraph": [
" \n"
],
"raw": "/// \\brief This is class A",
"text": "\n \n"
},
"display_name": "A",
"id": "7901073918843258388",
"is_abstract": true,
"is_nested": false,
"is_struct": false,
"is_template": false,
"is_union": false,
"members": [],
"methods": [
{
"access": "public",
"comment": {
"formatted": "Abstract foo_a",
"paragraph": [
" Abstract foo_a\n"
],
"raw": "/// Abstract foo_a",
"text": "\n Abstract foo_a\n"
},
"display_name": "foo_a",
"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": true,
"is_static": false,
"is_virtual": true,
"name": "foo_a",
"parameters": [],
"source_location": {
"column": 18,
"file": "t00002.cc",
"line": 10,
"translation_unit": "t00002.cc"
},
"template_parameters": [],
"type": "void"
},
{
"access": "public",
"comment": {
"formatted": "Abstract foo_c",
"paragraph": [
" Abstract foo_c\n"
],
"raw": "/// Abstract foo_c",
"text": "\n Abstract foo_c\n"
},
"display_name": "foo_c",
"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": true,
"is_static": false,
"is_virtual": true,
"name": "foo_c",
"parameters": [],
"source_location": {
"column": 18,
"file": "t00002.cc",
"line": 12,
"translation_unit": "t00002.cc"
},
"template_parameters": [],
"type": "void"
}
],
"name": "A",
"namespace": "clanguml::t00002",
"source_location": {
"column": 7,
"file": "t00002.cc",
"line": 7,
"translation_unit": "t00002.cc"
},
"template_parameters": [],
"type": "class"
},
{
"bases": [
{
"access": "public",
"id": "7901073918843258388",
"is_virtual": false
}
],
"comment": {
"brief": [
" This is class B\n"
],
"formatted": "\\brief This is class B",
"paragraph": [
" \n"
],
"raw": "/// \\brief This is class B",
"text": "\n \n"
},
"display_name": "B",
"id": "4753875669499007606",
"is_abstract": false,
"is_nested": false,
"is_struct": false,
"is_template": false,
"is_union": false,
"members": [],
"methods": [
{
"access": "public",
"display_name": "foo_a",
"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": true,
"name": "foo_a",
"parameters": [],
"source_location": {
"column": 18,
"file": "t00002.cc",
"line": 18,
"translation_unit": "t00002.cc"
},
"template_parameters": [],
"type": "void"
}
],
"name": "B",
"namespace": "clanguml::t00002",
"source_location": {
"column": 7,
"file": "t00002.cc",
"line": 16,
"translation_unit": "t00002.cc"
},
"template_parameters": [],
"type": "class"
},
{
"bases": [
{
"access": "public",
"id": "7901073918843258388",
"is_virtual": false
}
],
"comment": {
"brief": [
" This is class C - class C has a long comment\n"
],
"formatted": "@brief This is class C - class C has a long comment\n\nVivamus integer non suscipit taciti mus etiam at primis tempor sagittis sit,\neuismod libero facilisi aptent elementum felis blandit cursus gravida sociis\nerat ante, eleifend lectus nullam dapibus netus feugiat curae curabitur est\nad.",
"paragraph": [
" \n",
" Vivamus integer non suscipit taciti mus etiam at primis tempor sagittis sit,\n euismod libero facilisi aptent elementum felis blandit cursus gravida sociis\n erat ante, eleifend lectus nullam dapibus netus feugiat curae curabitur est\n ad.\n"
],
"raw": "/// @brief This is class C - class C has a long comment\n///\n/// Vivamus integer non suscipit taciti mus etiam at primis tempor sagittis sit,\n/// euismod libero facilisi aptent elementum felis blandit cursus gravida sociis\n/// erat ante, eleifend lectus nullam dapibus netus feugiat curae curabitur est\n/// ad.",
"text": "\n \n\n Vivamus integer non suscipit taciti mus etiam at primis tempor sagittis sit,\n euismod libero facilisi aptent elementum felis blandit cursus gravida sociis\n erat ante, eleifend lectus nullam dapibus netus feugiat curae curabitur est\n ad.\n"
},
"display_name": "C",
"id": "9139995436788700062",
"is_abstract": false,
"is_nested": false,
"is_struct": false,
"is_template": false,
"is_union": false,
"members": [],
"methods": [
{
"access": "public",
"comment": {
"formatted": "Do nothing unless override is provided",
"paragraph": [
" Do nothing unless override is provided\n"
],
"raw": "/// Do nothing unless override is provided",
"text": "\n Do nothing unless override is provided\n"
},
"display_name": "foo_c",
"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": true,
"name": "foo_c",
"parameters": [],
"source_location": {
"column": 18,
"file": "t00002.cc",
"line": 30,
"translation_unit": "t00002.cc"
},
"template_parameters": [],
"type": "void"
}
],
"name": "C",
"namespace": "clanguml::t00002",
"source_location": {
"column": 7,
"file": "t00002.cc",
"line": 27,
"translation_unit": "t00002.cc"
},
"template_parameters": [],
"type": "class"
},
{
"bases": [
{
"access": "public",
"id": "4753875669499007606",
"is_virtual": false
},
{
"access": "public",
"id": "9139995436788700062",
"is_virtual": false
}
],
"comment": {
"formatted": "This is class D\nwhich is a little like B\nand a little like C",
"paragraph": [
" This is class D\n which is a little like B\n and a little like C\n"
],
"raw": "/// This is class D\n/// which is a little like B\n/// and a little like C",
"text": "\n This is class D\n which is a little like B\n and a little like C\n"