pyumldiagrams.BaseDiagram
Classes
Always lays out in portrait mode. Currently only supports UML classes with methods. Only supports |
Module Contents
- class pyumldiagrams.BaseDiagram.BaseDiagram(fileName: str, docDisplayMethodParameters: pyumldiagrams.Definitions.DisplayMethodParameters = DisplayMethodParameters.DISPLAY, dpi: int = 0, headerText: str = '')
Bases:
abc.ABC
Always lays out in portrait mode. Currently only supports UML classes with methods. Only supports inheritance, composition, and aggregation lines.
You are allowed to set the gap between UML classes both horizontally and vertically. Also, you are allowed to specify the text font size
- Parameters:
fileName – Fully qualified file name
docDisplayMethodParameters – global flag to determine whether or display a method’s parameters
dpi – dots per inch for the display we are mapping from;
device (Some diagramming documents may not need a value for this since they map directly to display)
headerText – The header to place on the page
- MethodsRepr
- FieldsRepr
- DEFAULT_FONT_SIZE: Final = 10
- HEADER_FONT_SIZE: Final = 14
- RESOURCE_ENV_VAR: Final = 'RESOURCEPATH'
- clsLogger: logging.Logger
- property fontSize: int
The font size to use in the generated UML diagram. If unchanged the value is pyumldiagrams.BaseDiagram.BaseDiagram.DEFAULT_FONT_SIZE
- property horizontalGap: int
The horizontal gap between UML elements. If not set then the value is pyumldiagrams.Defaults.DEFAULT_HORIZONTAL_GAP
- property verticalGap: int
The vertical gap between UML elements. If not set then the value is pyumldiagrams.Defaults.DEFAULT_VERTICAL_GAP
- property softwareNameVersion: str
Used to place the software name and version of the application using this library onto the generated image EXIF metadata
- property docTimeStamp: datetime.datetime
Must be overridden by implementors
- retrieveResourcePath(bareFileName: str) str
Must be overridden by implementors
- Parameters:
bareFileName
Returns: a fully qualified name
- drawClass(classDefinition: pyumldiagrams.Definitions.ClassDefinition)
Draw the class diagram defined by the input Must be overridden by implementors
- Parameters:
classDefinition – The class definition
- abstractmethod drawUmlLine(lineDefinition: pyumldiagrams.Definitions.UmlLineDefinition)
Draw the inheritance, aggregation, or composition lines that describe the relationships between the UML classes
Must be overridden by implementors
- Parameters:
lineDefinition – A UML Line definition
- abstractmethod drawNote(noteDefinition: pyumldiagrams.Definitions.NoteDefinition)
Draw a UML Note
Must be overridden by implementors
- Parameters:
noteDefinition – A UML Note definition
- abstractmethod drawUmlLollipop(umlLollipopDefinition: pyumldiagrams.Definitions.UmlLollipopDefinition)
Draw a UML Lollipop interface
Must be overridden by implementors
- Parameters:
umlLollipopDefinition – A UML Lollipop Interface definition
- abstractmethod drawEllipse(definition: pyumldiagrams.Definitions.EllipseDefinition)
Draw a general purpose ellipse
- Parameters:
definition – It’s definition
- abstractmethod drawRectangle(definition: pyumldiagrams.Definitions.RectangleDefinition)
Draw a general purpose rectangle
- Parameters:
definition – The rectangle definition
- abstractmethod write()
Call this method when you are done with placing the diagram onto a document. Must be overridden by implementors