Skip to content

vdominguez1993/PlantUMLCodeGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plant UML Code Generator

This project is aimed to be a Python script to generate code from PlantUML state machines.

What is PlantUML?

Probably if you reached here you already know it. But if not, just take a look here.

Install PlantUML

It's really not needed, but it will be used to validate the PlantUML.

Linux

It's easy, just:

sudo apt install plantuml

Note that with this installation you'll need

Windows

Just install Linux

MacOS

Really?

Supported languages

For the moment only C language will be supported. But I'm planning to make it template based, so you won't need any specific language support, just the right template.

Syntax

This script will generate code based on special syntax inside PlantUML state machines.

Transitions

  • Conditions:
  • Actions:

States

  • Entry:
  • During:
  • Exit:

Doxygen

Since this code is autogenerated from an UML, a doxygen documentation will be created including the UML. Remember that if you want to include UML views inside Doxygen to change your configuration file for UML_LOOK and PLANTUML_JAR_PATH.

Why this project?

I am doing this project for fun, there might be other existent projects to do the same I am doing and probably even better but I am happy to make it from scratch.

Note from the author

If you are generating code with this code I want to give you some advice:

  • DON'T ever modify generated files. This is BAD practice, if you need the code changed, change the UML, don't just change the generated code. I will try to provide as many options possible to modify the output to your will. And even feel free to change the code of the script.
  • To prevent the previous point and generally as a good practice, don't upload generated files into your repository. This will encourage people to keep the designs well maintained and closer to the reality.

About

Python script to generate C code from PlantUML state machines.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published