# t00040 - Relationship and access filter test
## Config
```yaml
compilation_database_dir: ..
output_directory: puml
diagrams:
  t00040_class:
    type: class
    generate_packages: false
    glob:
      - ../../tests/t00040/t00040.cc
    using_namespace:
      - clanguml::t00040
    include:
      namespaces:
        - clanguml::t00040
      access:
        - public
        - protected
    exclude:
      relationships:
        - dependency
      elements:
        - clanguml::t00040::B
```
## Source code
File t00040.cc
```cpp
namespace clanguml::t00040 {

struct B { };

struct A {
public:
    int get_a() { return hidden_a_; }

protected:
    int ii_;

private:
    void foo() { }

    int hidden_a_;
};

class AA : public A {
public:
};

class AAA : public AA {
public:
    int get_aaa() { return hidden_aaa_; }
    B *b;

private:
    int hidden_aaa_;
};

struct R {
    void foo(A *a) { }
};

} // namespace clanguml::t00040

```
## Generated UML diagrams
![t00040_class](./t00040_class.svg "Relationship and access filter test")
## Generated JSON models
```json
{
  "diagram_type": "class",
  "elements": [
    {
      "bases": [],
      "display_name": "clanguml::t00040::A",
      "id": "307580006083737677",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [
        {
          "access": "protected",
          "is_static": false,
          "name": "ii_",
          "source_location": {
            "file": "../../tests/t00040/t00040.cc",
            "line": 10
          },
          "type": "int"
        },
        {
          "access": "private",
          "is_static": false,
          "name": "hidden_a_",
          "source_location": {
            "file": "../../tests/t00040/t00040.cc",
            "line": 15
          },
          "type": "int"
        }
      ],
      "methods": [
        {
          "access": "public",
          "is_const": false,
          "is_defaulted": false,
          "is_implicit": false,
          "is_pure_virtual": false,
          "is_static": false,
          "is_virtual": false,
          "name": "get_a",
          "parameters": [],
          "type": "int"
        },
        {
          "access": "private",
          "is_const": false,
          "is_defaulted": false,
          "is_implicit": false,
          "is_pure_virtual": false,
          "is_static": false,
          "is_virtual": false,
          "name": "foo",
          "parameters": [],
          "type": "void"
        }
      ],
      "name": "A",
      "namespace": "clanguml::t00040",
      "source_location": {
        "file": "../../tests/t00040/t00040.cc",
        "line": 5
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [
        {
          "access": "public",
          "id": "307580006083737677",
          "is_virtual": false,
          "name": "clanguml::t00040::A"
        }
      ],
      "display_name": "clanguml::t00040::AA",
      "id": "534115812779766127",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [],
      "name": "AA",
      "namespace": "clanguml::t00040",
      "source_location": {
        "file": "../../tests/t00040/t00040.cc",
        "line": 18
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [
        {
          "access": "public",
          "id": "534115812779766127",
          "is_virtual": false,
          "name": "clanguml::t00040::AA"
        }
      ],
      "display_name": "clanguml::t00040::AAA",
      "id": "745371908432158369",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": false,
      "is_template": false,
      "is_union": false,
      "members": [
        {
          "access": "public",
          "is_static": false,
          "name": "b",
          "source_location": {
            "file": "../../tests/t00040/t00040.cc",
            "line": 25
          },
          "type": "clanguml::t00040::B *"
        },
        {
          "access": "private",
          "is_static": false,
          "name": "hidden_aaa_",
          "source_location": {
            "file": "../../tests/t00040/t00040.cc",
            "line": 28
          },
          "type": "int"
        }
      ],
      "methods": [
        {
          "access": "public",
          "is_const": false,
          "is_defaulted": false,
          "is_implicit": false,
          "is_pure_virtual": false,
          "is_static": false,
          "is_virtual": false,
          "name": "get_aaa",
          "parameters": [],
          "type": "int"
        }
      ],
      "name": "AAA",
      "namespace": "clanguml::t00040",
      "source_location": {
        "file": "../../tests/t00040/t00040.cc",
        "line": 22
      },
      "template_parameters": [],
      "type": "class"
    },
    {
      "bases": [],
      "display_name": "clanguml::t00040::R",
      "id": "1539035020975101539",
      "is_abstract": false,
      "is_nested": false,
      "is_struct": true,
      "is_template": false,
      "is_union": false,
      "members": [],
      "methods": [
        {
          "access": "public",
          "is_const": false,
          "is_defaulted": false,
          "is_implicit": false,
          "is_pure_virtual": false,
          "is_static": false,
          "is_virtual": false,
          "name": "foo",
          "parameters": [
            {
              "name": "a",
              "type": "clanguml::t00040::A *"
            }
          ],
          "type": "void"
        }
      ],
      "name": "R",
      "namespace": "clanguml::t00040",
      "source_location": {
        "file": "../../tests/t00040/t00040.cc",
        "line": 31
      },
      "template_parameters": [],
      "type": "class"
    }
  ],
  "metadata": {
    "clang_uml_version": "0.3.5-27-g81c7ce7",
    "llvm_version": "Ubuntu clang version 15.0.6",
    "schema_version": 1
  },
  "name": "t00040_class",
  "relationships": [
    {
      "access": "public",
      "destination": "307580006083737677",
      "source": "534115812779766127",
      "type": "extension"
    },
    {
      "access": "public",
      "destination": "534115812779766127",
      "source": "745371908432158369",
      "type": "extension"
    },
    {
      "access": "public",
      "destination": "307580006083737677",
      "source": "1539035020975101539",
      "type": "dependency"
    }
  ],
  "using_namespace": "clanguml::t00040"
}
```
