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

Enhancement request to support nested classes #198

Open
e-dana opened this issue Aug 16, 2022 · 0 comments
Open

Enhancement request to support nested classes #198

e-dana opened this issue Aug 16, 2022 · 0 comments

Comments

@e-dana
Copy link

e-dana commented Aug 16, 2022

I'm working on a project to bring in existing code to model and refactor. I'm mostly interested in the structural model.
The source code (C/C++) structure is translated to TextUML and them imported into a UML editor/modeler.
The issue I'm having is that nested classes are not supported. Flattening a nested class is time consuming and not realistic, given
the number of lines of code I'm working with. I've tried writing code to auto-flatten the class, but there too many issues to do this
cleanly. UML does support nested classes. While I understand the undesirability of nesting a class, having this capability supported would save a great deal of time and effort.

Examples I'm looking to support (based on real C/C++ code):

  1. Simple 'typedef'.
import mdd_types;

class beta
    attribute prime : Integer;
end;

class foo
    class myType specializes some_other_type;
        attribute something_special : String;
    end;
    attribute alpha : myType;
end;
  1. Nested enumeration.
class bar
    enumeration DeviceState
        ON;
        OFF;
    end;
    attribute power_switch : DeviceState;
end;

While these are simple examples, the code base is more complex.

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