From d305bcc6c081d0f7b0f496fc6fda2833359c064a Mon Sep 17 00:00:00 2001 From: thibault Date: Mon, 17 Apr 2023 04:43:52 -0400 Subject: [PATCH] Fix #25 (and attempt to fix readthedocs build) --- doc/source/org-doc.rst | 32 ++++++++++++++++++-------------- hpp2plantuml.org | 23 +++++++++++++---------- setup.py | 4 ++-- src/hpp2plantuml/hpp2plantuml.py | 3 +++ tests/simple_classes.puml | 2 +- tests/simple_classes_nodep.puml | 2 +- tests/test_hpp2plantuml.py | 4 +++- 7 files changed, 41 insertions(+), 29 deletions(-) diff --git a/doc/source/org-doc.rst b/doc/source/org-doc.rst index cb55853..80566b9 100644 --- a/doc/source/org-doc.rst +++ b/doc/source/org-doc.rst @@ -654,6 +654,9 @@ to the `sec-module-class-member`_. super().__init__(class_variable, member_scope) self._type = _cleanup_type(class_variable['type']) + if class_variable.get('array', 0): + self._type += '[]' + def get_type(self): """Variable type accessor @@ -2298,15 +2301,17 @@ the representation of variables. .. table:: List of test segments and corresponding PlantUML strings. :name: tbl-unittest-class_var - +---------------------------------------------+-------------------+ - | C++ | plantuml | - +=============================================+===================+ - | "class Test {\npublic:\nint member; };" | "+member : int" | - +---------------------------------------------+-------------------+ - | "class Test {\nprivate:\nint \* member; };" | "-member : int\*" | - +---------------------------------------------+-------------------+ - | "class Test {\nprotected:\nint &member; };" | "#member : int&" | - +---------------------------------------------+-------------------+ + +------------------------------------------------+-------------------+ + | C++ | plantuml | + +================================================+===================+ + | "class Test {\npublic:\nint member; };" | "+member : int" | + +------------------------------------------------+-------------------+ + | "class Test {\nprivate:\nint \* member; };" | "-member : int\*" | + +------------------------------------------------+-------------------+ + | "class Test {\nprotected:\nint &member; };" | "#member : int&" | + +------------------------------------------------+-------------------+ + | "class Test {\nprotected:\nint member[10]; };" | "#member : int[]" | + +------------------------------------------------+-------------------+ .. code:: python @@ -2705,7 +2710,7 @@ The comparison takes into account the white space, indentation, etc. class anon_union_1 { - +vec : float + +vec : float[] } @@ -2898,7 +2903,7 @@ The comparison takes into account the white space, indentation, etc. class anon_union_1 { - +vec : float + +vec : float[] } @@ -3390,14 +3395,13 @@ options. Most of it is taken from `this post