Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class Diagram: syntax for inner classes #15

Open
hattesen opened this issue Dec 1, 2022 · 0 comments
Open

Class Diagram: syntax for inner classes #15

hattesen opened this issue Dec 1, 2022 · 0 comments

Comments

@hattesen
Copy link

hattesen commented Dec 1, 2022

It would be really useful, if the mermaid syntax for classDiagram would allow diagramming inner classes (or enumerations).

Currently inner classes (and enumerations) have to be modeled separately, e.g.

classDiagram
      class Animal {
        -int age
        -Gender gender
        +mate()
        +age() int
      }
      Animal *-- Gender
      class Gender {
        <<enumeration>>
        MALE
        FEMALE
        OTHER
      }
Loading

Nesting class/enumeration definitions could be achieved using a syntax like...

mermaid
   classDiagram
      class Animal {
         class Gender {
            <<enumeration>>
            MALE
            FEMALE
            OTHER
        }
        -int age
        -Gender gender
        +isMammal()
        +age() int
      }
      Animal *-- Animal::Gender
@hattesen hattesen changed the title Syntax for inner classes Class Diagram: syntax for inner classes Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant