Convert C++ files to plantuml
Test the script from the git repo-root by running it with file input:
perl -Ilib cppToUML.pl example/\*
or piped input
cat example/* | perl -Ilib cppToUML.pl
Any of the methods can be combined with plantuml to generate a png by adding an extra pipe
cat example/* | perl -Ilib cppToUML.pl | plantuml -pipe > example.png
Where -Ilib is needed to find the StoreClass module. The end result of the above command is:
Classes/structs and their member parameters and functions all start on a newline with 0 or more space/tab indentation.
The occurence of };
on an empty row is interpreted as done parsing current class.
A class or struct followed by :
is parsed for inheritance until reading an opening brace.
- Single line member functions
- Single line member variables
- Nested classes
- public, private and protected access modifiers.
- Multiline inheritance
- Multiline comments using
/**/
- Multiline member functions
- Multiline member variables
- Template member functions
- Template classes