# t00031 - PlantUML style decorator test case ## Config ```yaml compilation_database_dir: .. output_directory: puml diagrams: t00031_class: type: class glob: - ../../tests/t00031/t00031.cc using_namespace: - clanguml::t00031 include: namespaces: - clanguml::t00031 ``` ## Source code File t00031.cc ```cpp #include #include namespace clanguml { namespace t00031 { /// @uml{style[#back:lightgreen|yellow;header:blue/red]} class A { }; /// @uml{style[#line.dotted:blue]} enum B { one, two, three }; /// @uml{style[#pink;line:red;line.bold;text:red]} template class C { T ttt; }; class D { }; struct R { /// @uml{style[#red,dashed,thickness=2]} A *aaa; /// @uml{composition} /// @uml{style[#green,dashed,thickness=4]} std::vector bbb; /// @uml{style[#blue,dotted,thickness=8]} C ccc; /// @uml{style[#blue,plain,thickness=16]} D *ddd; }; } // namespace t00031 } // namespace clanguml ``` ## Generated UML diagrams ![t00031_class](./t00031_class.svg "PlantUML style decorator test case") ## Generated JSON models ```json { "diagram_type": "class", "elements": [ { "bases": [], "comment": { "formatted": "@uml{style[#back:lightgreen|yellow;header:blue/red]}", "raw": "/// @uml{style[#back:lightgreen|yellow;header:blue/red]}" }, "display_name": "clanguml::t00031::A", "id": "847775539502907247", "is_abstract": false, "is_nested": false, "is_struct": false, "is_template": false, "is_union": false, "members": [], "methods": [], "name": "A", "namespace": "clanguml::t00031", "source_location": { "column": 7, "file": "../../tests/t00031/t00031.cc", "line": 8, "translation_unit": "../../tests/t00031/t00031.cc" }, "template_parameters": [], "type": "class" }, { "comment": { "formatted": "@uml{style[#line.dotted:blue]}", "raw": "/// @uml{style[#line.dotted:blue]}" }, "constants": [ "one", "two", "three" ], "display_name": "clanguml::t00031::B", "id": "1441796358326382179", "is_nested": false, "name": "B", "namespace": "clanguml::t00031", "source_location": { "column": 6, "file": "../../tests/t00031/t00031.cc", "line": 11, "translation_unit": "../../tests/t00031/t00031.cc" }, "type": "enum" }, { "bases": [], "comment": { "formatted": "@uml{style[#pink;line:red;line.bold;text:red]}", "raw": "/// @uml{style[#pink;line:red;line.bold;text:red]}" }, "display_name": "clanguml::t00031::C", "id": "116209144733282955", "is_abstract": false, "is_nested": false, "is_struct": false, "is_template": true, "is_union": false, "members": [ { "access": "private", "is_static": false, "name": "ttt", "source_location": { "column": 7, "file": "../../tests/t00031/t00031.cc", "line": 15, "translation_unit": "../../tests/t00031/t00031.cc" }, "type": "T" } ], "methods": [], "name": "C", "namespace": "clanguml::t00031", "source_location": { "column": 29, "file": "../../tests/t00031/t00031.cc", "line": 14, "translation_unit": "../../tests/t00031/t00031.cc" }, "template_parameters": [ { "is_variadic": false, "kind": "template_type", "name": "T", "template_parameters": [] } ], "type": "class" }, { "bases": [], "display_name": "clanguml::t00031::D", "id": "2266534344475505157", "is_abstract": false, "is_nested": false, "is_struct": false, "is_template": false, "is_union": false, "members": [], "methods": [], "name": "D", "namespace": "clanguml::t00031", "source_location": { "column": 7, "file": "../../tests/t00031/t00031.cc", "line": 18, "translation_unit": "../../tests/t00031/t00031.cc" }, "template_parameters": [], "type": "class" }, { "bases": [], "display_name": "clanguml::t00031::C", "id": "208700529175860645", "is_abstract": false, "is_nested": false, "is_struct": false, "is_template": true, "is_union": false, "members": [], "methods": [], "name": "C", "namespace": "clanguml::t00031", "source_location": { "column": 29, "file": "../../tests/t00031/t00031.cc", "line": 14, "translation_unit": "../../tests/t00031/t00031.cc" }, "template_parameters": [ { "is_variadic": false, "kind": "argument", "template_parameters": [], "type": "int" } ], "type": "class" }, { "bases": [], "display_name": "clanguml::t00031::R", "id": "484712092364868032", "is_abstract": false, "is_nested": false, "is_struct": true, "is_template": false, "is_union": false, "members": [ { "access": "public", "comment": { "formatted": "@uml{style[#red,dashed,thickness=2]}", "raw": "/// @uml{style[#red,dashed,thickness=2]}" }, "is_static": false, "name": "aaa", "source_location": { "column": 8, "file": "../../tests/t00031/t00031.cc", "line": 22, "translation_unit": "../../tests/t00031/t00031.cc" }, "type": "clanguml::t00031::A *" }, { "access": "public", "comment": { "formatted": "@uml{composition}\n@uml{style[#green,dashed,thickness=4]}", "raw": "/// @uml{composition}\n /// @uml{style[#green,dashed,thickness=4]}" }, "is_static": false, "name": "bbb", "source_location": { "column": 20, "file": "../../tests/t00031/t00031.cc", "line": 26, "translation_unit": "../../tests/t00031/t00031.cc" }, "type": "std::vector" }, { "access": "public", "comment": { "formatted": "@uml{style[#blue,dotted,thickness=8]}", "raw": "/// @uml{style[#blue,dotted,thickness=8]}" }, "is_static": false, "name": "ccc", "source_location": { "column": 12, "file": "../../tests/t00031/t00031.cc", "line": 29, "translation_unit": "../../tests/t00031/t00031.cc" }, "type": "C" }, { "access": "public", "comment": { "formatted": "@uml{style[#blue,plain,thickness=16]}", "raw": "/// @uml{style[#blue,plain,thickness=16]}" }, "is_static": false, "name": "ddd", "source_location": { "column": 8, "file": "../../tests/t00031/t00031.cc", "line": 32, "translation_unit": "../../tests/t00031/t00031.cc" }, "type": "clanguml::t00031::D *" } ], "methods": [], "name": "R", "namespace": "clanguml::t00031", "source_location": { "column": 8, "file": "../../tests/t00031/t00031.cc", "line": 20, "translation_unit": "../../tests/t00031/t00031.cc" }, "template_parameters": [], "type": "class" } ], "metadata": { "clang_uml_version": "0.3.7-55-gfb370ad", "llvm_version": "Ubuntu clang version 15.0.6", "schema_version": 1 }, "name": "t00031_class", "relationships": [ { "access": "public", "destination": "116209144733282955", "source": "208700529175860645", "type": "instantiation" }, { "access": "public", "destination": "847775539502907247", "label": "aaa", "source": "484712092364868032", "type": "association" }, { "access": "public", "destination": "1441796358326382179", "label": "bbb", "source": "484712092364868032", "type": "composition" }, { "access": "public", "destination": "208700529175860645", "label": "ccc", "source": "484712092364868032", "type": "aggregation" }, { "access": "public", "destination": "2266534344475505157", "label": "ddd", "source": "484712092364868032", "type": "association" } ], "using_namespace": "clanguml::t00031" } ```