pyumldiagrams.Definitions

Attributes

ClassName

Parameters

Syntactic sugar to define a list of parameters.

Methods

Syntactic sugar to define a list of methods.

Fields

ClassDefinitions

Content

Contents

UmlNoteDefinitions

NamedAssociations

LinePositions

UmlLineDefinitions

Syntactic sugar to define a list of UML Lines.

UmlLollipopDefinitions

Classes

DiagramPadding

todo:: These should move to the Internal package

Size

Defines the size of the input UML definitions;

VisibilityType

Defines the visibility of either methods or fields

BaseDefinition

DefaultValueDefinition

ParameterDefinition

Defines a single parameter for a method

DisplayMethodParameters

Create a collection of name/value pairs.

MethodDefinition

Defines a single method in a single UML class

FieldDefinition

Defines a single instance variable

ShapeDefinition

ClassDefinition

The class definition. Currently, does not support instance properties.

NoteDefinition

LineType

The type of UML line you wish to draw. Currently, bare associations are not supported.

LineDefinition

Defines a line between many points; Index 0 the start of the line; That last point

UmlLineDefinition

A UML Line definition includes its type

UmlLollipopDefinition

RenderStyle

An enumeration that determines how to draw various UML and other graphical elements

RectangleDefinition

Defines a rectangle

EllipseDefinition

This is just typing syntactical sugar on how to define an Ellipse.

Functions

createPositionFactory(→ codeallybasic.Position.Position)

createSizeFactory(→ Size)

createParametersFactory(→ Parameters)

createMethodsFactory(→ Methods)

createFieldsFactory(→ Fields)

createContentsFactory(→ Contents)

Module Contents

pyumldiagrams.Definitions.ClassName
pyumldiagrams.Definitions.createPositionFactory() codeallybasic.Position.Position
class pyumldiagrams.Definitions.DiagramPadding

todo:: These should move to the Internal package

topMargin: int

The diagram’s observed top margin. See pyumldiagrams.Defaults.TOP_MARGIN

leftMargin: int

The diagram’s observed left margin. See pyumldiagrams.Defaults.LEFT_MARGIN

horizontalGap: int

The horizontal gap between UML graphics added to the layout in addition to the gap imposed by the actual graphics positions. See pyumldiagrams.Defaults.DEFAULT_HORIZONTAL_GAP

verticalGap: int

The vertical gap between UML graphics added to the layout in addition to the gap imposed by the actual graphics positions. See pyumldiagrams.Defaults.DEFAULT_VERTICAL_GAP

class pyumldiagrams.Definitions.Size

Defines the size of the input UML definitions;

width: int = 100

The width of a shape

height: int = 100

The height of the shape

pyumldiagrams.Definitions.createSizeFactory() Size
class pyumldiagrams.Definitions.VisibilityType(*args, **kwds)

Bases: enum.Enum

Inheritance diagram of pyumldiagrams.Definitions.VisibilityType

Defines the visibility of either methods or fields

Public = '+'
Private = '-'
Protected = '#'
static toEnum(strValue: str) VisibilityType

Converts the input string to the line type enum :param strValue: The serialized string representation

Returns: The line type enumeration

class pyumldiagrams.Definitions.BaseDefinition
name: str

The name associated with the definition.

class pyumldiagrams.Definitions.DefaultValueDefinition

Bases: BaseDefinition

Inheritance diagram of pyumldiagrams.Definitions.DefaultValueDefinition
defaultValue: str = ''

A string that describes a parameter default value

class pyumldiagrams.Definitions.ParameterDefinition

Bases: DefaultValueDefinition

Inheritance diagram of pyumldiagrams.Definitions.ParameterDefinition

Defines a single parameter for a method

parameterType: str = ''

A string that describes the parameter type

pyumldiagrams.Definitions.Parameters

Syntactic sugar to define a list of parameters.

class pyumldiagrams.Definitions.DisplayMethodParameters(*args, **kwds)

Bases: enum.Enum

Inheritance diagram of pyumldiagrams.Definitions.DisplayMethodParameters

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

>>> Color.RED
<Color.RED: 1>
  • value lookup:

>>> Color(1)
<Color.RED: 1>
  • name lookup:

>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

DISPLAY = 'Display'
DO_NOT_DISPLAY = 'DoNotDisplay'
UNSPECIFIED = 'Unspecified'
pyumldiagrams.Definitions.createParametersFactory() Parameters
class pyumldiagrams.Definitions.MethodDefinition

Bases: BaseDefinition

Inheritance diagram of pyumldiagrams.Definitions.MethodDefinition

Defines a single method in a single UML class

visibility: VisibilityType

Defines the method visibility. See VisibilityType

returnType: str = ''

Defines the method return type.

parameters: Parameters

Define the parameters for a particular method

pyumldiagrams.Definitions.Methods

Syntactic sugar to define a list of methods.

pyumldiagrams.Definitions.createMethodsFactory() Methods
class pyumldiagrams.Definitions.FieldDefinition

Bases: DefaultValueDefinition

Inheritance diagram of pyumldiagrams.Definitions.FieldDefinition

Defines a single instance variable

fieldType: str = ''

A string that describes the field type

visibility: VisibilityType

Defines the field visibility. See VisibilityType

pyumldiagrams.Definitions.Fields
pyumldiagrams.Definitions.createFieldsFactory() Fields
class pyumldiagrams.Definitions.ShapeDefinition

Bases: BaseDefinition

Inheritance diagram of pyumldiagrams.Definitions.ShapeDefinition
size: Size

The size of UML class symbol. See Size

position: codeallybasic.Position.Position

The position of the UML class symbol. See Position

class pyumldiagrams.Definitions.ClassDefinition

Bases: ShapeDefinition

Inheritance diagram of pyumldiagrams.Definitions.ClassDefinition

The class definition. Currently, does not support instance properties.

methods: Methods

The list of methods this class implements.

fields: Fields

The list of instance variables this class defines.

displayStereotype: bool = True

If true display the class stereotype when drawing the class diagram

displayMethods: bool = True

If True display the class methods

displayFields: bool = True

If True display the class instance variables

displayMethodParameters: DisplayMethodParameters

If True display the method parameters; If UNSPECIFIED defer to global

fileName: str = ''

The file name where the original source code came from (only if reverse engineered)

description: str = ''

Text describing the rationale for this class

pyumldiagrams.Definitions.ClassDefinitions
pyumldiagrams.Definitions.Content
pyumldiagrams.Definitions.Contents
pyumldiagrams.Definitions.createContentsFactory() Contents
class pyumldiagrams.Definitions.NoteDefinition

Bases: ShapeDefinition

Inheritance diagram of pyumldiagrams.Definitions.NoteDefinition
content: Contents

The note content

pyumldiagrams.Definitions.UmlNoteDefinitions
class pyumldiagrams.Definitions.LineType(*args, **kwds)

Bases: enum.Enum

Inheritance diagram of pyumldiagrams.Definitions.LineType

The type of UML line you wish to draw. Currently, bare associations are not supported.

Inheritance = 0
Interface = 1
Aggregation = 3
Composition = 7
Association = 9
Lollipop = 13
static toEnum(strValue: str) LineType

Converts the input string to the line type enum :param strValue: The serialized string representation

Returns: The line type enumeration

pyumldiagrams.Definitions.NamedAssociations: List[LineType]
pyumldiagrams.Definitions.LinePositions
class pyumldiagrams.Definitions.LineDefinition

Defines a line between many points; Index 0 the start of the line; That last point is the end of the line

linePositions: LinePositions
class pyumldiagrams.Definitions.UmlLineDefinition

Bases: LineDefinition

Inheritance diagram of pyumldiagrams.Definitions.UmlLineDefinition

A UML Line definition includes its type

lineType: LineType

The UML line type See LineType.

name: str = ''

Name of composition, aggregation association links

cardinalitySource: str = ''
cardinalityDestination: str = ''

Cardinality values used for composition, aggregation, and association links

namePosition: codeallybasic.Position.Position
sourceCardinalityPosition: codeallybasic.Position.Position
destinationCardinalityPosition: codeallybasic.Position.Position
pyumldiagrams.Definitions.UmlLineDefinitions

Syntactic sugar to define a list of UML Lines.

class pyumldiagrams.Definitions.UmlLollipopDefinition
name: str = ''

Interface Name

attachmentSide: codeallyadvanced.ui.AttachmentSide.AttachmentSide = None
position: codeallybasic.Position.Position
pyumldiagrams.Definitions.UmlLollipopDefinitions
class pyumldiagrams.Definitions.RenderStyle(*args, **kwds)

Bases: enum.Enum

Inheritance diagram of pyumldiagrams.Definitions.RenderStyle

An enumeration that determines how to draw various UML and other graphical elements

Draw = 'D'

Just draw the outline

Fill = 'F'

Just fill in the area associated with the shape

DrawFill = 'DF'

Do both when drawing the UML shape or figure

class pyumldiagrams.Definitions.RectangleDefinition

Defines a rectangle

renderStyle: RenderStyle

How to draw the rectangle. See RenderStyle

position: codeallybasic.Position.Position

Where to put the rectangle. See Position

size: Size

The rectangle size. See Size

class pyumldiagrams.Definitions.EllipseDefinition

Bases: RectangleDefinition

Inheritance diagram of pyumldiagrams.Definitions.EllipseDefinition

This is just typing syntactical sugar on how to define an Ellipse.