|
95 | 95 |
|
96 | 96 | \begin{document} |
97 | 97 |
|
98 | | -% % title page |
99 | | -% \thispagestyle{empty} |
100 | | -% % Upper part of the page |
101 | | -% \begin{center} |
102 | | -% \includegraphics[width=0.25\textwidth]{Python_Logo.png}\\[1cm] |
103 | | -% \end{center} |
104 | | -% % Title |
105 | | -% \HRule \\[0.4cm] |
106 | | -% {\Huge \bfseries \color{RoyalBlue}Design Patterns in Python} \\[0.4cm] |
107 | | -% {\huge or How I Learned to Stop Worrying and Love The Gang of Four} \\[0.4cm] |
108 | | -% \HRule \\[1.5cm] |
109 | | -% |
110 | | -% % Author |
111 | | -% \begin{minipage}{0.4\textwidth} |
112 | | -% \begin{flushleft} |
113 | | -% \Large David Corne |
114 | | -% \end{flushleft} |
115 | | -% \end{minipage} |
116 | | -% |
117 | | -% \vfill |
118 | | -% % Bottom of the page |
119 | | -% % {\large August 2012.} |
120 | | -% |
121 | | -% \frontmatter |
122 | | -% \tableofcontents |
123 | | -% |
124 | | -% \chapter{Acknowledgments} |
125 | | -% \mainmatter |
| 98 | +% title page |
| 99 | +\thispagestyle{empty} |
| 100 | +% Upper part of the page |
| 101 | +\begin{center} |
| 102 | + \includegraphics[width=0.25\textwidth]{Python_Logo.png}\\[1cm] |
| 103 | +\end{center} |
| 104 | +% Title |
| 105 | +\HRule \\[0.4cm] |
| 106 | + {\Huge \bfseries \color{RoyalBlue}Design Patterns in Python} \\[0.4cm] |
| 107 | + {\huge or How I Learned to Stop Worrying and Love The Gang of Four} \\[0.4cm] |
| 108 | +\HRule \\[1.5cm] |
| 109 | + |
| 110 | +% Author |
| 111 | +\begin{minipage}{0.4\textwidth} |
| 112 | + \begin{flushleft} |
| 113 | + \Large David Corne |
| 114 | + \end{flushleft} |
| 115 | +\end{minipage} |
| 116 | + |
| 117 | +\vfill |
| 118 | +% Bottom of the page |
| 119 | +% {\large August 2012.} |
| 120 | + |
| 121 | +\frontmatter |
| 122 | +\tableofcontents |
| 123 | + |
| 124 | +\chapter{Acknowledgments} |
| 125 | +\mainmatter |
126 | 126 |
|
127 | 127 | \chapter{Introduction} |
128 | 128 | There are many places this is usful, there have been a few tries to do this. |
@@ -300,77 +300,77 @@ \section{Model View View-Model} |
300 | 300 |
|
301 | 301 | \chapter{Summary} |
302 | 302 |
|
303 | | -% \part*{Appendicies} |
304 | | -% \addcontentsline{toc}{part}{Appendicies} |
305 | | -% \appendix |
306 | | -% \chapter{Creational Code Examples} |
307 | | -% |
308 | | -% \section{Abstract Factory} |
309 | | -% \lstinputlisting{Abstract_Factory.py} |
310 | | -% |
311 | | -% \section{Builder} |
312 | | -% \lstinputlisting{Builder.py} |
313 | | -% \section{Factory Method} |
314 | | -% \lstinputlisting{Factory_Method.py} |
315 | | -% \section{Prototype} |
316 | | -% \lstinputlisting{Prototype.py} |
317 | | -% \section{Singleton} |
318 | | -% \lstinputlisting{Singleton.py} |
319 | | -% |
320 | | -% \chapter{Structural Code Examples} |
321 | | -% |
322 | | -% \section{Adapter} |
323 | | -% \lstinputlisting{Adapter.py} |
324 | | -% \section{Bridge} |
325 | | -% \lstinputlisting{Bridge.py} |
326 | | -% \section{Composite} |
327 | | -% \lstinputlisting{Composite.py} |
328 | | -% \section{Decorator} |
329 | | -% \lstinputlisting{Decorator.py} |
330 | | -% \section{Facade} |
331 | | -% \lstinputlisting{Facade.py} |
332 | | -% \section{Flyweight} |
333 | | -% \lstinputlisting{Flyweight.py} |
334 | | -% \section{Proxy} |
335 | | -% \lstinputlisting{Proxy.py} |
336 | | -% |
337 | | -% \chapter{Behavioural Code Examples} |
338 | | -% |
339 | | -% \section{Chain of Responsibility} |
340 | | -% \lstinputlisting{Chain_of_Responsibility.py} |
341 | | -% \section{Command} |
342 | | -% \lstinputlisting{Command.py} |
343 | | -% \section{Interpreter} |
344 | | -% \lstinputlisting{Interpreter.py} |
345 | | -% \section{Iterator} |
346 | | -% \lstinputlisting{Iterator.py} |
347 | | -% \section{Mediator} |
348 | | -% \lstinputlisting{Mediator.py} |
349 | | -% \section{Memento} |
350 | | -% \lstinputlisting{Memento.py} |
351 | | -% \section{Observer} |
352 | | -% \lstinputlisting{Observer.py} |
353 | | -% \section{State} |
354 | | -% \lstinputlisting{State.py} |
355 | | -% \section{Strategy} |
356 | | -% \lstinputlisting{Strategy.py} |
357 | | -% \section{Template Method} |
358 | | -% \lstinputlisting{Template_Method.py} |
359 | | -% \section{Visitor} |
360 | | -% \lstinputlisting{Visitor.py} |
361 | | -% |
362 | | -% \chapter{Non GOF Patterns/GUI Patterns Code Examples} |
363 | | -% \section{Model View Presenter} |
364 | | -% \lstinputlisting{Model_View_Presenter.py} |
365 | | -% \section{Model View Controller} |
366 | | -% \lstinputlisting{Model_View_Controller.py} |
367 | | -% \section{Model View View-Model} |
368 | | -% \lstinputlisting{Model_View_View-Model.py} |
369 | | -% |
370 | | -% \begin{thebibliography}{99} |
371 | | -% \bibitem{GOF} Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, \emph{Design Patterns: Elements of Reusable Object-Oriented Software} (: Addison-Wesley Professional, January 15, 1995) |
372 | | -% \bibitem{python-patterns-site} http://ginstrom.com/scribbles/2007/10/08/design-patterns-python-style |
373 | | -% \end{thebibliography} |
| 303 | +\part*{Appendicies} |
| 304 | +\addcontentsline{toc}{part}{Appendicies} |
| 305 | +\appendix |
| 306 | +\chapter{Creational Code Examples} |
| 307 | + |
| 308 | +\section{Abstract Factory} |
| 309 | +\lstinputlisting{Abstract_Factory.py} |
| 310 | + |
| 311 | +\section{Builder} |
| 312 | +\lstinputlisting{Builder.py} |
| 313 | +\section{Factory Method} |
| 314 | +\lstinputlisting{Factory_Method.py} |
| 315 | +\section{Prototype} |
| 316 | +\lstinputlisting{Prototype.py} |
| 317 | +\section{Singleton} |
| 318 | +\lstinputlisting{Singleton.py} |
| 319 | + |
| 320 | +\chapter{Structural Code Examples} |
| 321 | + |
| 322 | +\section{Adapter} |
| 323 | +\lstinputlisting{Adapter.py} |
| 324 | +\section{Bridge} |
| 325 | +\lstinputlisting{Bridge.py} |
| 326 | +\section{Composite} |
| 327 | +\lstinputlisting{Composite.py} |
| 328 | +\section{Decorator} |
| 329 | +\lstinputlisting{Decorator.py} |
| 330 | +\section{Facade} |
| 331 | +\lstinputlisting{Facade.py} |
| 332 | +\section{Flyweight} |
| 333 | +\lstinputlisting{Flyweight.py} |
| 334 | +\section{Proxy} |
| 335 | +\lstinputlisting{Proxy.py} |
| 336 | + |
| 337 | +\chapter{Behavioural Code Examples} |
| 338 | + |
| 339 | +\section{Chain of Responsibility} |
| 340 | +\lstinputlisting{Chain_of_Responsibility.py} |
| 341 | +\section{Command} |
| 342 | +\lstinputlisting{Command.py} |
| 343 | +\section{Interpreter} |
| 344 | +\lstinputlisting{Interpreter.py} |
| 345 | +\section{Iterator} |
| 346 | +\lstinputlisting{Iterator.py} |
| 347 | +\section{Mediator} |
| 348 | +\lstinputlisting{Mediator.py} |
| 349 | +\section{Memento} |
| 350 | +\lstinputlisting{Memento.py} |
| 351 | +\section{Observer} |
| 352 | +\lstinputlisting{Observer.py} |
| 353 | +\section{State} |
| 354 | +\lstinputlisting{State.py} |
| 355 | +\section{Strategy} |
| 356 | +\lstinputlisting{Strategy.py} |
| 357 | +\section{Template Method} |
| 358 | +\lstinputlisting{Template_Method.py} |
| 359 | +\section{Visitor} |
| 360 | +\lstinputlisting{Visitor.py} |
| 361 | + |
| 362 | +\chapter{Non GOF Patterns/GUI Patterns Code Examples} |
| 363 | +\section{Model View Presenter} |
| 364 | +\lstinputlisting{Model_View_Presenter.py} |
| 365 | +\section{Model View Controller} |
| 366 | +\lstinputlisting{Model_View_Controller.py} |
| 367 | +\section{Model View View-Model} |
| 368 | +\lstinputlisting{Model_View_View-Model.py} |
| 369 | + |
| 370 | +\begin{thebibliography}{99} |
| 371 | +\bibitem{GOF} Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, \emph{Design Patterns: Elements of Reusable Object-Oriented Software} (Boston, MA: Addison-Wesley, January 15, 1995) |
| 372 | +\bibitem{python-patterns-site} http://ginstrom.com/scribbles/2007/10/08/design-patterns-python-style |
| 373 | +\end{thebibliography} |
374 | 374 | \end{document} |
375 | 375 |
|
376 | 376 |
|
|
0 commit comments