-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
5,582 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016 T | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
include *.rst *.txt LICENSE | ||
recursive-include tests *.py | ||
recursive-include tests *.hpp | ||
recursive-include tests *.puml | ||
recursive-include doc *.rst | ||
recursive-include doc *.py | ||
prune doc/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
hpp2plantuml - Convert C++ header files to PlantUML | ||
=================================================== | ||
|
||
.. _sec-intro: | ||
|
||
Motivation | ||
---------- | ||
|
||
The purpose of this tool is to convert C++ header files to a UML representation | ||
in `PlantUML <https://plantuml.com>`_ syntax that can be used to generate diagrams with PlantUML. | ||
|
||
`PlantUML <https://plantuml.com>`_ is a program rendering UML diagrams from plain text inputs using an | ||
expressive language. | ||
|
||
This module generates the text input to PlantUML from C++ header files. Its | ||
ambition is limited but it should produce reasonable conversion for simple class | ||
hierarchies. It aims at supporting: | ||
|
||
- class members with properties (``private``, ``method``, ``protected``), methods with | ||
basic qualifiers (``static``, abstract), | ||
|
||
- inheritance relationships, | ||
|
||
- aggregation relationships (very basic support). | ||
|
||
|
||
Usage | ||
----- | ||
|
||
.. _sec-module-usage: | ||
|
||
Usage | ||
----- | ||
|
||
The ``hpp2plantuml`` package can be used from the command line or as a module in | ||
other applications. | ||
|
||
Command line | ||
~~~~~~~~~~~~ | ||
|
||
The command line usage is (``hpp2plantuml --help``): | ||
|
||
|
||
:: | ||
|
||
usage: hpp2plantuml [-h] [-o FILE] -i HEADER-FILE | ||
|
||
hpp2plantuml tool. | ||
|
||
optional arguments: | ||
-h, --help show this help message and exit | ||
-o FILE, --output-file FILE | ||
Output file | ||
-i HEADER-FILE, --input-file HEADER-FILE | ||
Input file (must be quoted when using wildcards) | ||
|
||
|
||
Input files are added using the ``-i`` option. Inputs can be file paths or | ||
include wildcards. Note that the double quotes are required when using | ||
wildcards. The output file is selected with the ``-o`` option. The output is a | ||
text file following the PlantUML syntax. | ||
|
||
For instance, the following command will generate the input file for PlantUML | ||
from several header files and store the output to the ``output.puml`` file. | ||
|
||
.. code-block:: sh | ||
:name: usage-sh | ||
hpp2plantuml -i File_1.hpp -i "include/Helper_*.hpp" -o output.puml | ||
Module | ||
~~~~~~ | ||
|
||
To use as a module, simply ``import hpp2plantuml``. The ``CreatePlantUMLFile`` can | ||
then be used to create a PlantUML file from a set of input files. | ||
Alternatively, the ``Diagram`` object can be used directly to build internal | ||
objects (from files or strings). The ``Diagram.render()`` method can be used to | ||
produce a string output instead of writing to a text file. |
Oops, something went wrong.