603 lines
14 KiB
Markdown
603 lines
14 KiB
Markdown
# t00005 - Basic class field relationships
|
|
## Config
|
|
```yaml
|
|
diagrams:
|
|
t00005_class:
|
|
type: class
|
|
glob:
|
|
- t00005.cc
|
|
using_namespace: clanguml::t00005
|
|
include:
|
|
namespaces:
|
|
- clanguml::t00005
|
|
|
|
```
|
|
## Source code
|
|
File `tests/t00005/t00005.cc`
|
|
```cpp
|
|
namespace clanguml {
|
|
namespace t00005 {
|
|
class A { };
|
|
|
|
class B { };
|
|
|
|
class C { };
|
|
|
|
class D { };
|
|
|
|
class E { };
|
|
|
|
class F { };
|
|
|
|
class G { };
|
|
|
|
class H { };
|
|
|
|
class I { };
|
|
|
|
class J { };
|
|
|
|
class K { };
|
|
|
|
class R {
|
|
public:
|
|
int some_int;
|
|
int *some_int_pointer;
|
|
int **some_int_pointer_pointer;
|
|
int &some_int_reference;
|
|
A a;
|
|
B *b;
|
|
C &c;
|
|
const D *d;
|
|
const E &e{};
|
|
F &&f;
|
|
G **g;
|
|
H ***h;
|
|
I *&i;
|
|
volatile J *j;
|
|
mutable K *k;
|
|
};
|
|
} // namespace t00005
|
|
} // namespace clanguml
|
|
|
|
```
|
|
## Generated PlantUML diagrams
|
|

|
|
## Generated Mermaid diagrams
|
|

|
|
## Generated JSON models
|
|
```json
|
|
{
|
|
"diagram_type": "class",
|
|
"elements": [
|
|
{
|
|
"bases": [],
|
|
"display_name": "A",
|
|
"id": "770847151166242555",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "A",
|
|
"namespace": "clanguml::t00005",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "t00005.cc",
|
|
"line": 3,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "B",
|
|
"id": "15275406858672700331",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "B",
|
|
"namespace": "clanguml::t00005",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "t00005.cc",
|
|
"line": 5,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "C",
|
|
"id": "7745411075680519262",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "C",
|
|
"namespace": "clanguml::t00005",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "t00005.cc",
|
|
"line": 7,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "D",
|
|
"id": "13884796726689493544",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "D",
|
|
"namespace": "clanguml::t00005",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "t00005.cc",
|
|
"line": 9,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "E",
|
|
"id": "7103681095374757269",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "E",
|
|
"namespace": "clanguml::t00005",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "t00005.cc",
|
|
"line": 11,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "F",
|
|
"id": "6181754862849854182",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "F",
|
|
"namespace": "clanguml::t00005",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "t00005.cc",
|
|
"line": 13,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "G",
|
|
"id": "7833183087077891503",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "G",
|
|
"namespace": "clanguml::t00005",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "t00005.cc",
|
|
"line": 15,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "H",
|
|
"id": "11525386408433893405",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "H",
|
|
"namespace": "clanguml::t00005",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "t00005.cc",
|
|
"line": 17,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "I",
|
|
"id": "877453852400691446",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "I",
|
|
"namespace": "clanguml::t00005",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "t00005.cc",
|
|
"line": 19,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "J",
|
|
"id": "2706640095757202600",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "J",
|
|
"namespace": "clanguml::t00005",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "t00005.cc",
|
|
"line": 21,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "K",
|
|
"id": "17432955118643460073",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [],
|
|
"methods": [],
|
|
"name": "K",
|
|
"namespace": "clanguml::t00005",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "t00005.cc",
|
|
"line": 23,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
},
|
|
{
|
|
"bases": [],
|
|
"display_name": "R",
|
|
"id": "5045539258985153690",
|
|
"is_abstract": false,
|
|
"is_nested": false,
|
|
"is_struct": false,
|
|
"is_template": false,
|
|
"is_union": false,
|
|
"members": [
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "some_int",
|
|
"source_location": {
|
|
"column": 9,
|
|
"file": "t00005.cc",
|
|
"line": 27,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "int"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "some_int_pointer",
|
|
"source_location": {
|
|
"column": 10,
|
|
"file": "t00005.cc",
|
|
"line": 28,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "int *"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "some_int_pointer_pointer",
|
|
"source_location": {
|
|
"column": 11,
|
|
"file": "t00005.cc",
|
|
"line": 29,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "int **"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "some_int_reference",
|
|
"source_location": {
|
|
"column": 10,
|
|
"file": "t00005.cc",
|
|
"line": 30,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "int &"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "a",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "t00005.cc",
|
|
"line": 31,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "A"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "b",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "t00005.cc",
|
|
"line": 32,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "B *"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "c",
|
|
"source_location": {
|
|
"column": 8,
|
|
"file": "t00005.cc",
|
|
"line": 33,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "C &"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "d",
|
|
"source_location": {
|
|
"column": 14,
|
|
"file": "t00005.cc",
|
|
"line": 34,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "const D *"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "e",
|
|
"source_location": {
|
|
"column": 14,
|
|
"file": "t00005.cc",
|
|
"line": 35,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "const E &"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "f",
|
|
"source_location": {
|
|
"column": 9,
|
|
"file": "t00005.cc",
|
|
"line": 36,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "F &&"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "g",
|
|
"source_location": {
|
|
"column": 9,
|
|
"file": "t00005.cc",
|
|
"line": 37,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "G **"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "h",
|
|
"source_location": {
|
|
"column": 10,
|
|
"file": "t00005.cc",
|
|
"line": 38,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "H ***"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "i",
|
|
"source_location": {
|
|
"column": 9,
|
|
"file": "t00005.cc",
|
|
"line": 39,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "I *&"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "j",
|
|
"source_location": {
|
|
"column": 17,
|
|
"file": "t00005.cc",
|
|
"line": 40,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "volatile J *"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"is_static": false,
|
|
"name": "k",
|
|
"source_location": {
|
|
"column": 16,
|
|
"file": "t00005.cc",
|
|
"line": 41,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"type": "K *"
|
|
}
|
|
],
|
|
"methods": [],
|
|
"name": "R",
|
|
"namespace": "clanguml::t00005",
|
|
"source_location": {
|
|
"column": 7,
|
|
"file": "t00005.cc",
|
|
"line": 25,
|
|
"translation_unit": "t00005.cc"
|
|
},
|
|
"template_parameters": [],
|
|
"type": "class"
|
|
}
|
|
],
|
|
"name": "t00005_class",
|
|
"package_type": "namespace",
|
|
"relationships": [
|
|
{
|
|
"access": "public",
|
|
"destination": "770847151166242555",
|
|
"label": "a",
|
|
"source": "5045539258985153690",
|
|
"type": "aggregation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "15275406858672700331",
|
|
"label": "b",
|
|
"source": "5045539258985153690",
|
|
"type": "association"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "7745411075680519262",
|
|
"label": "c",
|
|
"source": "5045539258985153690",
|
|
"type": "association"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "13884796726689493544",
|
|
"label": "d",
|
|
"source": "5045539258985153690",
|
|
"type": "association"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "7103681095374757269",
|
|
"label": "e",
|
|
"source": "5045539258985153690",
|
|
"type": "association"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "6181754862849854182",
|
|
"label": "f",
|
|
"source": "5045539258985153690",
|
|
"type": "aggregation"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "7833183087077891503",
|
|
"label": "g",
|
|
"source": "5045539258985153690",
|
|
"type": "association"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "11525386408433893405",
|
|
"label": "h",
|
|
"source": "5045539258985153690",
|
|
"type": "association"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "877453852400691446",
|
|
"label": "i",
|
|
"source": "5045539258985153690",
|
|
"type": "association"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "2706640095757202600",
|
|
"label": "j",
|
|
"source": "5045539258985153690",
|
|
"type": "association"
|
|
},
|
|
{
|
|
"access": "public",
|
|
"destination": "17432955118643460073",
|
|
"label": "k",
|
|
"source": "5045539258985153690",
|
|
"type": "association"
|
|
}
|
|
],
|
|
"using_namespace": "clanguml::t00005"
|
|
}
|
|
```
|