Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\attribute -> \Attribute #3

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/latex/pgf-umlcd/demo/abstract-class.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\begin{tikzpicture}
\begin{abstractclass}[text width=5cm]{BankAccount}{0,0}
\attribute{owner : String}
\attribute{balance : Dollars = 0}
\Attribute{owner : String}
\Attribute{balance : Dollars = 0}

\operation{deposit(amount : Dollars)}
\operation[0]{withdrawl(amount : Dollars)}
Expand Down
18 changes: 9 additions & 9 deletions doc/latex/pgf-umlcd/demo/association.tex
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
\begin{tikzpicture}
\begin{class}[text width=7cm]{Flight}{0,0}
\attribute{flightNumber : Integer}
\attribute{departureTime : Date}
\attribute{flightDuration : Minutes}
\attribute{departingAirport : String}
\attribute{arrivingAirport : String}
\Attribute{flightNumber : Integer}
\Attribute{departureTime : Date}
\Attribute{flightDuration : Minutes}
\Attribute{departingAirport : String}
\Attribute{arrivingAirport : String}

\operation{delayFlight ( numberOfMinutes : Minutes )}
\operation{getArrivalTime ( ) : Date}
\end{class}

\begin{class}{Plane}{11,0}
\attribute{airPlaneType : String}
\attribute{maximumSpeed : MPH}
\attribute{maximumDistance : Miles}
\attribute{tailID : String}
\Attribute{airPlaneType : String}
\Attribute{maximumSpeed : MPH}
\Attribute{maximumDistance : Miles}
\Attribute{tailID : String}
\end{class}

\association{Plane}{assignedPlane}{0..1}{Flight}{0..*}{assignedFlights}
Expand Down
4 changes: 2 additions & 2 deletions doc/latex/pgf-umlcd/demo/class.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\begin{tikzpicture}
\begin{class}[text width=8cm]{ClassName}{0,0}
\attribute{name : attribute type}
\attribute{name : attribute type = default value}
\Attribute{name : attribute type}
\Attribute{name : attribute type = default value}

\operation{name(parameter list) : type of value returned}
% virtual operation
Expand Down
4 changes: 2 additions & 2 deletions doc/latex/pgf-umlcd/demo/color.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

\begin{tikzpicture}
\begin{class}[text width=8cm]{ClassName}{0,0}
\attribute{name : attribute type}
\attribute{name : attribute type = default value}
\Attribute{name : attribute type}
\Attribute{name : attribute type = default value}

\operation{name(parameter list) : type of value returned}
% virtual operation
Expand Down
8 changes: 4 additions & 4 deletions doc/latex/pgf-umlcd/demo/implement-interface.tex
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
\begin{tikzpicture}%[show background grid]
\begin{interface}{Person}{0,0}
\attribute{firstName : String}
\attribute{lastName : String}
\Attribute{firstName : String}
\Attribute{lastName : String}
\end{interface}

\begin{class}{Professor}{-5,-5}
\implement{Person}
\attribute{salary : Dollars}
\Attribute{salary : Dollars}
\end{class}

\begin{class}{Student}{5,-5}
\implement{Person}
\attribute{major : String}
\Attribute{major : String}
\end{class}
\end{tikzpicture}
8 changes: 4 additions & 4 deletions doc/latex/pgf-umlcd/demo/inheritance.tex
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
\begin{tikzpicture}
\begin{class}[text width=5cm]{BankAccount}{0,0}
\attribute{owner : String}
\attribute{balance : Dollars = 0}
\Attribute{owner : String}
\Attribute{balance : Dollars = 0}

\operation{deposit(amount : Dollars)}
\operation[0]{withdrawl(amount : Dollars)}
\end{class}

\begin{class}[text width=7cm]{CheckingAccount}{-5,-5}
\inherit{BankAccount}
\attribute{insufficientFundsFee : Dollars}
\Attribute{insufficientFundsFee : Dollars}

\operation{processCheck ( checkToProcess : Check )}
\operation{withdrawal ( amount : Dollars )}
\end{class}

\begin{class}[text width=7cm]{SavingsAccount}{5,-5}
\inherit{BankAccount}
\attribute{annualInteresRate : Percentage}
\Attribute{annualInteresRate : Percentage}

\operation{depositMonthlyInterest ( )}
\operation{withdrawal ( amount : Dollars )}
Expand Down
4 changes: 2 additions & 2 deletions doc/latex/pgf-umlcd/demo/interface.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\begin{tikzpicture}%[show background grid]
\begin{interface}{Person}{0,0}
\attribute{firstName : String}
\attribute{lastName : String}
\Attribute{firstName : String}
\Attribute{lastName : String}
\end{interface}
\end{tikzpicture}
4 changes: 2 additions & 2 deletions doc/latex/pgf-umlcd/demo/object-include-methods.tex
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
\begin{tikzpicture}
\begin{object}[text width=6cm]{Thomas' account}{0,0}
\instanceOf{BankAccount}
\attribute{owner = Thomas}
\attribute{balance = 100}
\Attribute{owner = Thomas}
\Attribute{balance = 100}

\operation{deposit(amount : Dollars)}
\operation[0]{withdrawl(amount : Dollars)}
Expand Down
2 changes: 1 addition & 1 deletion doc/latex/pgf-umlcd/demo/object.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\begin{tikzpicture}
\begin{object}[text width=6cm]{Instance Name}{0,0}
\instanceOf{Class Name}
\attribute{attribute name = value}
\Attribute{attribute name = value}
\end{object}
\end{tikzpicture}
8 changes: 4 additions & 4 deletions doc/latex/pgf-umlcd/demo/package.tex
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
\begin{tikzpicture}
\begin{package}{Accounts}
\begin{class}[text width=5cm]{BankAccount}{0,0}
\attribute{owner : String}
\attribute{balance : Dollars = 0}
\Attribute{owner : String}
\Attribute{balance : Dollars = 0}

\operation{deposit(amount : Dollars)}
\operation[0]{withdrawl(amount : Dollars)}
\end{class}

\begin{class}[text width=7cm]{CheckingAccount}{-5,-5}
\inherit{BankAccount}
\attribute{insufficientFundsFee : Dollars}
\Attribute{insufficientFundsFee : Dollars}

\operation{processCheck ( checkToProcess : Check )}
\operation{withdrawal ( amount : Dollars )}
\end{class}

\begin{class}[text width=7cm]{SavingsAccount}{5,-5}
\inherit{BankAccount}
\attribute{annualInteresRate : Percentage}
\Attribute{annualInteresRate : Percentage}

\operation{depositMonthlyInterest ( )}
\operation{withdrawal ( amount : Dollars )}
Expand Down
6 changes: 3 additions & 3 deletions doc/latex/pgf-umlcd/demo/unidirectional-association.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
% \draw[help lines] (-7,-6) grid (6,0);

\begin{class}[text width=6cm]{OverdrawnAccountsReport}{0,0}
\attribute{generatedOn : Date}
\Attribute{generatedOn : Date}

\operation{refresh ( )}
\end{class}

\begin{class}{BankAccount}{12,0}
\attribute{owner : String}
\attribute{balance : Dollars}
\Attribute{owner : String}
\Attribute{balance : Dollars}

\operation{deposit(amount : Dollars)}
\operation[0]{withdrawl(amount : Dollars)}
Expand Down
12 changes: 6 additions & 6 deletions doc/latex/pgf-umlcd/demo/visibility.tex
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
\begin{tikzpicture}%[show background grid]
\begin{class}[text width=7cm]{Class}{0,0}
\attribute{+ Public}
\attribute{\# Protected}
\attribute{- Private}
\attribute{$\sim$ Package}
\Attribute{+ Public}
\Attribute{\# Protected}
\Attribute{- Private}
\Attribute{$\sim$ Package}
\end{class}

\begin{class}[text width=7cm]{BankAccount}{0,-3}
\attribute{+ owner : String}
\attribute{+ balance : Dollars}
\Attribute{+ owner : String}
\Attribute{+ balance : Dollars}

\operation{+ deposit( amount : Dollars )}
\operation{+ withdrawal( amount : Dollars )}
Expand Down
7 changes: 6 additions & 1 deletion tex/latex/pgf-umlcd/pgf-umlcd.sty
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ minimum height=1cm, node distance=2cm]
\protected@xdef\umlcdPackageFit{\umlcdPackageFitOld (\umlcdClassName)}
}

\newcommand{\attribute}[1]{%
\newcommand{\Attribute}[1]{%
\ifnum\c@umlcdClassAttributesNum=0
\protected@xdef\umlcdClassAttributes{#1}
\else
Expand Down Expand Up @@ -360,5 +360,10 @@ minimum height=1cm, node distance=2cm]
\node[umlcd style, anchor=north, draw,shape=umlcdnote, text width=4cm, #1]
}

% Backwards compatibility for pdflatex/xelatex
\expandafter\ifx\csname attribute\endcsname\relax
\let\attribute\Attribute
\fi

%%% End of pgf-umlcd.sty
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%