Code Monkey home page Code Monkey logo

uml-maker's Introduction

UML-Maker

This is a mini-project aiming to create a universal uml generator for c++ projects. This project can be used to create UML-diagrams for C++ projects easily, using only a few commands.

Requirements

  • Doxygen
    https://www.doxygen.nl/manual/index.html
    Doxygen is a software(or command line tool) to produce documentation of source codes. It supports languages like C, C++, Python, Java, etc.It generates HTML, LaTeX, or XML documents of the code such that they can be documented or parsed to obtain contents of the code.
    In our project,
     We use doxygen to generate an XML document of the source code, to get all the classes and properties of the classes of the source code.

  • Python/Python3
    https://www.python.org/
    We use python to use the plantuml library to generate images.

  • Plantuml
    https://plantuml.com/
    https://github.com/SamuelMarks/python-plantuml
    PlantUML is an open-source tool allowing users to create diagrams from a specialized plain text language.
    In our project,
     We use plantuml-python integration(2nd link) to generate a png image from the .pu file already created after parsing the source code

    Installation

     Use command pip install plantuml to install plantuml in your device
     We also recommend to use command pip install six for better python compatibility

Approach

  • We generate xml documents for the project file using the command tool doxygen.

  • We parse the xml file and create a file classes.txt which contains the names of all the classes.

  • Then we open classes.txt and then read every line to get the name of every class.

  • For each class, we create a txt file and update the contents of each class in a more convenient way using the documented xml into the class_name.txt file.

  • After every class file is created, we use the class files to generate a single plantUml.pu file which contains the data members and member functions of all the classes in the main file.

  • We create the UML diagram using python plantuml library and the .pu file using the command "python -m plantuml plantUml.pu"

How to Run

  • Clone this repository to your local system
  • Run main.cpp from your system using git bash or cmd to generate main.exe or main.out file
  • Copy main.exe/main.out to your project folder and run it
  • You will see plantUml.png file in your folder, which contains the UML diagram

UML

plantUml

Output

  • UML for this project plantUml

Constraints

  • Can be used for one file only

Creators

  • Aswajith K K    211104
  • Pranshu Goyal  211126

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.