diff options
Added files from project 1 (mirror)
58 files changed, 8880 insertions, 0 deletions
diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Command_8h.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Command_8h.tex new file mode 100644 index 0000000..2928852 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Command_8h.tex @@ -0,0 +1,17 @@ +\hypertarget{Command_8h}{}\doxysection{src/\+Generic/\+Console\+Interface/\+Command.h File Reference} +\label{Command_8h}\index{src/Generic/ConsoleInterface/Command.h@{src/Generic/ConsoleInterface/Command.h}} + + +Stores the declaration of class \mbox{\hyperlink{classCommand}{Command}}. + + +\doxysubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classCommand}{Command}} +\begin{DoxyCompactList}\small\item\em Stores a 256 character name and a function pointer to be executed when calling \mbox{\hyperlink{classCommand_a44689093b812bfc97b2787c2ba0303ce}{run()}} \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores the declaration of class \mbox{\hyperlink{classCommand}{Command}}. + diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Command_8h_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Command_8h_source.tex new file mode 100644 index 0000000..96a94d4 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Command_8h_source.tex @@ -0,0 +1,22 @@ +\hypertarget{Command_8h_source}{}\doxysection{Command.\+h} +\label{Command_8h_source}\index{src/Generic/ConsoleInterface/Command.h@{src/Generic/ConsoleInterface/Command.h}} +\mbox{\hyperlink{Command_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_CONSOLEINTERFACE\_COMMAND}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_CONSOLEINTERFACE\_COMMAND}} +\DoxyCodeLine{3 } +\DoxyCodeLine{12 \textcolor{keyword}{class }\mbox{\hyperlink{classCommand}{Command}} \{} +\DoxyCodeLine{13 \textcolor{keywordtype}{char} nameInMenu[256];} +\DoxyCodeLine{14 void (*exec)();} +\DoxyCodeLine{15 } +\DoxyCodeLine{16 \textcolor{keyword}{public}:} +\DoxyCodeLine{18 \mbox{\hyperlink{classCommand_a18df2d81039392daeb0b78c346a70537}{Command}}();} +\DoxyCodeLine{20 \mbox{\hyperlink{classCommand_a18df2d81039392daeb0b78c346a70537}{Command}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* nameInMenu, \textcolor{keywordtype}{void} (*exec)());} +\DoxyCodeLine{22 \textcolor{keywordtype}{void} \mbox{\hyperlink{classCommand_a44689093b812bfc97b2787c2ba0303ce}{run}}() \textcolor{keyword}{const};} +\DoxyCodeLine{23 } +\DoxyCodeLine{24 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* get\_nameInMenu() \textcolor{keyword}{const};} +\DoxyCodeLine{25 \};} +\DoxyCodeLine{26 } +\DoxyCodeLine{27 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Date_8h.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Date_8h.tex new file mode 100644 index 0000000..3143f33 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Date_8h.tex @@ -0,0 +1,60 @@ +\hypertarget{Date_8h}{}\doxysection{src/\+Generic/\+Date/\+Date.h File Reference} +\label{Date_8h}\index{src/Generic/Date/Date.h@{src/Generic/Date/Date.h}} + + +Stores the declaration of class \mbox{\hyperlink{classDate}{Date}}. + + +{\ttfamily \#include $<$istream$>$}\newline +{\ttfamily \#include $<$ostream$>$}\newline +{\ttfamily \#include \char`\"{}../\+String/\+String.\+h\char`\"{}}\newline +\doxysubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classDate}{Date}} +\begin{DoxyCompactList}\small\item\em Stores a day, month and year. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Functions} +\begin{DoxyCompactItemize} +\item +std\+::istream \& \mbox{\hyperlink{Date_8h_ae020cf1772268f1a43d172d3adfc9797}{operator$>$$>$}} (std\+::istream \&istr, \mbox{\hyperlink{classDate}{Date}} \&dt) +\begin{DoxyCompactList}\small\item\em Reads date from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. \end{DoxyCompactList}\item +std\+::ostream \& \mbox{\hyperlink{Date_8h_ad12d4bbc4f7919efdec583d1478a6a76}{operator$<$$<$}} (std\+::ostream \&ostr, const \mbox{\hyperlink{classDate}{Date}} \&dt) +\begin{DoxyCompactList}\small\item\em Writes date to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores the declaration of class \mbox{\hyperlink{classDate}{Date}}. + + + +\doxysubsection{Function Documentation} +\mbox{\Hypertarget{Date_8h_ad12d4bbc4f7919efdec583d1478a6a76}\label{Date_8h_ad12d4bbc4f7919efdec583d1478a6a76}} +\index{Date.h@{Date.h}!operator$<$$<$@{operator$<$$<$}} +\index{operator$<$$<$@{operator$<$$<$}!Date.h@{Date.h}} +\doxysubsubsection{\texorpdfstring{operator$<$$<$()}{operator<<()}} +{\footnotesize\ttfamily std\+::ostream \& operator$<$$<$ (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr, }\item[{const \mbox{\hyperlink{classDate}{Date}} \&}]{dt }\end{DoxyParamCaption})} + + + +Writes date to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. + +Uses the stream\textquotesingle{}s \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator to write the date in the format \char`\"{}day.\+month.\+year\char`\"{} + +\begin{DoxyNote}{Note} +Best used with std\+::cout or text std\+::ofstream +\end{DoxyNote} +\mbox{\Hypertarget{Date_8h_ae020cf1772268f1a43d172d3adfc9797}\label{Date_8h_ae020cf1772268f1a43d172d3adfc9797}} +\index{Date.h@{Date.h}!operator$>$$>$@{operator$>$$>$}} +\index{operator$>$$>$@{operator$>$$>$}!Date.h@{Date.h}} +\doxysubsubsection{\texorpdfstring{operator$>$$>$()}{operator>>()}} +{\footnotesize\ttfamily std\+::istream \& operator$>$$>$ (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr, }\item[{\mbox{\hyperlink{classDate}{Date}} \&}]{dt }\end{DoxyParamCaption})} + + + +Reads date from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. + +Uses the stream\textquotesingle{}s \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator to read and parse the day, month and year. + +\begin{DoxyNote}{Note} +Best used with std\+::cin or text std\+::ifstream +\end{DoxyNote} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Date_8h_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Date_8h_source.tex new file mode 100644 index 0000000..fb3dfdc --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Date_8h_source.tex @@ -0,0 +1,44 @@ +\hypertarget{Date_8h_source}{}\doxysection{Date.\+h} +\label{Date_8h_source}\index{src/Generic/Date/Date.h@{src/Generic/Date/Date.h}} +\mbox{\hyperlink{Date_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_DATE}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_DATE}} +\DoxyCodeLine{3 } +\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <istream>}} +\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <ostream>}} +\DoxyCodeLine{10 \textcolor{preprocessor}{\#include "{}../String/String.h"{}}} +\DoxyCodeLine{11 } +\DoxyCodeLine{14 \textcolor{keyword}{class }\mbox{\hyperlink{classDate}{Date}} \{} +\DoxyCodeLine{15 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} day;} +\DoxyCodeLine{16 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} month;} +\DoxyCodeLine{17 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} year;} +\DoxyCodeLine{18 } +\DoxyCodeLine{19 \textcolor{keywordtype}{bool} isLeapYear();} +\DoxyCodeLine{20 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} daysInMonth();} +\DoxyCodeLine{21 } +\DoxyCodeLine{22 \textcolor{keyword}{public}:} +\DoxyCodeLine{24 \mbox{\hyperlink{classDate_a4e59ed4ba66eec61c27460c5d09fa1bd}{Date}}();} +\DoxyCodeLine{26 \mbox{\hyperlink{classDate_a4e59ed4ba66eec61c27460c5d09fa1bd}{Date}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* str);} +\DoxyCodeLine{28 \mbox{\hyperlink{classDate_a4e59ed4ba66eec61c27460c5d09fa1bd}{Date}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} day, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} month, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} year);} +\DoxyCodeLine{29 } +\DoxyCodeLine{31 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} \mbox{\hyperlink{classDate_a2e4dc4249f8cccd40acc5950b42e1339}{get\_day}}() \textcolor{keyword}{const};} +\DoxyCodeLine{33 \textcolor{keywordtype}{bool} \mbox{\hyperlink{classDate_acaf0c3ee1b2d36edf4f870ddd8acce08}{set\_day}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} day);} +\DoxyCodeLine{35 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} \mbox{\hyperlink{classDate_a79ebbf3cb46f892604dc79ffc82bcfcc}{get\_month}}() \textcolor{keyword}{const};} +\DoxyCodeLine{37 \textcolor{keywordtype}{bool} \mbox{\hyperlink{classDate_ad0a591a557ddde0871389c3d716e6044}{set\_month}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} month);} +\DoxyCodeLine{39 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} \mbox{\hyperlink{classDate_a025aae2b290ba357e049d054085f91e3}{get\_year}}() \textcolor{keyword}{const};} +\DoxyCodeLine{41 \textcolor{keywordtype}{bool} \mbox{\hyperlink{classDate_a6a0f3124e1850cd9f1514ebffcdd0cae}{set\_year}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} year);} +\DoxyCodeLine{42 } +\DoxyCodeLine{44 \mbox{\hyperlink{classString}{String}} \mbox{\hyperlink{classDate_a6e00ace9f8c923c96188bd76f1e064c2}{createString}}() \textcolor{keyword}{const};} +\DoxyCodeLine{45 } +\DoxyCodeLine{47 \textcolor{keywordtype}{void} \mbox{\hyperlink{classDate_a982c0c9098056aa33c5cbc9eba093852}{read}}(std::istream\& istr);} +\DoxyCodeLine{49 \textcolor{keywordtype}{void} \mbox{\hyperlink{classDate_a9c728831f35f27abf3348132a13b7844}{write}}(std::ostream\& ostr);} +\DoxyCodeLine{51 \textcolor{keywordtype}{int} \mbox{\hyperlink{classDate_a3cda588bf2f65b84639303a1aa1105be}{compare}}(\textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& other) \textcolor{keyword}{const};} +\DoxyCodeLine{52 \};} +\DoxyCodeLine{53 } +\DoxyCodeLine{55 std::istream\& \mbox{\hyperlink{Date_8h_ae020cf1772268f1a43d172d3adfc9797}{operator>>}}(std::istream\& istr, \mbox{\hyperlink{classDate}{Date}}\& dt);} +\DoxyCodeLine{57 std::ostream\& \mbox{\hyperlink{Date_8h_ad12d4bbc4f7919efdec583d1478a6a76}{operator<<}}(std::ostream\& ostr, \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& dt);} +\DoxyCodeLine{58 } +\DoxyCodeLine{59 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/EventService_8h.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/EventService_8h.tex new file mode 100644 index 0000000..45099e1 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/EventService_8h.tex @@ -0,0 +1,22 @@ +\hypertarget{EventService_8h}{}\doxysection{src/\+Services/\+Event\+Service.h File Reference} +\label{EventService_8h}\index{src/Services/EventService.h@{src/Services/EventService.h}} + + +Stores the declaration of class \mbox{\hyperlink{classEventService}{Event\+Service}}. + + +{\ttfamily \#include \char`\"{}../\+Generic/\+List/\+Ordered\+List.\+hpp\char`\"{}}\newline +{\ttfamily \#include \char`\"{}../\+Generic/\+Date/\+Date.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}../\+Models/\+Event.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Hall\+Service.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Status\+Code.\+h\char`\"{}}\newline +\doxysubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classEventService}{Event\+Service}} +\begin{DoxyCompactList}\small\item\em Each \mbox{\hyperlink{classEventService}{Event\+Service}} stores all events and a pointer to \mbox{\hyperlink{classHallService}{Hall\+Service}}. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores the declaration of class \mbox{\hyperlink{classEventService}{Event\+Service}}. + diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/EventService_8h_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/EventService_8h_source.tex new file mode 100644 index 0000000..07b9197 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/EventService_8h_source.tex @@ -0,0 +1,49 @@ +\hypertarget{EventService_8h_source}{}\doxysection{Event\+Service.\+h} +\label{EventService_8h_source}\index{src/Services/EventService.h@{src/Services/EventService.h}} +\mbox{\hyperlink{EventService_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_SERVICES\_EVENTSERVICE}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_SERVICES\_EVENTSERVICE}} +\DoxyCodeLine{3 } +\DoxyCodeLine{8 \textcolor{preprocessor}{\#include "{}../Generic/List/OrderedList.hpp"{}}} +\DoxyCodeLine{9 \textcolor{preprocessor}{\#include "{}../Generic/Date/Date.h"{}}} +\DoxyCodeLine{10 \textcolor{preprocessor}{\#include "{}../Models/Event.h"{}}} +\DoxyCodeLine{11 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{HallService_8h}{HallService.h}}"{}}} +\DoxyCodeLine{12 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{StatusCode_8h}{StatusCode.h}}"{}}} +\DoxyCodeLine{13 } +\DoxyCodeLine{16 \textcolor{keyword}{class }\mbox{\hyperlink{classEventService}{EventService}} \{} +\DoxyCodeLine{17 \mbox{\hyperlink{classOrderedList}{OrderedList<Event>}} events;} +\DoxyCodeLine{18 } +\DoxyCodeLine{19 \textcolor{keyword}{const} \mbox{\hyperlink{classHallService}{HallService}}* hs;} +\DoxyCodeLine{20 } +\DoxyCodeLine{21 \textcolor{keywordtype}{unsigned} indexOfEvent(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* name, \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& date);} +\DoxyCodeLine{22 } +\DoxyCodeLine{23 \textcolor{keyword}{public}:} +\DoxyCodeLine{25 \mbox{\hyperlink{classEventService_a9b30bb95890abac259ba27b53cabe545}{EventService}}(\textcolor{keyword}{const} \mbox{\hyperlink{classHallService}{HallService}}* hs);} +\DoxyCodeLine{27 \mbox{\hyperlink{classEventService_a9b30bb95890abac259ba27b53cabe545}{EventService}}(\textcolor{keyword}{const} \mbox{\hyperlink{classHallService}{HallService}}* hs, \textcolor{keyword}{const} \mbox{\hyperlink{classEvent}{Event}}* events, \textcolor{keywordtype}{unsigned} eventCount);} +\DoxyCodeLine{28 } +\DoxyCodeLine{30 \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \mbox{\hyperlink{classEventService_a7a21a5909116215e402254510d6d81d6}{createEvent}}(\textcolor{keywordtype}{int} hallNumber, \textcolor{keyword}{const} \mbox{\hyperlink{classString}{String}}\& name, \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& date);} +\DoxyCodeLine{32 \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \mbox{\hyperlink{classEventService_ac7ea565af5ad78e84749558477ceaf26}{cancelEvent}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* name, \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& date);} +\DoxyCodeLine{33 } +\DoxyCodeLine{35 \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \mbox{\hyperlink{classEventService_a3c0d2a05e2a3026044b9e13e6802fbdb}{reserveTicket}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* name, \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& date, \textcolor{keyword}{const} \textcolor{keywordtype}{char}* password, \textcolor{keyword}{const} \textcolor{keywordtype}{char}* note, \textcolor{keyword}{const} \mbox{\hyperlink{classTicket}{Ticket}}\& ticket);} +\DoxyCodeLine{37 \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \mbox{\hyperlink{classEventService_aa6fd620de878f225f7c51bb0df6ea749}{cancelTicketReservation}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* name, \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& date, \textcolor{keyword}{const} \mbox{\hyperlink{classTicket}{Ticket}}\& ticket);} +\DoxyCodeLine{39 \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \mbox{\hyperlink{classEventService_ad1efbed6111da8e755d86b5bc9ada806}{ticketIsReserved}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* name, \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& date, \textcolor{keyword}{const} \mbox{\hyperlink{classTicket}{Ticket}}\& ticket);} +\DoxyCodeLine{40 } +\DoxyCodeLine{42 \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \mbox{\hyperlink{classEventService_ac447cac3e4974b9cc676d9bb90152979}{buyTicket}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* name, \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& date, \textcolor{keyword}{const} \mbox{\hyperlink{classTicket}{Ticket}}\& ticket, \textcolor{keyword}{const} \textcolor{keywordtype}{char}* password, \mbox{\hyperlink{classString}{String}}* reservationNoteOutput);} +\DoxyCodeLine{44 \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \mbox{\hyperlink{classEventService_ac447cac3e4974b9cc676d9bb90152979}{buyTicket}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* name, \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& date, \textcolor{keyword}{const} \mbox{\hyperlink{classTicket}{Ticket}}\& ticket);} +\DoxyCodeLine{45 } +\DoxyCodeLine{47 \mbox{\hyperlink{classString}{String}} \mbox{\hyperlink{classEventService_a7f4632e3beae5d24087047ab0223f85e}{createSeatingString}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* name, \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& date, \textcolor{keywordtype}{unsigned}* seatsPerRow);} +\DoxyCodeLine{48 } +\DoxyCodeLine{50 \mbox{\hyperlink{classList}{List<Event>}} \mbox{\hyperlink{classEventService_a6700bd4f9da6d12a47812b9c8549556e}{queryMostWatched}}(\textcolor{keywordtype}{unsigned} topN);} +\DoxyCodeLine{52 \mbox{\hyperlink{classList}{List<Event>}} \mbox{\hyperlink{classEventService_a814de3510f72150f2e54d44f8c8948bb}{queryInsufficientlyVisited}}();} +\DoxyCodeLine{53 } +\DoxyCodeLine{55 \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \mbox{\hyperlink{classEventService_a277194aea79a2c9bf955b7706a20c54c}{reportReservations}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* name, \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& date);} +\DoxyCodeLine{57 \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \mbox{\hyperlink{classEventService_afc74fc6d44fca054bce8e54997c0cd3e}{reportBoughtTickets}}(\textcolor{keywordtype}{int} hallNumber, \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& start, \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& end, \textcolor{keywordtype}{bool} all = \textcolor{keyword}{false});} +\DoxyCodeLine{58 } +\DoxyCodeLine{60 \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \mbox{\hyperlink{classEventService_a1225c23dae83fa928da47113cd1c5617}{load}}();} +\DoxyCodeLine{62 \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \mbox{\hyperlink{classEventService_a5aac3df17ef30f84c1c28277c256ec32}{save}}();} +\DoxyCodeLine{63 \};} +\DoxyCodeLine{64 } +\DoxyCodeLine{65 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Event_8h.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Event_8h.tex new file mode 100644 index 0000000..8291350 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Event_8h.tex @@ -0,0 +1,101 @@ +\hypertarget{Event_8h}{}\doxysection{src/\+Models/\+Event.h File Reference} +\label{Event_8h}\index{src/Models/Event.h@{src/Models/Event.h}} + + +Stores the declaration of class \mbox{\hyperlink{classEvent}{Event}}. + + +{\ttfamily \#include \char`\"{}../\+Generic/\+List/\+Ordered\+List.\+hpp\char`\"{}}\newline +{\ttfamily \#include \char`\"{}../\+Generic/\+Date/\+Date.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}../\+Generic/\+String/\+String.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Hall.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Ticket.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Reservation.\+h\char`\"{}}\newline +{\ttfamily \#include $<$istream$>$}\newline +{\ttfamily \#include $<$ostream$>$}\newline +\doxysubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classEvent}{Event}} +\begin{DoxyCompactList}\small\item\em Stores an event\textquotesingle{}s hall, name, date, bought tickets and reservations. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Functions} +\begin{DoxyCompactItemize} +\item +std\+::istream \& \mbox{\hyperlink{Event_8h_a31d9c76919809491b346728ec6659b19}{operator$>$$>$}} (std\+::istream \&istr, \mbox{\hyperlink{classEvent}{Event}} \&event) +\begin{DoxyCompactList}\small\item\em Reads \mbox{\hyperlink{classEvent}{Event}} from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Event_8h_ad423797aa9adadabb5651f8955c001bb}{configure\+Event\+Insertion\+Op}} (unsigned setting) +\begin{DoxyCompactList}\small\item\em Configures how \mbox{\hyperlink{classEvent}{Event}} should be shown, when written to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. \end{DoxyCompactList}\item +std\+::ostream \& \mbox{\hyperlink{Event_8h_a08eaf45abee385d26c4934afeb9be163}{operator$<$$<$}} (std\+::ostream \&ostr, const \mbox{\hyperlink{classEvent}{Event}} \&event) +\begin{DoxyCompactList}\small\item\em Writes \mbox{\hyperlink{classEvent}{Event}} to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores the declaration of class \mbox{\hyperlink{classEvent}{Event}}. + + + +\doxysubsection{Function Documentation} +\mbox{\Hypertarget{Event_8h_ad423797aa9adadabb5651f8955c001bb}\label{Event_8h_ad423797aa9adadabb5651f8955c001bb}} +\index{Event.h@{Event.h}!configureEventInsertionOp@{configureEventInsertionOp}} +\index{configureEventInsertionOp@{configureEventInsertionOp}!Event.h@{Event.h}} +\doxysubsubsection{\texorpdfstring{configureEventInsertionOp()}{configureEventInsertionOp()}} +{\footnotesize\ttfamily void configure\+Event\+Insertion\+Op (\begin{DoxyParamCaption}\item[{unsigned}]{setting }\end{DoxyParamCaption})} + + + +Configures how \mbox{\hyperlink{classEvent}{Event}} should be shown, when written to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. + + +\begin{DoxyParams}{Parameters} +{\em setting} & A number, defining the different options. It\textquotesingle{}s best if it is passed as binary number.\\ +\hline +\end{DoxyParams} +Sets a configuration setting for how operator\texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} should behave. Setting is stored as a global variable in the cpp file, so it\textquotesingle{}s independent of \mbox{\hyperlink{classEvent}{Event}} instance. + +Each bit in the number is a certain setting. Each bit from left to right represents one of these options, from top to bottom\+: +\begin{DoxyEnumerate} +\item Write count of bought tickets (available only if 5. is set) +\item Write count of reserved tickets (available only if 5. is set) +\item Write reservations +\item Write bought tickets +\item Write \mbox{\hyperlink{classHall}{Hall}} information +\end{DoxyEnumerate} + +\begin{DoxyParagraph}{Example} +To configure printing the \mbox{\hyperlink{classHall}{Hall}} information, bought tickets count and the bought tickets themselves, you would do\+: +\begin{DoxyCode}{0} +\DoxyCodeLine{\mbox{\hyperlink{Event_8h_ad423797aa9adadabb5651f8955c001bb}{configureEventInsertionOp}}(0b10011);} + +\end{DoxyCode} + +\end{DoxyParagraph} +\mbox{\Hypertarget{Event_8h_a08eaf45abee385d26c4934afeb9be163}\label{Event_8h_a08eaf45abee385d26c4934afeb9be163}} +\index{Event.h@{Event.h}!operator$<$$<$@{operator$<$$<$}} +\index{operator$<$$<$@{operator$<$$<$}!Event.h@{Event.h}} +\doxysubsubsection{\texorpdfstring{operator$<$$<$()}{operator<<()}} +{\footnotesize\ttfamily std\+::ostream \& operator$<$$<$ (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr, }\item[{const \mbox{\hyperlink{classEvent}{Event}} \&}]{event }\end{DoxyParamCaption})} + + + +Writes \mbox{\hyperlink{classEvent}{Event}} to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. + +Uses the stream\textquotesingle{}s \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator to write all internal data, following setting from \mbox{\hyperlink{Event_8h_ad423797aa9adadabb5651f8955c001bb}{configure\+Event\+Insertion\+Op()}} Stored types must have defined operator \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<}. + +\begin{DoxyNote}{Note} +Best used with std\+::cout or text std\+::ofstream +\end{DoxyNote} +\mbox{\Hypertarget{Event_8h_a31d9c76919809491b346728ec6659b19}\label{Event_8h_a31d9c76919809491b346728ec6659b19}} +\index{Event.h@{Event.h}!operator$>$$>$@{operator$>$$>$}} +\index{operator$>$$>$@{operator$>$$>$}!Event.h@{Event.h}} +\doxysubsubsection{\texorpdfstring{operator$>$$>$()}{operator>>()}} +{\footnotesize\ttfamily std\+::istream \& operator$>$$>$ (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr, }\item[{\mbox{\hyperlink{classEvent}{Event}} \&}]{event }\end{DoxyParamCaption})} + + + +Reads \mbox{\hyperlink{classEvent}{Event}} from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. + +Uses the stream\textquotesingle{}s \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator to read and parse all internal values. Stored types must have defined operator \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>}. + +\begin{DoxyNote}{Note} +Best used with std\+::cin or text std\+::ifstream +\end{DoxyNote} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Event_8h_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Event_8h_source.tex new file mode 100644 index 0000000..26077d4 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Event_8h_source.tex @@ -0,0 +1,48 @@ +\hypertarget{Event_8h_source}{}\doxysection{Event.\+h} +\label{Event_8h_source}\index{src/Models/Event.h@{src/Models/Event.h}} +\mbox{\hyperlink{Event_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_MODEL\_EVENT}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_MODEL\_EVENT}} +\DoxyCodeLine{3 } +\DoxyCodeLine{8 \textcolor{preprocessor}{\#include "{}../Generic/List/OrderedList.hpp"{}}} +\DoxyCodeLine{9 \textcolor{preprocessor}{\#include "{}../Generic/Date/Date.h"{}}} +\DoxyCodeLine{10 \textcolor{preprocessor}{\#include "{}../Generic/String/String.h"{}}} +\DoxyCodeLine{11 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{Hall_8h}{Hall.h}}"{}}} +\DoxyCodeLine{12 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{Ticket_8h}{Ticket.h}}"{}}} +\DoxyCodeLine{13 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{Reservation_8h}{Reservation.h}}"{}}} +\DoxyCodeLine{14 \textcolor{preprocessor}{\#include <istream>}} +\DoxyCodeLine{15 \textcolor{preprocessor}{\#include <ostream>}} +\DoxyCodeLine{16 } +\DoxyCodeLine{19 \textcolor{keyword}{class }\mbox{\hyperlink{classEvent}{Event}} \{} +\DoxyCodeLine{20 \mbox{\hyperlink{classHall}{Hall}} hall;} +\DoxyCodeLine{21 \mbox{\hyperlink{classString}{String}} name;} +\DoxyCodeLine{22 \mbox{\hyperlink{classDate}{Date}} date;} +\DoxyCodeLine{23 \mbox{\hyperlink{classOrderedList}{OrderedList<Ticket>}} tickets;} +\DoxyCodeLine{24 \mbox{\hyperlink{classOrderedList}{OrderedList<Reservation>}} reservations;} +\DoxyCodeLine{25 } +\DoxyCodeLine{26 \textcolor{keyword}{public}:} +\DoxyCodeLine{28 \mbox{\hyperlink{classEvent_a5a40dd4708297f7031e29b39e039ae10}{Event}}();} +\DoxyCodeLine{30 \mbox{\hyperlink{classEvent_a5a40dd4708297f7031e29b39e039ae10}{Event}}(\textcolor{keyword}{const} \mbox{\hyperlink{classHall}{Hall}}\& hall, \mbox{\hyperlink{classString}{String}} name, \mbox{\hyperlink{classDate}{Date}} date);} +\DoxyCodeLine{31 } +\DoxyCodeLine{33 \textcolor{keyword}{const} \mbox{\hyperlink{classHall}{Hall}}\& \mbox{\hyperlink{classEvent_ae3023ae2c487f46b3235f67554e58615}{get\_hall}}() \textcolor{keyword}{const};} +\DoxyCodeLine{35 \textcolor{keyword}{const} \mbox{\hyperlink{classString}{String}}\& \mbox{\hyperlink{classEvent_a7bf717630c32826689df41e0bb3ecbce}{get\_name}}() \textcolor{keyword}{const};} +\DoxyCodeLine{37 \textcolor{keyword}{const} \mbox{\hyperlink{classDate}{Date}}\& \mbox{\hyperlink{classEvent_a222904d44dfaf3f1f96e2190c5ea4293}{get\_date}}() \textcolor{keyword}{const};} +\DoxyCodeLine{38 } +\DoxyCodeLine{40 \mbox{\hyperlink{classOrderedList}{OrderedList<Ticket>}}\& \mbox{\hyperlink{classEvent_a16a84fced8e02f756232c54c27bb22ad}{get\_tickets}}();} +\DoxyCodeLine{42 \textcolor{keyword}{const} \mbox{\hyperlink{classOrderedList}{OrderedList<Ticket>}}\& \mbox{\hyperlink{classEvent_a16a84fced8e02f756232c54c27bb22ad}{get\_tickets}}() \textcolor{keyword}{const};} +\DoxyCodeLine{44 \mbox{\hyperlink{classOrderedList}{OrderedList<Reservation>}}\& \mbox{\hyperlink{classEvent_a43c6b2bddd42435eb6c8cd0f15d75c6f}{get\_reservations}}();} +\DoxyCodeLine{46 \textcolor{keyword}{const} \mbox{\hyperlink{classOrderedList}{OrderedList<Reservation>}}\& \mbox{\hyperlink{classEvent_a43c6b2bddd42435eb6c8cd0f15d75c6f}{get\_reservations}}() \textcolor{keyword}{const};} +\DoxyCodeLine{47 } +\DoxyCodeLine{49 \textcolor{keywordtype}{void} \mbox{\hyperlink{classEvent_ae58d2ed716836adcdacaeec4dd08c1cf}{read}}(std::istream\& istr);} +\DoxyCodeLine{51 \textcolor{keywordtype}{void} \mbox{\hyperlink{classEvent_a05a302aa998977c30950987c07f0fbba}{write}}(std::ostream\& ostr);} +\DoxyCodeLine{53 \textcolor{keywordtype}{int} \mbox{\hyperlink{classEvent_af5c84a902db8f29f8b8737026011f1f6}{compare}}(\textcolor{keyword}{const} \mbox{\hyperlink{classEvent}{Event}}\& other);} +\DoxyCodeLine{54 \};} +\DoxyCodeLine{55 } +\DoxyCodeLine{57 std::istream\& \mbox{\hyperlink{Event_8h_a31d9c76919809491b346728ec6659b19}{operator>>}}(std::istream\& istr, \mbox{\hyperlink{classEvent}{Event}}\& event);} +\DoxyCodeLine{59 \textcolor{keywordtype}{void} \mbox{\hyperlink{Event_8h_ad423797aa9adadabb5651f8955c001bb}{configureEventInsertionOp}}(\textcolor{keywordtype}{unsigned} setting);} +\DoxyCodeLine{61 std::ostream\& \mbox{\hyperlink{Event_8h_a08eaf45abee385d26c4934afeb9be163}{operator<<}}(std::ostream\& ostr, \textcolor{keyword}{const} \mbox{\hyperlink{classEvent}{Event}}\& event);} +\DoxyCodeLine{62 } +\DoxyCodeLine{63 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/FMI-OOP-P1_TicketSystem Overview.svg b/Year 1/Object-oriented Programming/Project 1/docs/latex/FMI-OOP-P1_TicketSystem Overview.svg new file mode 100644 index 0000000..6e35d2f --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/FMI-OOP-P1_TicketSystem Overview.svg @@ -0,0 +1,571 @@ +<svg version="1.1" baseProfile="full" width="1076.5" height="1271.0" viewbox="0 0 1076.5 1271" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"> + <title >FMI-OOP-P1_TicketSystem Overview</title> + <desc >#title: FMI-OOP-P1_TicketSystem Overview + #background: #fdf6e3 + #bendSize: 0 + #fillArrows: true + #lineWidth: 2 + #leading: 1.3 + + #.groupui: title=italic fill=#b2ee97 direction=right + #.groupes: title=italic fill=#97c8ee direction=right + #.groupm: title=italic fill=#ee9797 direction=down + #.groupv: title=italic fill=#eee997 direction=right + #.groupgc: title=italic fill=#c0baac direction=right + + [main.cpp| + EventService es + HallService hs + ] + + [<groupui> User Interface| + [FMITicketSystemConsoleUI.cpp| + EventService* es + HallService* hs + runUI() + ] + ] + [main.cpp]->[User Interface] + + [<groupes> Services| + [EventService| + OrderedList<Event> events + | + + createEvent() + . cancelEvent() + + reserveTicket() + + cancelTicketReservation() + + buyTicket() + . queryEventHall() + . queryTickets() + . queryReservations() + ~ queryMostVisited() + ~ queryInsufficientlyVisited() + + reportBoughtTickets() + + reportReservations() + ] + + [HallService| + OrderedList<Hall> halls + | + hallExists() + ] + [EventService]-->[HallService] + + [StatusCodes.h| + enum StatusCode + ] + ] + [User Interface]->[Services] + + [<groupm> Models| + [Ticket| + unsigned row + unsigned seat + ] + + [Reservation| + Ticket ticket + char\[8\] password + char\[32\] note + ] + + [Event| + Hall* hall + String name + Date date + OrderedList<Ticket> tickets + OrderedList<Reservation> reservations + ] + [Ticket]-->[Event] + [Reservation]-->[Event] + + [Hall| + int number + unsigned rowCount + unsigned seatsPerRow + ] + [<hidden>H]-/-[Hall] + ] + [Services]<--[Models] + + [<groupgc> Generic Classes| + [List<T>| + add(elem) + insertAt(elem, index) + removeAt(index) + findIndex(elem); + contain(elem); + operator\[\](index) + ] + + [OrderedList<T>| + insert(elem) + remove(elem) + ] + [List<T>]<:-[OrderedList<T>] + + [Date| + unsigned day + unsigned month + int year + ] + + [String| + char* str + unsigned length + unsigned count + ] + [String]-/-[Date] + + [Command| + String name + void (*exec)() + ] + + [Menu| + List<Command> commands + navigate() + ] + [Menu]-->[Command] + ] + [<hidden>H1]-/-[<hidden>H2] + [H2]-/-[Generic Classes]</desc> + <g stroke-width="1.0" text-align="left" font="12pt Helvetica, Arial, sans-serif" font-size="12pt" font-family="Helvetica" font-weight="bold" font-style="normal"> + <g font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="round" stroke="#33322E"> + <g stroke="transparent" fill="#fdf6e3"> + <rect x="0.0" y="0.0" height="1271.0" width="1076.5" stroke="none"></rect> + </g> + <g transform="translate(8, 8)" fill="#33322E"> + <g transform="translate(20, 20)" fill="#33322E" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal"> + <path d="M286.0 79.0 L286 99 L286 112.33333333333333 L286.0 112.3 " fill="none"></path> + <path d="M280.7 105.7 L286.0 105.7 L291.3 105.7 L286.0 119.0 Z"></path> + <path d="M286.0 302.0 L286 322 L286 347.8333333333333 L286.0 347.8 " fill="none"></path> + <path d="M280.7 341.2 L286.0 341.2 L291.3 341.2 L286.0 354.5 Z"></path> + <g stroke-dasharray="4 4"> + <path d="M286.0 820.2 L286 846 L286 866 L286.0 866.0 " fill="none"></path> + </g> + <path d="M291.3 826.8 L286.0 826.8 L280.7 826.8 L286.0 813.5 Z"></path> + <g data-name="main.cpp"> + <g fill="#eee8d5" stroke="#33322E" data-name="main.cpp"> + <rect x="220.0" y="0.0" height="79.0" width="132.0" data-name="main.cpp"></rect> + <path d="M220.0 32.0 L352.0 32.0" fill="none" data-name="main.cpp"></path> + </g> + <g transform="translate(220, 0)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="main.cpp"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="main.cpp"> + <text x="58.0" y="13.8" stroke="none" text-anchor="middle" data-name="main.cpp">main.cpp</text> + + </g> + </g> + <g transform="translate(220, 32)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="main.cpp"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="main.cpp"> + <text x="0.0" y="13.8" stroke="none" data-name="main.cpp">EventService es</text> + <text x="0.0" y="29.4" stroke="none" data-name="main.cpp">HallService hs</text> + + </g> + </g> + </g> + <g data-name="User Interface"> + <g fill="#b2ee97" stroke="#33322E" data-name="User Interface"> + <rect x="129.0" y="119.0" height="183.0" width="314.0" data-name="User Interface"></rect> + <path d="M129.0 151.0 L443.0 151.0" fill="none" data-name="User Interface"></path> + </g> + <g transform="translate(129, 119)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="italic" data-name="User Interface"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="User Interface"> + <text x="149.0" y="13.8" stroke="none" text-anchor="middle" data-name="User Interface">User Interface</text> + + </g> + </g> + <g transform="translate(129, 151)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="User Interface"> + <g transform="translate(8, 8)" fill="#33322E" data-name="User Interface"> + <g transform="translate(20, 20)" data-name="User Interface"> + <g data-name="FMITicketSystemConsoleUI.cpp"> + <g fill="#fdf6e3" stroke="#33322E" data-name="FMITicketSystemConsoleUI.cpp"> + <rect x="0.0" y="0.0" height="95.0" width="258.0" data-name="FMITicketSystemConsoleUI.cpp"></rect> + <path d="M0.0 32.0 L258.0 32.0" fill="none" data-name="FMITicketSystemConsoleUI.cpp"></path> + </g> + <g transform="translate(0, 0)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="FMITicketSystemConsoleUI.cpp"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="FMITicketSystemConsoleUI.cpp"> + <text x="121.0" y="13.8" stroke="none" text-anchor="middle" data-name="FMITicketSystemConsoleUI.cpp">FMITicketSystemConsoleUI.cpp</text> + + </g> + </g> + <g transform="translate(0, 32)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="FMITicketSystemConsoleUI.cpp"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="FMITicketSystemConsoleUI.cpp"> + <text x="0.0" y="13.8" stroke="none" data-name="FMITicketSystemConsoleUI.cpp">EventService* es</text> + <text x="0.0" y="29.4" stroke="none" data-name="FMITicketSystemConsoleUI.cpp">HallService* hs</text> + <text x="0.0" y="45.0" stroke="none" data-name="FMITicketSystemConsoleUI.cpp">runUI()</text> + + </g> + </g> + </g> + </g> + </g> + </g> + </g> + <g data-name="Services"> + <g fill="#97c8ee" stroke="#33322E" data-name="Services"> + <rect x="39.0" y="355.0" height="459.0" width="495.0" data-name="Services"></rect> + <path d="M39.0 387.0 L534.0 387.0" fill="none" data-name="Services"></path> + </g> + <g transform="translate(39, 355)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="italic" data-name="Services"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="Services"> + <text x="239.5" y="13.8" stroke="none" text-anchor="middle" data-name="Services">Services</text> + + </g> + </g> + <g transform="translate(39, 387)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="Services"> + <g transform="translate(8, 8)" fill="#33322E" data-name="Services"> + <g transform="translate(20, 20)" fill="#33322E" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="Services"> + <g stroke-dasharray="4 4" data-name="Services"> + <path d="M216.0 133.5 L236 133.5 L249.33333333333334 133.5 L249.3 133.5 " fill="none" data-name="Services"></path> + </g> + <path d="M242.7 138.8 L242.7 133.5 L242.7 128.2 L256.0 133.5 Z" data-name="Services"></path> + <g data-name="EventService"> + <g fill="#fdf6e3" stroke="#33322E" data-name="EventService"> + <rect x="0.0" y="0.0" height="267.0" width="216.0" data-name="EventService"></rect> + <path d="M0.0 32.0 L216.0 32.0" fill="none" data-name="EventService"></path> + <path d="M0.0 64.0 L216.0 64.0" fill="none" data-name="EventService"></path> + </g> + <g transform="translate(0, 0)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="EventService"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="EventService"> + <text x="100.0" y="13.8" stroke="none" text-anchor="middle" data-name="EventService">EventService</text> + + </g> + </g> + <g transform="translate(0, 32)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="EventService"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="EventService"> + <text x="0.0" y="13.8" stroke="none" data-name="EventService">OrderedList<Event> events</text> + + </g> + </g> + <g transform="translate(0, 64)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="EventService"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="EventService"> + <text x="0.0" y="13.8" stroke="none" data-name="EventService">+ createEvent()</text> + <text x="0.0" y="29.4" stroke="none" data-name="EventService">. cancelEvent()</text> + <text x="0.0" y="45.0" stroke="none" data-name="EventService">+ reserveTicket()</text> + <text x="0.0" y="60.6" stroke="none" data-name="EventService">+ cancelTicketReservation()</text> + <text x="0.0" y="76.2" stroke="none" data-name="EventService">+ buyTicket()</text> + <text x="0.0" y="91.8" stroke="none" data-name="EventService">. queryEventHall()</text> + <text x="0.0" y="107.4" stroke="none" data-name="EventService">. queryTickets()</text> + <text x="0.0" y="123.0" stroke="none" data-name="EventService">. queryReservations()</text> + <text x="0.0" y="138.6" stroke="none" data-name="EventService">~ queryMostVisited()</text> + <text x="0.0" y="154.2" stroke="none" data-name="EventService">~ queryInsufficientlyVisited()</text> + <text x="0.0" y="169.8" stroke="none" data-name="EventService">+ reportBoughtTickets()</text> + <text x="0.0" y="185.4" stroke="none" data-name="EventService">+ reportReservations()</text> + + </g> + </g> + </g> + <g data-name="HallService"> + <g fill="#fdf6e3" stroke="#33322E" data-name="HallService"> + <rect x="256.0" y="86.0" height="96.0" width="183.0" data-name="HallService"></rect> + <path d="M256.0 118.0 L439.0 118.0" fill="none" data-name="HallService"></path> + <path d="M256.0 150.0 L439.0 150.0" fill="none" data-name="HallService"></path> + </g> + <g transform="translate(256, 86)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="HallService"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="HallService"> + <text x="83.5" y="13.8" stroke="none" text-anchor="middle" data-name="HallService">HallService</text> + + </g> + </g> + <g transform="translate(256, 118)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="HallService"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="HallService"> + <text x="0.0" y="13.8" stroke="none" data-name="HallService">OrderedList<Hall> halls</text> + + </g> + </g> + <g transform="translate(256, 150)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="HallService"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="HallService"> + <text x="0.0" y="13.8" stroke="none" data-name="HallService">hallExists()</text> + + </g> + </g> + </g> + <g data-name="StatusCodes.h"> + <g fill="#fdf6e3" stroke="#33322E" data-name="StatusCodes.h"> + <rect x="36.0" y="307.0" height="64.0" width="144.0" data-name="StatusCodes.h"></rect> + <path d="M36.0 339.0 L180.0 339.0" fill="none" data-name="StatusCodes.h"></path> + </g> + <g transform="translate(36, 307)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="StatusCodes.h"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="StatusCodes.h"> + <text x="64.0" y="13.8" stroke="none" text-anchor="middle" data-name="StatusCodes.h">StatusCodes.h</text> + + </g> + </g> + <g transform="translate(36, 339)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="StatusCodes.h"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="StatusCodes.h"> + <text x="0.0" y="13.8" stroke="none" data-name="StatusCodes.h">enum StatusCode</text> + + </g> + </g> + </g> + </g> + </g> + </g> + </g> + <g data-name="Models"> + <g fill="#ee9797" stroke="#33322E" data-name="Models"> + <rect x="0.0" y="866.0" height="349.0" width="572.0" data-name="Models"></rect> + <path d="M0.0 898.0 L572.0 898.0" fill="none" data-name="Models"></path> + </g> + <g transform="translate(0, 866)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="italic" data-name="Models"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="Models"> + <text x="278.0" y="13.8" stroke="none" text-anchor="middle" data-name="Models">Models</text> + + </g> + </g> + <g transform="translate(0, 898)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="Models"> + <g transform="translate(8, 8)" fill="#33322E" data-name="Models"> + <g transform="translate(20, 20)" fill="#33322E" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="Models"> + <g stroke-dasharray="4 4" data-name="Models"> + <path d="M64.0 87.0 L64 115 L79.39230174726517 130.30013227572465 L79.4 130.3 " fill="none" data-name="Models"></path> + </g> + <path d="M70.9 129.4 L74.7 125.6 L78.4 121.8 L84.1 135.0 Z" data-name="Models"></path> + <g stroke-dasharray="4 4" data-name="Models"> + <path d="M231.8 95.0 L231.75 115 L216.19793977786054 130.3213174888733 L216.2 130.3 " fill="none" data-name="Models"></path> + </g> + <path d="M217.2 121.8 L220.9 125.6 L224.7 129.4 L211.4 135.0 Z" data-name="Models"></path> + <g data-name="Ticket"> + <g fill="#fdf6e3" stroke="#33322E" data-name="Ticket"> + <rect x="6.0" y="8.0" height="79.0" width="116.0" data-name="Ticket"></rect> + <path d="M6.0 40.0 L122.0 40.0" fill="none" data-name="Ticket"></path> + </g> + <g transform="translate(6, 8)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="Ticket"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="Ticket"> + <text x="50.0" y="13.8" stroke="none" text-anchor="middle" data-name="Ticket">Ticket</text> + + </g> + </g> + <g transform="translate(6, 40)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="Ticket"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="Ticket"> + <text x="0.0" y="13.8" stroke="none" data-name="Ticket">unsigned row</text> + <text x="0.0" y="29.4" stroke="none" data-name="Ticket">unsigned seat</text> + + </g> + </g> + </g> + <g data-name="Reservation"> + <g fill="#fdf6e3" stroke="#33322E" data-name="Reservation"> + <rect x="163.0" y="0.0" height="95.0" width="138.0" data-name="Reservation"></rect> + <path d="M163.0 32.0 L301.0 32.0" fill="none" data-name="Reservation"></path> + </g> + <g transform="translate(163, 0)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="Reservation"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="Reservation"> + <text x="61.0" y="13.8" stroke="none" text-anchor="middle" data-name="Reservation">Reservation</text> + + </g> + </g> + <g transform="translate(163, 32)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="Reservation"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="Reservation"> + <text x="0.0" y="13.8" stroke="none" data-name="Reservation">Ticket ticket</text> + <text x="0.0" y="29.4" stroke="none" data-name="Reservation">char[8] password</text> + <text x="0.0" y="45.0" stroke="none" data-name="Reservation">char[32] note</text> + + </g> + </g> + </g> + <g data-name="Event"> + <g fill="#fdf6e3" stroke="#33322E" data-name="Event"> + <rect x="0.0" y="135.0" height="126.0" width="295.0" data-name="Event"></rect> + <path d="M0.0 167.0 L295.0 167.0" fill="none" data-name="Event"></path> + </g> + <g transform="translate(0, 135)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="Event"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="Event"> + <text x="139.5" y="13.8" stroke="none" text-anchor="middle" data-name="Event">Event</text> + + </g> + </g> + <g transform="translate(0, 167)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="Event"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="Event"> + <text x="0.0" y="13.8" stroke="none" data-name="Event">Hall* hall</text> + <text x="0.0" y="29.4" stroke="none" data-name="Event">String name</text> + <text x="0.0" y="45.0" stroke="none" data-name="Event">Date date</text> + <text x="0.0" y="60.6" stroke="none" data-name="Event">OrderedList<Ticket> tickets</text> + <text x="0.0" y="76.2" stroke="none" data-name="Event">OrderedList<Reservation> reservations</text> + + </g> + </g> + </g> + <g data-name="Hall"> + <g fill="#fdf6e3" stroke="#33322E" data-name="Hall"> + <rect x="335.0" y="151.0" height="95.0" width="181.0" data-name="Hall"></rect> + <path d="M335.0 183.0 L516.0 183.0" fill="none" data-name="Hall"></path> + </g> + <g transform="translate(335, 151)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="Hall"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="Hall"> + <text x="82.5" y="13.8" stroke="none" text-anchor="middle" data-name="Hall">Hall</text> + + </g> + </g> + <g transform="translate(335, 183)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="Hall"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="Hall"> + <text x="0.0" y="13.8" stroke="none" data-name="Hall">int number</text> + <text x="0.0" y="29.4" stroke="none" data-name="Hall">unsigned rowCount</text> + <text x="0.0" y="45.0" stroke="none" data-name="Hall">unsigned seatsPerRow</text> + + </g> + </g> + </g> + <g data-name="H"> + + </g> + </g> + </g> + </g> + </g> + <g data-name="Generic Classes"> + <g fill="#c0baac" stroke="#33322E" data-name="Generic Classes"> + <rect x="574.0" y="342.0" height="484.0" width="447.0" data-name="Generic Classes"></rect> + <path d="M574.0 374.0 L1021.0 374.0" fill="none" data-name="Generic Classes"></path> + </g> + <g transform="translate(574, 342)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="italic" data-name="Generic Classes"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="Generic Classes"> + <text x="215.5" y="13.8" stroke="none" text-anchor="middle" data-name="Generic Classes">Generic Classes</text> + + </g> + </g> + <g transform="translate(574, 374)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="Generic Classes"> + <g transform="translate(8, 8)" fill="#33322E" data-name="Generic Classes"> + <g transform="translate(20, 20)" fill="#33322E" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="Generic Classes"> + <path d="M202.8 71.0 L236 71 L256 71 L256.0 71.0 " fill="none" data-name="Generic Classes"></path> + <path d="M202.8 65.7 L202.8 71.0 L202.8 76.3 L189.5 71.0 Z" data-name="Generic Classes"></path> + <g stroke-dasharray="4 4" data-name="Generic Classes"> + <path d="M216.0 356.5 L236 356.5 L261.3333333333333 356.5 L261.3 356.5 " fill="none" data-name="Generic Classes"></path> + </g> + <path d="M254.7 361.8 L254.7 356.5 L254.7 351.2 L268.0 356.5 Z" data-name="Generic Classes"></path> + <g data-name="List<T>"> + <g fill="#fdf6e3" stroke="#33322E" data-name="List<T>"> + <rect x="27.0" y="0.0" height="142.0" width="163.0" data-name="List<T>"></rect> + <path d="M27.0 32.0 L190.0 32.0" fill="none" data-name="List<T>"></path> + </g> + <g transform="translate(27, 0)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="List<T>"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="List<T>"> + <text x="73.5" y="13.8" stroke="none" text-anchor="middle" data-name="List<T>">List<T></text> + + </g> + </g> + <g transform="translate(27, 32)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="List<T>"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="List<T>"> + <text x="0.0" y="13.8" stroke="none" data-name="List<T>">add(elem)</text> + <text x="0.0" y="29.4" stroke="none" data-name="List<T>">insertAt(elem, index)</text> + <text x="0.0" y="45.0" stroke="none" data-name="List<T>">removeAt(index)</text> + <text x="0.0" y="60.6" stroke="none" data-name="List<T>">findIndex(elem)</text> + <text x="0.0" y="76.2" stroke="none" data-name="List<T>">contain(elem)</text> + <text x="0.0" y="91.8" stroke="none" data-name="List<T>">operator[](index)</text> + + </g> + </g> + </g> + <g data-name="OrderedList<T>"> + <g fill="#fdf6e3" stroke="#33322E" data-name="OrderedList<T>"> + <rect x="256.0" y="32.0" height="79.0" width="135.0" data-name="OrderedList<T>"></rect> + <path d="M256.0 64.0 L391.0 64.0" fill="none" data-name="OrderedList<T>"></path> + </g> + <g transform="translate(256, 32)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="OrderedList<T>"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="OrderedList<T>"> + <text x="59.5" y="13.8" stroke="none" text-anchor="middle" data-name="OrderedList<T>">OrderedList<T></text> + + </g> + </g> + <g transform="translate(256, 64)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="OrderedList<T>"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="OrderedList<T>"> + <text x="0.0" y="13.8" stroke="none" data-name="OrderedList<T>">insert(elem)</text> + <text x="0.0" y="29.4" stroke="none" data-name="OrderedList<T>">remove(elem)</text> + + </g> + </g> + </g> + <g data-name="Date"> + <g fill="#fdf6e3" stroke="#33322E" data-name="Date"> + <rect x="259.0" y="182.0" height="95.0" width="130.0" data-name="Date"></rect> + <path d="M259.0 214.0 L389.0 214.0" fill="none" data-name="Date"></path> + </g> + <g transform="translate(259, 182)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="Date"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="Date"> + <text x="57.0" y="13.8" stroke="none" text-anchor="middle" data-name="Date">Date</text> + + </g> + </g> + <g transform="translate(259, 214)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="Date"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="Date"> + <text x="0.0" y="13.8" stroke="none" data-name="Date">unsigned day</text> + <text x="0.0" y="29.4" stroke="none" data-name="Date">unsigned month</text> + <text x="0.0" y="45.0" stroke="none" data-name="Date">int year</text> + + </g> + </g> + </g> + <g data-name="String"> + <g fill="#fdf6e3" stroke="#33322E" data-name="String"> + <rect x="44.0" y="182.0" height="95.0" width="129.0" data-name="String"></rect> + <path d="M44.0 214.0 L173.0 214.0" fill="none" data-name="String"></path> + </g> + <g transform="translate(44, 182)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="String"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="String"> + <text x="56.5" y="13.8" stroke="none" text-anchor="middle" data-name="String">String</text> + + </g> + </g> + <g transform="translate(44, 214)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="String"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="String"> + <text x="0.0" y="13.8" stroke="none" data-name="String">char* str</text> + <text x="0.0" y="29.4" stroke="none" data-name="String">unsigned length</text> + <text x="0.0" y="45.0" stroke="none" data-name="String">unsigned count</text> + + </g> + </g> + </g> + <g data-name="Command"> + <g fill="#fdf6e3" stroke="#33322E" data-name="Command"> + <rect x="268.0" y="317.0" height="79.0" width="111.0" data-name="Command"></rect> + <path d="M268.0 349.0 L379.0 349.0" fill="none" data-name="Command"></path> + </g> + <g transform="translate(268, 317)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="Command"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="Command"> + <text x="47.5" y="13.8" stroke="none" text-anchor="middle" data-name="Command">Command</text> + + </g> + </g> + <g transform="translate(268, 349)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="Command"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="Command"> + <text x="0.0" y="13.8" stroke="none" data-name="Command">String name</text> + <text x="0.0" y="29.4" stroke="none" data-name="Command">void (*exec)()</text> + + </g> + </g> + </g> + <g data-name="Menu"> + <g fill="#fdf6e3" stroke="#33322E" data-name="Menu"> + <rect x="0.0" y="317.0" height="79.0" width="216.0" data-name="Menu"></rect> + <path d="M0.0 349.0 L216.0 349.0" fill="none" data-name="Menu"></path> + </g> + <g transform="translate(0, 317)" font-family="Helvetica" font-size="12pt" font-weight="bold" font-style="normal" data-name="Menu"> + <g transform="translate(8, 8)" fill="#33322E" text-align="center" data-name="Menu"> + <text x="100.0" y="13.8" stroke="none" text-anchor="middle" data-name="Menu">Menu</text> + + </g> + </g> + <g transform="translate(0, 349)" font-family="Helvetica" font-size="12pt" font-weight="normal" font-style="normal" data-name="Menu"> + <g transform="translate(8, 8)" fill="#33322E" text-align="left" data-name="Menu"> + <text x="0.0" y="13.8" stroke="none" data-name="Menu">List<Command> commands</text> + <text x="0.0" y="29.4" stroke="none" data-name="Menu">navigate()</text> + + </g> + </g> + </g> + </g> + </g> + </g> + </g> + <g data-name="H1"> + + </g> + <g data-name="H2"> + + </g> + </g> + </g> + </g> + </g> +</svg>
\ No newline at end of file diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/FMITicketSystemConsoleUI_8h.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/FMITicketSystemConsoleUI_8h.tex new file mode 100644 index 0000000..494d798 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/FMITicketSystemConsoleUI_8h.tex @@ -0,0 +1,33 @@ +\hypertarget{FMITicketSystemConsoleUI_8h}{}\doxysection{src/\+User\+Interface/\+FMITicket\+System\+Console\+UI.h File Reference} +\label{FMITicketSystemConsoleUI_8h}\index{src/UserInterface/FMITicketSystemConsoleUI.h@{src/UserInterface/FMITicketSystemConsoleUI.h}} + + +Stores declaration of run\+UI function. + + +{\ttfamily \#include \char`\"{}../\+Services/\+Event\+Service.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}../\+Services/\+Hall\+Service.\+h\char`\"{}}\newline +\doxysubsection*{Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{FMITicketSystemConsoleUI_8h_a79d6833c27b5a32b6d9917f5cd6e32a3}{run\+UI}} (\mbox{\hyperlink{classEventService}{Event\+Service}} $\ast$event\+Service, \mbox{\hyperlink{classHallService}{Hall\+Service}} $\ast$hall\+Service) +\begin{DoxyCompactList}\small\item\em Runs the console interface for the ticket system. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores declaration of run\+UI function. + + + +\doxysubsection{Function Documentation} +\mbox{\Hypertarget{FMITicketSystemConsoleUI_8h_a79d6833c27b5a32b6d9917f5cd6e32a3}\label{FMITicketSystemConsoleUI_8h_a79d6833c27b5a32b6d9917f5cd6e32a3}} +\index{FMITicketSystemConsoleUI.h@{FMITicketSystemConsoleUI.h}!runUI@{runUI}} +\index{runUI@{runUI}!FMITicketSystemConsoleUI.h@{FMITicketSystemConsoleUI.h}} +\doxysubsubsection{\texorpdfstring{runUI()}{runUI()}} +{\footnotesize\ttfamily void run\+UI (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classEventService}{Event\+Service}} $\ast$}]{event\+Service, }\item[{\mbox{\hyperlink{classHallService}{Hall\+Service}} $\ast$}]{hall\+Service }\end{DoxyParamCaption})} + + + +Runs the console interface for the ticket system. + +Stores \mbox{\hyperlink{classEventService}{Event\+Service}} and \mbox{\hyperlink{classHallService}{Hall\+Service}} pointers in internal global variables, calls \mbox{\hyperlink{classEventService}{Event\+Service}} and \mbox{\hyperlink{classHallService}{Hall\+Service}} load() functions, initializes all menus, navigates the main menu and finally calls \mbox{\hyperlink{classEventService}{Event\+Service}} and \mbox{\hyperlink{classHallService}{Hall\+Service}} save() functions
\ No newline at end of file diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/FMITicketSystemConsoleUI_8h_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/FMITicketSystemConsoleUI_8h_source.tex new file mode 100644 index 0000000..fb01e04 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/FMITicketSystemConsoleUI_8h_source.tex @@ -0,0 +1,15 @@ +\hypertarget{FMITicketSystemConsoleUI_8h_source}{}\doxysection{FMITicket\+System\+Console\+UI.\+h} +\label{FMITicketSystemConsoleUI_8h_source}\index{src/UserInterface/FMITicketSystemConsoleUI.h@{src/UserInterface/FMITicketSystemConsoleUI.h}} +\mbox{\hyperlink{FMITicketSystemConsoleUI_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_FMITICKETSYSTEMCONSOLEUI}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_FMITICKETSYSTEMCONSOLEUI}} +\DoxyCodeLine{3 } +\DoxyCodeLine{8 \textcolor{preprocessor}{\#include "{}../Services/EventService.h"{}}} +\DoxyCodeLine{9 \textcolor{preprocessor}{\#include "{}../Services/HallService.h"{}}} +\DoxyCodeLine{10 } +\DoxyCodeLine{12 \textcolor{keywordtype}{void} \mbox{\hyperlink{FMITicketSystemConsoleUI_8h_a79d6833c27b5a32b6d9917f5cd6e32a3}{runUI}}(\mbox{\hyperlink{classEventService}{EventService}}* eventService, \mbox{\hyperlink{classHallService}{HallService}}* hallService);} +\DoxyCodeLine{13 } +\DoxyCodeLine{14 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/HallService_8h.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/HallService_8h.tex new file mode 100644 index 0000000..ea5dcb6 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/HallService_8h.tex @@ -0,0 +1,20 @@ +\hypertarget{HallService_8h}{}\doxysection{src/\+Services/\+Hall\+Service.h File Reference} +\label{HallService_8h}\index{src/Services/HallService.h@{src/Services/HallService.h}} + + +Stores the declaration of class \mbox{\hyperlink{classHallService}{Hall\+Service}}. + + +{\ttfamily \#include \char`\"{}../\+Generic/\+List/\+Ordered\+List.\+hpp\char`\"{}}\newline +{\ttfamily \#include \char`\"{}../\+Models/\+Hall.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Status\+Code.\+h\char`\"{}}\newline +\doxysubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classHallService}{Hall\+Service}} +\begin{DoxyCompactList}\small\item\em Each \mbox{\hyperlink{classHallService}{Hall\+Service}} stores all halls. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores the declaration of class \mbox{\hyperlink{classHallService}{Hall\+Service}}. + diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/HallService_8h_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/HallService_8h_source.tex new file mode 100644 index 0000000..968e984 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/HallService_8h_source.tex @@ -0,0 +1,26 @@ +\hypertarget{HallService_8h_source}{}\doxysection{Hall\+Service.\+h} +\label{HallService_8h_source}\index{src/Services/HallService.h@{src/Services/HallService.h}} +\mbox{\hyperlink{HallService_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_SERVICES\_HALLSERVICE}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_SERVICES\_HALLSERVICE}} +\DoxyCodeLine{3 } +\DoxyCodeLine{8 \textcolor{preprocessor}{\#include "{}../Generic/List/OrderedList.hpp"{}}} +\DoxyCodeLine{9 \textcolor{preprocessor}{\#include "{}../Models/Hall.h"{}}} +\DoxyCodeLine{10 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{StatusCode_8h}{StatusCode.h}}"{}}} +\DoxyCodeLine{11 } +\DoxyCodeLine{14 \textcolor{keyword}{class }\mbox{\hyperlink{classHallService}{HallService}} \{} +\DoxyCodeLine{15 \mbox{\hyperlink{classOrderedList}{OrderedList<Hall>}} halls;} +\DoxyCodeLine{16 } +\DoxyCodeLine{17 \textcolor{keyword}{public}:} +\DoxyCodeLine{19 \mbox{\hyperlink{classHallService_a57a8117d8d510afb5351a3f7efc18dff}{HallService}}(\textcolor{keyword}{const} \mbox{\hyperlink{classHall}{Hall}}* halls, \textcolor{keywordtype}{unsigned} hallCount);} +\DoxyCodeLine{20 } +\DoxyCodeLine{22 \textcolor{keyword}{const} \mbox{\hyperlink{classOrderedList}{OrderedList<Hall>}}\& \mbox{\hyperlink{classHallService_a641fdcc475e094687713e94094e2a623}{get\_halls}}() \textcolor{keyword}{const};} +\DoxyCodeLine{23 } +\DoxyCodeLine{25 \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \mbox{\hyperlink{classHallService_ab63c1ccff811ed3268f2fe5e996eb6ae}{load}}();} +\DoxyCodeLine{27 \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \mbox{\hyperlink{classHallService_a083e3d10ec89ee8c78a117c3754c66d2}{save}}();} +\DoxyCodeLine{28 \};} +\DoxyCodeLine{29 } +\DoxyCodeLine{30 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Hall_8h.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Hall_8h.tex new file mode 100644 index 0000000..51c1dd4 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Hall_8h.tex @@ -0,0 +1,59 @@ +\hypertarget{Hall_8h}{}\doxysection{src/\+Models/\+Hall.h File Reference} +\label{Hall_8h}\index{src/Models/Hall.h@{src/Models/Hall.h}} + + +Stores the declaration of class \mbox{\hyperlink{classHall}{Hall}}. + + +{\ttfamily \#include $<$istream$>$}\newline +{\ttfamily \#include $<$ostream$>$}\newline +\doxysubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classHall}{Hall}} +\begin{DoxyCompactList}\small\item\em Each hall contains a number, rows and seats per row. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Functions} +\begin{DoxyCompactItemize} +\item +std\+::istream \& \mbox{\hyperlink{Hall_8h_ac55d9db507637effdb1896e33c86d439}{operator$>$$>$}} (std\+::istream \&istr, \mbox{\hyperlink{classHall}{Hall}} \&hall) +\begin{DoxyCompactList}\small\item\em Reads \mbox{\hyperlink{classHall}{Hall}} from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. \end{DoxyCompactList}\item +std\+::ostream \& \mbox{\hyperlink{Hall_8h_a9671d0935caa6dd24b5f1b9be101c477}{operator$<$$<$}} (std\+::ostream \&ostr, const \mbox{\hyperlink{classHall}{Hall}} \&hall) +\begin{DoxyCompactList}\small\item\em Writes \mbox{\hyperlink{classHall}{Hall}} to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores the declaration of class \mbox{\hyperlink{classHall}{Hall}}. + + + +\doxysubsection{Function Documentation} +\mbox{\Hypertarget{Hall_8h_a9671d0935caa6dd24b5f1b9be101c477}\label{Hall_8h_a9671d0935caa6dd24b5f1b9be101c477}} +\index{Hall.h@{Hall.h}!operator$<$$<$@{operator$<$$<$}} +\index{operator$<$$<$@{operator$<$$<$}!Hall.h@{Hall.h}} +\doxysubsubsection{\texorpdfstring{operator$<$$<$()}{operator<<()}} +{\footnotesize\ttfamily std\+::ostream \& operator$<$$<$ (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr, }\item[{const \mbox{\hyperlink{classHall}{Hall}} \&}]{hall }\end{DoxyParamCaption})} + + + +Writes \mbox{\hyperlink{classHall}{Hall}} to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. + +Uses the stream\textquotesingle{}s \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator to write all internal data. + +\begin{DoxyNote}{Note} +Best used with std\+::cout or text std\+::ofstream +\end{DoxyNote} +\mbox{\Hypertarget{Hall_8h_ac55d9db507637effdb1896e33c86d439}\label{Hall_8h_ac55d9db507637effdb1896e33c86d439}} +\index{Hall.h@{Hall.h}!operator$>$$>$@{operator$>$$>$}} +\index{operator$>$$>$@{operator$>$$>$}!Hall.h@{Hall.h}} +\doxysubsubsection{\texorpdfstring{operator$>$$>$()}{operator>>()}} +{\footnotesize\ttfamily std\+::istream \& operator$>$$>$ (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr, }\item[{\mbox{\hyperlink{classHall}{Hall}} \&}]{hall }\end{DoxyParamCaption})} + + + +Reads \mbox{\hyperlink{classHall}{Hall}} from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. + +Uses the stream\textquotesingle{}s \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator to read and parse all internal values. + +\begin{DoxyNote}{Note} +Best used with std\+::cin or text std\+::ifstream +\end{DoxyNote} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Hall_8h_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Hall_8h_source.tex new file mode 100644 index 0000000..d597f51 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Hall_8h_source.tex @@ -0,0 +1,36 @@ +\hypertarget{Hall_8h_source}{}\doxysection{Hall.\+h} +\label{Hall_8h_source}\index{src/Models/Hall.h@{src/Models/Hall.h}} +\mbox{\hyperlink{Hall_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_MODEL\_HALL}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_MODEL\_HALL}} +\DoxyCodeLine{3 } +\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <istream>}} +\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <ostream>}} +\DoxyCodeLine{10 } +\DoxyCodeLine{13 \textcolor{keyword}{class }\mbox{\hyperlink{classHall}{Hall}} \{} +\DoxyCodeLine{14 \textcolor{keywordtype}{int} number;} +\DoxyCodeLine{15 \textcolor{keywordtype}{unsigned} rows;} +\DoxyCodeLine{16 \textcolor{keywordtype}{unsigned} seatsPerRow;} +\DoxyCodeLine{17 } +\DoxyCodeLine{18 \textcolor{keyword}{public}:} +\DoxyCodeLine{20 \mbox{\hyperlink{classHall_a122ed8085be305339c89cadb3e360b86}{Hall}}();} +\DoxyCodeLine{22 \mbox{\hyperlink{classHall_a122ed8085be305339c89cadb3e360b86}{Hall}}(\textcolor{keywordtype}{int} number);} +\DoxyCodeLine{24 \mbox{\hyperlink{classHall_a122ed8085be305339c89cadb3e360b86}{Hall}}(\textcolor{keywordtype}{int} number, \textcolor{keywordtype}{unsigned} rows, \textcolor{keywordtype}{unsigned} seatsPerRow);} +\DoxyCodeLine{25 } +\DoxyCodeLine{27 \textcolor{keywordtype}{int} \mbox{\hyperlink{classHall_a84186aee50631f25b214f18f7b0dc178}{get\_number}}() \textcolor{keyword}{const};} +\DoxyCodeLine{29 \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{classHall_a6b3c304a95d3f56980c6faf0cc2073a2}{get\_rows}}() \textcolor{keyword}{const};} +\DoxyCodeLine{31 \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{classHall_a42e1cd716086d8a42a627e00cde17a7e}{get\_seatsPerRow}}() \textcolor{keyword}{const};} +\DoxyCodeLine{32 } +\DoxyCodeLine{34 \textcolor{keywordtype}{void} \mbox{\hyperlink{classHall_acef974f302d8131ef4608e15f96c2df9}{read}}(std::istream\& istr);} +\DoxyCodeLine{36 \textcolor{keywordtype}{void} \mbox{\hyperlink{classHall_a0239d59ab0f832f16cf35c820d0eba5a}{write}}(std::ostream\& ostr) \textcolor{keyword}{const};} +\DoxyCodeLine{38 \textcolor{keywordtype}{int} \mbox{\hyperlink{classHall_a4259837f943c488c6b15ed6c80d5f30b}{compare}}(\textcolor{keyword}{const} \mbox{\hyperlink{classHall}{Hall}}\& other) \textcolor{keyword}{const};} +\DoxyCodeLine{39 } +\DoxyCodeLine{40 \};} +\DoxyCodeLine{41 } +\DoxyCodeLine{43 std::istream\& \mbox{\hyperlink{Hall_8h_ac55d9db507637effdb1896e33c86d439}{operator>>}}(std::istream\& istr, \mbox{\hyperlink{classHall}{Hall}}\& hall);} +\DoxyCodeLine{45 std::ostream\& \mbox{\hyperlink{Hall_8h_a9671d0935caa6dd24b5f1b9be101c477}{operator<<}}(std::ostream\& ostr, \textcolor{keyword}{const} \mbox{\hyperlink{classHall}{Hall}}\& hall);} +\DoxyCodeLine{46 } +\DoxyCodeLine{47 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/List_8hpp.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/List_8hpp.tex new file mode 100644 index 0000000..a31d9c9 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/List_8hpp.tex @@ -0,0 +1,67 @@ +\hypertarget{List_8hpp}{}\doxysection{src/\+Generic/\+List/\+List.hpp File Reference} +\label{List_8hpp}\index{src/Generic/List/List.hpp@{src/Generic/List/List.hpp}} + + +Stores declaration and definition of templated class \mbox{\hyperlink{classList}{List}}. + + +{\ttfamily \#include $<$istream$>$}\newline +{\ttfamily \#include $<$ostream$>$}\newline +\doxysubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classList}{List$<$ T $>$}} +\begin{DoxyCompactList}\small\item\em Templated class that stores an array of elements in dynamic memory. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Functions} +\begin{DoxyCompactItemize} +\item +{\footnotesize template$<$typename T $>$ }\\std\+::istream \& \mbox{\hyperlink{List_8hpp_a7469c3479753bfbada761697c539aa07}{operator$>$$>$}} (std\+::istream \&istr, \mbox{\hyperlink{classList}{List}}$<$ T $>$ \&obj) +\begin{DoxyCompactList}\small\item\em Reads \mbox{\hyperlink{classList}{List}} from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. \end{DoxyCompactList}\item +{\footnotesize template$<$typename T $>$ }\\std\+::ostream \& \mbox{\hyperlink{List_8hpp_ac8590f4d4ba6c820c34afe14df54f2c2}{operator$<$$<$}} (std\+::ostream \&ostr, const \mbox{\hyperlink{classList}{List}}$<$ T $>$ \&obj) +\begin{DoxyCompactList}\small\item\em Writes \mbox{\hyperlink{classList}{List}} to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores declaration and definition of templated class \mbox{\hyperlink{classList}{List}}. + + + +\doxysubsection{Function Documentation} +\mbox{\Hypertarget{List_8hpp_ac8590f4d4ba6c820c34afe14df54f2c2}\label{List_8hpp_ac8590f4d4ba6c820c34afe14df54f2c2}} +\index{List.hpp@{List.hpp}!operator$<$$<$@{operator$<$$<$}} +\index{operator$<$$<$@{operator$<$$<$}!List.hpp@{List.hpp}} +\doxysubsubsection{\texorpdfstring{operator$<$$<$()}{operator<<()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +std\+::ostream \& operator$<$$<$ (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr, }\item[{const \mbox{\hyperlink{classList}{List}}$<$ T $>$ \&}]{obj }\end{DoxyParamCaption})} + + + +Writes \mbox{\hyperlink{classList}{List}} to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. + +Uses the stream\textquotesingle{}s \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator to write the count and then all objects. + +\begin{DoxyWarning}{Warning} +The function depends on the type having the operator \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} defined, which takes an std\+::ostream\& and writes it\textquotesingle{}s data to it. Return type doesn\textquotesingle{}t matter. +\end{DoxyWarning} +\begin{DoxyNote}{Note} +Best used with std\+::cout or text std\+::ofstream +\end{DoxyNote} +\mbox{\Hypertarget{List_8hpp_a7469c3479753bfbada761697c539aa07}\label{List_8hpp_a7469c3479753bfbada761697c539aa07}} +\index{List.hpp@{List.hpp}!operator$>$$>$@{operator$>$$>$}} +\index{operator$>$$>$@{operator$>$$>$}!List.hpp@{List.hpp}} +\doxysubsubsection{\texorpdfstring{operator$>$$>$()}{operator>>()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +std\+::istream \& operator$>$$>$ (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr, }\item[{\mbox{\hyperlink{classList}{List}}$<$ T $>$ \&}]{obj }\end{DoxyParamCaption})} + + + +Reads \mbox{\hyperlink{classList}{List}} from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. + +Uses the stream\textquotesingle{}s \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator to read and parse the elements. The first item in the stream should be the count. + +\begin{DoxyWarning}{Warning} +The function depends on the type having the operator \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} defined, which takes an std\+::istream\& and writes it\textquotesingle{}s data to it. Return type doesn\textquotesingle{}t matter. +\end{DoxyWarning} +\begin{DoxyNote}{Note} +Best used with std\+::cin or text std\+::ifstream +\end{DoxyNote} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/List_8hpp_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/List_8hpp_source.tex new file mode 100644 index 0000000..1d5b9a9 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/List_8hpp_source.tex @@ -0,0 +1,263 @@ +\hypertarget{List_8hpp_source}{}\doxysection{List.\+hpp} +\label{List_8hpp_source}\index{src/Generic/List/List.hpp@{src/Generic/List/List.hpp}} +\mbox{\hyperlink{List_8hpp}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_LIST}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_LIST}} +\DoxyCodeLine{3 } +\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <istream>}} +\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <ostream>}} +\DoxyCodeLine{10 } +\DoxyCodeLine{21 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{22 \textcolor{keyword}{class }\mbox{\hyperlink{classList}{List}} \{} +\DoxyCodeLine{23 \textcolor{keyword}{protected}:} +\DoxyCodeLine{24 T* elements;} +\DoxyCodeLine{25 \textcolor{keywordtype}{unsigned} length;} +\DoxyCodeLine{26 \textcolor{keywordtype}{unsigned} count;} +\DoxyCodeLine{27 } +\DoxyCodeLine{28 \textcolor{keywordtype}{void} resize();} +\DoxyCodeLine{29 \textcolor{keywordtype}{void} free();} +\DoxyCodeLine{30 \textcolor{keywordtype}{void} copyFrom(\textcolor{keyword}{const} \mbox{\hyperlink{classList}{List}}\& other);} +\DoxyCodeLine{31 } +\DoxyCodeLine{32 \textcolor{keyword}{public}:} +\DoxyCodeLine{34 \mbox{\hyperlink{classList_a93cd36efc12aa5ef5fc28866edce7e61}{List}}(\textcolor{keyword}{const} T* elements, \textcolor{keywordtype}{unsigned} elementsCount);} +\DoxyCodeLine{36 \textcolor{keywordtype}{void} \mbox{\hyperlink{classList_abfec4f2e7990d06c143852ecfdf907bb}{add}}(\textcolor{keyword}{const} T\& element);} +\DoxyCodeLine{38 \textcolor{keywordtype}{void} \mbox{\hyperlink{classList_ae4586debf72af33bccb3c2fbfce420e8}{insertAt}}(\textcolor{keyword}{const} T\& element, \textcolor{keywordtype}{unsigned} index);} +\DoxyCodeLine{40 \textcolor{keywordtype}{bool} \mbox{\hyperlink{classList_ad9c0a5b5bca6286f458d6fab280de65a}{removeAt}}(\textcolor{keywordtype}{unsigned} index);} +\DoxyCodeLine{42 \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{classList_a3804f03273ef5e339b504e439c5b6534}{findIndex}}(\textcolor{keyword}{const} T\& element) \textcolor{keyword}{const};} +\DoxyCodeLine{43 \textcolor{keywordtype}{bool} \mbox{\hyperlink{classList_a163a070c7d5dc77ca3c1726b8f2d4bc1}{contain}}(\textcolor{keyword}{const} T\& element) \textcolor{keyword}{const};} +\DoxyCodeLine{45 T\& \mbox{\hyperlink{classList_a321bb581943398344aad07198d1f02ac}{operator[]}}(\textcolor{keywordtype}{unsigned} index);} +\DoxyCodeLine{47 \textcolor{keyword}{const} T\& \mbox{\hyperlink{classList_a5fa582de3aec5094a871852b658cf853}{operator[]}}(\textcolor{keywordtype}{unsigned} index) \textcolor{keyword}{const};} +\DoxyCodeLine{48 } +\DoxyCodeLine{50 \mbox{\hyperlink{classList}{List<T>}}\& \mbox{\hyperlink{classList_aa4332ce5a589da28528f035ded6d41e5}{operator+=}}(\textcolor{keyword}{const} \mbox{\hyperlink{classList}{List<T>}} other);} +\DoxyCodeLine{51 } +\DoxyCodeLine{53 std::istream\& \mbox{\hyperlink{classList_a5e3581ee07649f462aa8bb3221a5466e}{read}}(std::istream\& istr);} +\DoxyCodeLine{55 std::ostream\& \mbox{\hyperlink{classList_a8d2babffd2fb4a5e0a40dbd306e19956}{write}}(std::ostream\& ostr) \textcolor{keyword}{const};} +\DoxyCodeLine{56 } +\DoxyCodeLine{58 \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{classList_aa32109b77dccd8241b125ebabdda876c}{get\_length}}() \textcolor{keyword}{const};} +\DoxyCodeLine{60 \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{classList_a3c1e3a3fc085f5b7ae68514c4758687b}{get\_count}}() \textcolor{keyword}{const};} +\DoxyCodeLine{61 } +\DoxyCodeLine{62 \mbox{\hyperlink{classList}{List}}();} +\DoxyCodeLine{63 \mbox{\hyperlink{classList}{List}}\& operator=(\textcolor{keyword}{const} \mbox{\hyperlink{classList}{List}}\& other);} +\DoxyCodeLine{64 \mbox{\hyperlink{classList}{List}}(\textcolor{keyword}{const} \mbox{\hyperlink{classList}{List}}\& other);} +\DoxyCodeLine{65 \mbox{\hyperlink{classList}{\string~List}}();} +\DoxyCodeLine{66 } +\DoxyCodeLine{67 \mbox{\hyperlink{classList}{List}}(\mbox{\hyperlink{classList}{List}}\&\& other);} +\DoxyCodeLine{68 \mbox{\hyperlink{classList}{List}}\& operator=(\mbox{\hyperlink{classList}{List}}\&\& other);} +\DoxyCodeLine{69 \};} +\DoxyCodeLine{70 } +\DoxyCodeLine{72 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{73 std::istream\& \mbox{\hyperlink{List_8hpp_a7469c3479753bfbada761697c539aa07}{operator>>}}(std::istream\& istr, \mbox{\hyperlink{classList}{List<T>}}\& obj);} +\DoxyCodeLine{75 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{76 std::ostream\& \mbox{\hyperlink{List_8hpp_ac8590f4d4ba6c820c34afe14df54f2c2}{operator<<}}(std::ostream\& ostr, \textcolor{keyword}{const} \mbox{\hyperlink{classList}{List<T>}}\& obj);} +\DoxyCodeLine{77 } +\DoxyCodeLine{78 \textcolor{comment}{/* Private */}} +\DoxyCodeLine{79 } +\DoxyCodeLine{80 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{81 \textcolor{keywordtype}{void} \mbox{\hyperlink{classList}{List<T>::resize}}() \{} +\DoxyCodeLine{82 length = (length == 0) ? 8 : length << 1;} +\DoxyCodeLine{83 T* temp = \textcolor{keyword}{new} T[length];} +\DoxyCodeLine{84 \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} i = 0; i < count; i++)} +\DoxyCodeLine{85 temp[i] = elements[i];} +\DoxyCodeLine{86 \textcolor{keyword}{delete}[] elements;} +\DoxyCodeLine{87 elements = temp;} +\DoxyCodeLine{88 \}} +\DoxyCodeLine{89 } +\DoxyCodeLine{90 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{91 \textcolor{keywordtype}{void} \mbox{\hyperlink{classList}{List<T>::free}}() \{} +\DoxyCodeLine{92 \textcolor{keyword}{delete}[] elements;} +\DoxyCodeLine{93 \}} +\DoxyCodeLine{94 } +\DoxyCodeLine{95 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{96 \textcolor{keywordtype}{void} \mbox{\hyperlink{classList}{List<T>::copyFrom}}(\textcolor{keyword}{const} \mbox{\hyperlink{classList}{List}}\& other) \{} +\DoxyCodeLine{97 elements = \textcolor{keyword}{new} T[other.length];} +\DoxyCodeLine{98 \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} i = 0; i < other.count; i++)} +\DoxyCodeLine{99 elements[i] = other.elements[i];} +\DoxyCodeLine{100 length = other.length;} +\DoxyCodeLine{101 count = other.count;} +\DoxyCodeLine{102 \}} +\DoxyCodeLine{103 } +\DoxyCodeLine{104 \textcolor{comment}{/* Public */}} +\DoxyCodeLine{105 } +\DoxyCodeLine{106 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{107 \mbox{\hyperlink{classList}{List<T>::List}}(\textcolor{keyword}{const} T* elements, \textcolor{keywordtype}{unsigned} elementsCount) \{} +\DoxyCodeLine{108 length = 8;} +\DoxyCodeLine{109 count = elementsCount;} +\DoxyCodeLine{110 this-\/>elements = \textcolor{keyword}{new} T[length];} +\DoxyCodeLine{111 \textcolor{keywordflow}{for} (\textcolor{keywordtype}{unsigned} i = 0; i < count; i++)} +\DoxyCodeLine{112 this-\/>elements[i] = elements[i];} +\DoxyCodeLine{113 \}} +\DoxyCodeLine{114 } +\DoxyCodeLine{118 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{119 \textcolor{keywordtype}{void} \mbox{\hyperlink{classList_abfec4f2e7990d06c143852ecfdf907bb}{List<T>::add}}(\textcolor{keyword}{const} T\& element) \{} +\DoxyCodeLine{120 \textcolor{keywordflow}{if} (length == count) resize();} +\DoxyCodeLine{121 } +\DoxyCodeLine{122 elements[count++] = element;} +\DoxyCodeLine{123 \}} +\DoxyCodeLine{124 } +\DoxyCodeLine{131 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{132 \textcolor{keywordtype}{void} \mbox{\hyperlink{classList_ae4586debf72af33bccb3c2fbfce420e8}{List<T>::insertAt}}(\textcolor{keyword}{const} T\& element, \textcolor{keywordtype}{unsigned} index) \{} +\DoxyCodeLine{133 \textcolor{keywordflow}{if} (index >= count) \{} +\DoxyCodeLine{134 add(element);} +\DoxyCodeLine{135 \textcolor{keywordflow}{return};} +\DoxyCodeLine{136 \}} +\DoxyCodeLine{137 \textcolor{keywordflow}{if} (length == count) resize();} +\DoxyCodeLine{138 } +\DoxyCodeLine{139 \textcolor{keywordflow}{for} (\textcolor{keywordtype}{unsigned} i = count; i > index; i-\/-\/)} +\DoxyCodeLine{140 elements[i] = elements[i -\/ 1];} +\DoxyCodeLine{141 } +\DoxyCodeLine{142 elements[index] = element;} +\DoxyCodeLine{143 count++;} +\DoxyCodeLine{144 \}} +\DoxyCodeLine{145 } +\DoxyCodeLine{151 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{152 \textcolor{keywordtype}{bool} \mbox{\hyperlink{classList_ad9c0a5b5bca6286f458d6fab280de65a}{List<T>::removeAt}}(\textcolor{keywordtype}{unsigned} index) \{} +\DoxyCodeLine{153 \textcolor{keywordflow}{if} (index >= count) \textcolor{keywordflow}{return} \textcolor{keyword}{false};} +\DoxyCodeLine{154 } +\DoxyCodeLine{155 \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} i = index; i < count; i++)} +\DoxyCodeLine{156 elements[i] = elements[i + 1];} +\DoxyCodeLine{157 count-\/-\/;} +\DoxyCodeLine{158 \textcolor{keywordflow}{return} \textcolor{keyword}{true};} +\DoxyCodeLine{159 \}} +\DoxyCodeLine{160 } +\DoxyCodeLine{166 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{167 \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{classList_a3804f03273ef5e339b504e439c5b6534}{List<T>::findIndex}}(\textcolor{keyword}{const} T\& element)\textcolor{keyword}{ const }\{} +\DoxyCodeLine{168 \textcolor{keywordtype}{unsigned} ind = 0;} +\DoxyCodeLine{169 \textcolor{keywordflow}{while} (ind < count \&\& elements[ind].compare(element) != 0)} +\DoxyCodeLine{170 ind++;} +\DoxyCodeLine{171 \textcolor{keywordflow}{return} ind;} +\DoxyCodeLine{172 \}} +\DoxyCodeLine{173 } +\DoxyCodeLine{179 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{180 \textcolor{keywordtype}{bool} \mbox{\hyperlink{classList_a163a070c7d5dc77ca3c1726b8f2d4bc1}{List<T>::contain}}(\textcolor{keyword}{const} T\& element)\textcolor{keyword}{ const }\{} +\DoxyCodeLine{181 \textcolor{keywordflow}{return} findIndex(element) < count;} +\DoxyCodeLine{182 \}} +\DoxyCodeLine{183 } +\DoxyCodeLine{184 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{185 T\& \mbox{\hyperlink{classList_a321bb581943398344aad07198d1f02ac}{List<T>::operator[]}}(\textcolor{keywordtype}{unsigned} index) \{} +\DoxyCodeLine{186 \textcolor{keywordflow}{return} elements[index];} +\DoxyCodeLine{187 \}} +\DoxyCodeLine{188 } +\DoxyCodeLine{189 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{190 \textcolor{keyword}{const} T\& \mbox{\hyperlink{classList_a321bb581943398344aad07198d1f02ac}{List<T>::operator[]}}(\textcolor{keywordtype}{unsigned} index)\textcolor{keyword}{ const }\{} +\DoxyCodeLine{191 \textcolor{keywordflow}{return} elements[index];} +\DoxyCodeLine{192 \}} +\DoxyCodeLine{193 } +\DoxyCodeLine{194 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{195 \mbox{\hyperlink{classList}{List<T>}}\& \mbox{\hyperlink{classList_aa4332ce5a589da28528f035ded6d41e5}{List<T>::operator+=}}(\textcolor{keyword}{const} \mbox{\hyperlink{classList}{List<T>}} other) \{} +\DoxyCodeLine{196 \textcolor{keywordflow}{for} (\textcolor{keywordtype}{unsigned} i = 0; i < other.length; i++)} +\DoxyCodeLine{197 add(other[i]);} +\DoxyCodeLine{198 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} +\DoxyCodeLine{199 \}} +\DoxyCodeLine{200 } +\DoxyCodeLine{210 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{211 std::istream\& \mbox{\hyperlink{classList_a5e3581ee07649f462aa8bb3221a5466e}{List<T>::read}}(std::istream\& istr) \{} +\DoxyCodeLine{212 istr.read((\textcolor{keywordtype}{char}*)\&length, \textcolor{keyword}{sizeof}(length));} +\DoxyCodeLine{213 istr.read((\textcolor{keywordtype}{char}*)\&count, \textcolor{keyword}{sizeof}(count));} +\DoxyCodeLine{214 } +\DoxyCodeLine{215 \textcolor{keyword}{delete}[] elements;} +\DoxyCodeLine{216 elements = \textcolor{keyword}{new} T[length];} +\DoxyCodeLine{217 } +\DoxyCodeLine{218 \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} i = 0; i < count; i++)} +\DoxyCodeLine{219 elements[i].\mbox{\hyperlink{Toolbox_8hpp_a3c9098dc2b305107367c56ded5dec787}{read}}(istr);} +\DoxyCodeLine{220 } +\DoxyCodeLine{221 \textcolor{keywordflow}{return} istr;} +\DoxyCodeLine{222 \}} +\DoxyCodeLine{223 } +\DoxyCodeLine{232 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{233 std::ostream\& \mbox{\hyperlink{classList_a8d2babffd2fb4a5e0a40dbd306e19956}{List<T>::write}}(std::ostream\& ostr)\textcolor{keyword}{ const }\{} +\DoxyCodeLine{234 ostr.write((\textcolor{keyword}{const} \textcolor{keywordtype}{char}*)\&length, \textcolor{keyword}{sizeof}(length));} +\DoxyCodeLine{235 ostr.write((\textcolor{keyword}{const} \textcolor{keywordtype}{char}*)\&count, \textcolor{keyword}{sizeof}(count));} +\DoxyCodeLine{236 } +\DoxyCodeLine{237 \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} i = 0; i < count; i++)} +\DoxyCodeLine{238 elements[i].write(ostr);} +\DoxyCodeLine{239 } +\DoxyCodeLine{240 \textcolor{keywordflow}{return} ostr;} +\DoxyCodeLine{241 \}} +\DoxyCodeLine{242 } +\DoxyCodeLine{246 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{247 \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{classList_aa32109b77dccd8241b125ebabdda876c}{List<T>::get\_length}}()\textcolor{keyword}{ const }\{} +\DoxyCodeLine{248 \textcolor{keywordflow}{return} length;} +\DoxyCodeLine{249 \}} +\DoxyCodeLine{250 } +\DoxyCodeLine{254 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{255 \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{classList_a3c1e3a3fc085f5b7ae68514c4758687b}{List<T>::get\_count}}()\textcolor{keyword}{ const }\{} +\DoxyCodeLine{256 \textcolor{keywordflow}{return} count;} +\DoxyCodeLine{257 \}} +\DoxyCodeLine{258 } +\DoxyCodeLine{259 \textcolor{comment}{// Rule of 4}} +\DoxyCodeLine{260 } +\DoxyCodeLine{261 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{262 \mbox{\hyperlink{classList}{List<T>::List}}() : \mbox{\hyperlink{classList}{List}}(nullptr, 0) \{\}} +\DoxyCodeLine{263 } +\DoxyCodeLine{264 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{265 \mbox{\hyperlink{classList}{List<T>}}\& \mbox{\hyperlink{classList}{List<T>::operator=}}(\textcolor{keyword}{const} \mbox{\hyperlink{classList}{List}}\& other) \{} +\DoxyCodeLine{266 \textcolor{keywordflow}{if} (\textcolor{keyword}{this} != \&other) \{} +\DoxyCodeLine{267 free();} +\DoxyCodeLine{268 copyFrom(other);} +\DoxyCodeLine{269 \}} +\DoxyCodeLine{270 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} +\DoxyCodeLine{271 \}} +\DoxyCodeLine{272 } +\DoxyCodeLine{273 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{274 \mbox{\hyperlink{classList}{List<T>::List}}(\textcolor{keyword}{const} \mbox{\hyperlink{classList}{List}}\& other) \{} +\DoxyCodeLine{275 copyFrom(other);} +\DoxyCodeLine{276 \}} +\DoxyCodeLine{277 } +\DoxyCodeLine{278 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{279 \mbox{\hyperlink{classList}{List<T>::\string~List}}() \{} +\DoxyCodeLine{280 free();} +\DoxyCodeLine{281 \}} +\DoxyCodeLine{282 } +\DoxyCodeLine{283 \textcolor{comment}{// Move semantics}} +\DoxyCodeLine{284 } +\DoxyCodeLine{285 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{286 \mbox{\hyperlink{classList}{List<T>::List}}(\mbox{\hyperlink{classList}{List}}\&\& other) \{} +\DoxyCodeLine{287 length = other.length;} +\DoxyCodeLine{288 count = other.count;} +\DoxyCodeLine{289 elements = other.elements;} +\DoxyCodeLine{290 other.elements = \textcolor{keyword}{nullptr};} +\DoxyCodeLine{291 \}} +\DoxyCodeLine{292 } +\DoxyCodeLine{293 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{294 \mbox{\hyperlink{classList}{List<T>}}\& \mbox{\hyperlink{classList}{List<T>::operator=}}(\mbox{\hyperlink{classList}{List}}\&\& other) \{} +\DoxyCodeLine{295 \textcolor{keywordflow}{if} (\textcolor{keyword}{this} != \&other) \{} +\DoxyCodeLine{296 free();} +\DoxyCodeLine{297 length = other.length;} +\DoxyCodeLine{298 count = other.count;} +\DoxyCodeLine{299 elements = other.elements;} +\DoxyCodeLine{300 other.elements = \textcolor{keyword}{nullptr};} +\DoxyCodeLine{301 \}} +\DoxyCodeLine{302 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} +\DoxyCodeLine{303 \}} +\DoxyCodeLine{304 } +\DoxyCodeLine{305 \textcolor{comment}{/* Outside of class */}} +\DoxyCodeLine{306 } +\DoxyCodeLine{314 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{315 std::istream\& \mbox{\hyperlink{List_8hpp_a7469c3479753bfbada761697c539aa07}{operator>>}}(std::istream\& istr, \mbox{\hyperlink{classList}{List<T>}}\& obj) \{} +\DoxyCodeLine{316 \mbox{\hyperlink{classList}{List<T>}} newObj;} +\DoxyCodeLine{317 \textcolor{keywordtype}{unsigned} count;} +\DoxyCodeLine{318 istr >> count;} +\DoxyCodeLine{319 } +\DoxyCodeLine{320 T temp;} +\DoxyCodeLine{321 \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} i = 0; i < count; i++) \{} +\DoxyCodeLine{322 istr >> temp;} +\DoxyCodeLine{323 obj.\mbox{\hyperlink{classList_abfec4f2e7990d06c143852ecfdf907bb}{add}}(temp);} +\DoxyCodeLine{324 \}} +\DoxyCodeLine{325 } +\DoxyCodeLine{326 \textcolor{keywordflow}{return} istr;} +\DoxyCodeLine{327 \}} +\DoxyCodeLine{328 } +\DoxyCodeLine{335 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{336 std::ostream\& \mbox{\hyperlink{List_8hpp_ac8590f4d4ba6c820c34afe14df54f2c2}{operator<<}}(std::ostream\& ostr, \textcolor{keyword}{const} \mbox{\hyperlink{classList}{List<T>}}\& obj) \{} +\DoxyCodeLine{337 ostr << obj.\mbox{\hyperlink{classList_a3c1e3a3fc085f5b7ae68514c4758687b}{get\_count}}() << std::endl;} +\DoxyCodeLine{338 \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} i = 0; i < obj.\mbox{\hyperlink{classList_a3c1e3a3fc085f5b7ae68514c4758687b}{get\_count}}(); i++)} +\DoxyCodeLine{339 ostr << obj[i];} +\DoxyCodeLine{340 } +\DoxyCodeLine{341 \textcolor{keywordflow}{return} ostr;} +\DoxyCodeLine{342 \}} +\DoxyCodeLine{343 } +\DoxyCodeLine{344 } +\DoxyCodeLine{345 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Makefile b/Year 1/Object-oriented Programming/Project 1/docs/latex/Makefile new file mode 100644 index 0000000..877c9cc --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Makefile @@ -0,0 +1,23 @@ +LATEX_CMD=pdflatex + +all: refman.pdf + +pdf: refman.pdf + +refman.pdf: clean refman.tex + $(LATEX_CMD) refman + makeindex refman.idx + $(LATEX_CMD) refman + latex_count=8 ; \ + while egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\ + do \ + echo "Rerunning latex...." ;\ + $(LATEX_CMD) refman ;\ + latex_count=`expr $$latex_count - 1` ;\ + done + makeindex refman.idx + $(LATEX_CMD) refman + + +clean: + rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Menu_8h.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Menu_8h.tex new file mode 100644 index 0000000..ea2d495 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Menu_8h.tex @@ -0,0 +1,19 @@ +\hypertarget{Menu_8h}{}\doxysection{src/\+Generic/\+Console\+Interface/\+Menu.h File Reference} +\label{Menu_8h}\index{src/Generic/ConsoleInterface/Menu.h@{src/Generic/ConsoleInterface/Menu.h}} + + +Stores the declaration of class \mbox{\hyperlink{classMenu}{Menu}}. + + +{\ttfamily \#include \char`\"{}Command.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}../\+List/\+List.\+hpp\char`\"{}}\newline +\doxysubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classMenu}{Menu}} +\begin{DoxyCompactList}\small\item\em Handles navigation between multiple commands. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores the declaration of class \mbox{\hyperlink{classMenu}{Menu}}. + diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Menu_8h_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Menu_8h_source.tex new file mode 100644 index 0000000..1190e08 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Menu_8h_source.tex @@ -0,0 +1,34 @@ +\hypertarget{Menu_8h_source}{}\doxysection{Menu.\+h} +\label{Menu_8h_source}\index{src/Generic/ConsoleInterface/Menu.h@{src/Generic/ConsoleInterface/Menu.h}} +\mbox{\hyperlink{Menu_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_CONSOLEINTERFACE\_MENU}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_CONSOLEINTERFACE\_MENU}} +\DoxyCodeLine{3 } +\DoxyCodeLine{8 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{Command_8h}{Command.h}}"{}}} +\DoxyCodeLine{9 \textcolor{preprocessor}{\#include "{}../List/List.hpp"{}}} +\DoxyCodeLine{10 } +\DoxyCodeLine{17 \textcolor{keyword}{class }\mbox{\hyperlink{classMenu}{Menu}} \{} +\DoxyCodeLine{18 \textcolor{keywordtype}{char} title[256];} +\DoxyCodeLine{19 \mbox{\hyperlink{classList}{List<Command>}} menuOptions;} +\DoxyCodeLine{20 } +\DoxyCodeLine{21 \textcolor{keywordtype}{bool} backExistsApp;} +\DoxyCodeLine{22 \textcolor{keywordtype}{bool} isSubMenu;} +\DoxyCodeLine{23 } +\DoxyCodeLine{24 \textcolor{keyword}{public}:} +\DoxyCodeLine{26 \mbox{\hyperlink{classMenu_ad466dd83355124a6ed958430450bfe94}{Menu}}();} +\DoxyCodeLine{28 \mbox{\hyperlink{classMenu_ad466dd83355124a6ed958430450bfe94}{Menu}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* title, \textcolor{keywordtype}{bool} backExistsApp, \textcolor{keywordtype}{bool} isSubMenu);} +\DoxyCodeLine{30 \mbox{\hyperlink{classMenu_ad466dd83355124a6ed958430450bfe94}{Menu}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* title, \textcolor{keywordtype}{bool} backExistsApp, \textcolor{keywordtype}{bool} isSubMenu, \textcolor{keyword}{const} \mbox{\hyperlink{classCommand}{Command}}* commands, \textcolor{keywordtype}{unsigned} commandCount);} +\DoxyCodeLine{31 } +\DoxyCodeLine{33 \textcolor{keywordtype}{void} \mbox{\hyperlink{classMenu_a1f022cc8b705369073f8fd7b90b30c8d}{addCommand}}(\textcolor{keyword}{const} \mbox{\hyperlink{classCommand}{Command}}\& command);} +\DoxyCodeLine{34 } +\DoxyCodeLine{36 \textcolor{keywordtype}{void} \mbox{\hyperlink{classMenu_aad506cb9a7f35dea98c60484bb2d095c}{registerError}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* message) \textcolor{keyword}{const};} +\DoxyCodeLine{38 \textcolor{keywordtype}{void} \mbox{\hyperlink{classMenu_a5350b1addf9bf365351486cd161696ad}{registerWarning}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* message) \textcolor{keyword}{const};} +\DoxyCodeLine{40 \textcolor{keywordtype}{void} \mbox{\hyperlink{classMenu_a3504e28b5d05e1ad70dada190bbc3a9c}{registerSuccess}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* message) \textcolor{keyword}{const};} +\DoxyCodeLine{41 } +\DoxyCodeLine{43 \textcolor{keywordtype}{void} \mbox{\hyperlink{classMenu_a0400751da7f8583029b7a12d3003c36d}{navigate}}() \textcolor{keyword}{const};} +\DoxyCodeLine{44 \};} +\DoxyCodeLine{45 } +\DoxyCodeLine{46 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/OrderedList_8hpp.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/OrderedList_8hpp.tex new file mode 100644 index 0000000..12ff026 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/OrderedList_8hpp.tex @@ -0,0 +1,18 @@ +\hypertarget{OrderedList_8hpp}{}\doxysection{src/\+Generic/\+List/\+Ordered\+List.hpp File Reference} +\label{OrderedList_8hpp}\index{src/Generic/List/OrderedList.hpp@{src/Generic/List/OrderedList.hpp}} + + +Stores declaration and definition of templated class \mbox{\hyperlink{classOrderedList}{Ordered\+List}}. + + +{\ttfamily \#include \char`\"{}List.\+hpp\char`\"{}}\newline +\doxysubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classOrderedList}{Ordered\+List$<$ T $>$}} +\begin{DoxyCompactList}\small\item\em Inherits \mbox{\hyperlink{classList}{List}}, but contains it\textquotesingle{}s elements in a sorted manner. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores declaration and definition of templated class \mbox{\hyperlink{classOrderedList}{Ordered\+List}}. + diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/OrderedList_8hpp_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/OrderedList_8hpp_source.tex new file mode 100644 index 0000000..632ec54 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/OrderedList_8hpp_source.tex @@ -0,0 +1,41 @@ +\hypertarget{OrderedList_8hpp_source}{}\doxysection{Ordered\+List.\+hpp} +\label{OrderedList_8hpp_source}\index{src/Generic/List/OrderedList.hpp@{src/Generic/List/OrderedList.hpp}} +\mbox{\hyperlink{OrderedList_8hpp}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_ORDEREDLIST}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_ORDEREDLIST}} +\DoxyCodeLine{3 } +\DoxyCodeLine{8 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{List_8hpp}{List.hpp}}"{}}} +\DoxyCodeLine{9 } +\DoxyCodeLine{15 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{16 \textcolor{keyword}{class }\mbox{\hyperlink{classOrderedList}{OrderedList}} : \textcolor{keyword}{public} \mbox{\hyperlink{classList}{List}}<T> \{} +\DoxyCodeLine{17 \textcolor{keyword}{public}:} +\DoxyCodeLine{18 \mbox{\hyperlink{classOrderedList}{OrderedList}}();} +\DoxyCodeLine{19 \mbox{\hyperlink{classOrderedList}{OrderedList}}(\textcolor{keyword}{const} T* elements, \textcolor{keywordtype}{unsigned} elementsCount);} +\DoxyCodeLine{20 } +\DoxyCodeLine{24 \textcolor{keywordtype}{void} \mbox{\hyperlink{classOrderedList_a8b2748c3cdefe4869e0d7a2fc9b4b2cd}{add}}(T element) = \textcolor{keyword}{delete};} +\DoxyCodeLine{28 \textcolor{keywordtype}{void} \mbox{\hyperlink{classOrderedList_a45af729846bacc77fc8292e5d0690f99}{insertAt}}(T element, \textcolor{keywordtype}{unsigned} index) = \textcolor{keyword}{delete};} +\DoxyCodeLine{29 } +\DoxyCodeLine{31 \textcolor{keywordtype}{void} \mbox{\hyperlink{classOrderedList_a1132cd9c92901e9b9950a4a409b0fc8b}{insert}}(T element);} +\DoxyCodeLine{32 \};} +\DoxyCodeLine{33 } +\DoxyCodeLine{34 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{35 \mbox{\hyperlink{classOrderedList}{OrderedList<T>::OrderedList}}() : \mbox{\hyperlink{classOrderedList}{OrderedList}}(nullptr, 0) \{\}} +\DoxyCodeLine{36 } +\DoxyCodeLine{37 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{38 \mbox{\hyperlink{classOrderedList}{OrderedList<T>::OrderedList}}(\textcolor{keyword}{const} T* elements, \textcolor{keywordtype}{unsigned} elementsCount) : \mbox{\hyperlink{classList}{List}}<T>::\mbox{\hyperlink{classList}{List}}(elements, elementsCount) \{\}} +\DoxyCodeLine{39 } +\DoxyCodeLine{44 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{45 \textcolor{keywordtype}{void} \mbox{\hyperlink{classOrderedList_a1132cd9c92901e9b9950a4a409b0fc8b}{OrderedList<T>::insert}}(T element) \{} +\DoxyCodeLine{46 \textcolor{keywordflow}{if} (\mbox{\hyperlink{classList}{List<T>::length}} == \mbox{\hyperlink{classList}{List<T>::count}}) \mbox{\hyperlink{classList}{List<T>::resize}}();} +\DoxyCodeLine{47 } +\DoxyCodeLine{48 \textcolor{keywordtype}{unsigned} insertionInd = 0;} +\DoxyCodeLine{49 \textcolor{keywordflow}{while} (insertionInd < \mbox{\hyperlink{classList}{List<T>::count}} \&\& \mbox{\hyperlink{classList}{List<T>::elements}}[insertionInd].compare(element) < 0)} +\DoxyCodeLine{50 insertionInd++;} +\DoxyCodeLine{51 } +\DoxyCodeLine{52 \mbox{\hyperlink{classList_ae4586debf72af33bccb3c2fbfce420e8}{List<T>::insertAt}}(element, insertionInd);} +\DoxyCodeLine{53 \}} +\DoxyCodeLine{54 } +\DoxyCodeLine{55 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Reservation_8h.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Reservation_8h.tex new file mode 100644 index 0000000..3df169e --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Reservation_8h.tex @@ -0,0 +1,29 @@ +\hypertarget{Reservation_8h}{}\doxysection{src/\+Models/\+Reservation.h File Reference} +\label{Reservation_8h}\index{src/Models/Reservation.h@{src/Models/Reservation.h}} + + +Stores the declaration of class \mbox{\hyperlink{classReservation}{Reservation}}. + + +{\ttfamily \#include \char`\"{}Ticket.\+h\char`\"{}}\newline +{\ttfamily \#include $<$istream$>$}\newline +{\ttfamily \#include $<$ostream$>$}\newline +\doxysubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classReservation}{Reservation}} +\begin{DoxyCompactList}\small\item\em Each Reservations contains a ticket, a password and a note. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Macros} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{Reservation_8h_a0fe437f408e254d25bd93c55b2a17371}\label{Reservation_8h_a0fe437f408e254d25bd93c55b2a17371}} +\#define {\bfseries PASSWORD\+\_\+\+LEN}~8 +\item +\mbox{\Hypertarget{Reservation_8h_a3c10da010db9a0c17470973fea43566f}\label{Reservation_8h_a3c10da010db9a0c17470973fea43566f}} +\#define {\bfseries NOTE\+\_\+\+LEN}~32 +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores the declaration of class \mbox{\hyperlink{classReservation}{Reservation}}. + diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Reservation_8h_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Reservation_8h_source.tex new file mode 100644 index 0000000..539658d --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Reservation_8h_source.tex @@ -0,0 +1,39 @@ +\hypertarget{Reservation_8h_source}{}\doxysection{Reservation.\+h} +\label{Reservation_8h_source}\index{src/Models/Reservation.h@{src/Models/Reservation.h}} +\mbox{\hyperlink{Reservation_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_MODEL\_RESERVATION}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_MODEL\_RESERVATION}} +\DoxyCodeLine{3 } +\DoxyCodeLine{8 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{Ticket_8h}{Ticket.h}}"{}}} +\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <istream>}} +\DoxyCodeLine{10 \textcolor{preprocessor}{\#include <ostream>}} +\DoxyCodeLine{11 } +\DoxyCodeLine{12 \textcolor{preprocessor}{\#define PASSWORD\_LEN 8}} +\DoxyCodeLine{13 \textcolor{preprocessor}{\#define NOTE\_LEN 32}} +\DoxyCodeLine{14 } +\DoxyCodeLine{17 \textcolor{keyword}{class }\mbox{\hyperlink{classReservation}{Reservation}} \{} +\DoxyCodeLine{18 \mbox{\hyperlink{classTicket}{Ticket}} ticket;} +\DoxyCodeLine{19 \textcolor{keywordtype}{char} password[PASSWORD\_LEN];} +\DoxyCodeLine{20 \textcolor{keywordtype}{char} note[NOTE\_LEN];} +\DoxyCodeLine{21 } +\DoxyCodeLine{22 \textcolor{keyword}{public}:} +\DoxyCodeLine{24 \mbox{\hyperlink{classReservation_a63b283053695e6f50fa44c50da2b3de5}{Reservation}}();} +\DoxyCodeLine{26 \mbox{\hyperlink{classReservation_a63b283053695e6f50fa44c50da2b3de5}{Reservation}}(\textcolor{keyword}{const} \mbox{\hyperlink{classTicket}{Ticket}}\& ticket);} +\DoxyCodeLine{28 \mbox{\hyperlink{classReservation_a63b283053695e6f50fa44c50da2b3de5}{Reservation}}(\textcolor{keyword}{const} \mbox{\hyperlink{classTicket}{Ticket}}\& ticket, \textcolor{keyword}{const} \textcolor{keywordtype}{char}* password, \textcolor{keyword}{const} \textcolor{keywordtype}{char}* note);} +\DoxyCodeLine{29 } +\DoxyCodeLine{31 \textcolor{keyword}{const} \mbox{\hyperlink{classTicket}{Ticket}}\& \mbox{\hyperlink{classReservation_af1b95b3d7c46f506dec4d275d6821cdb}{get\_ticket}}() \textcolor{keyword}{const};} +\DoxyCodeLine{33 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* \mbox{\hyperlink{classReservation_aa34cd16a057a4a483e569ec5d7527ad9}{get\_password}}() \textcolor{keyword}{const};} +\DoxyCodeLine{35 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* \mbox{\hyperlink{classReservation_a2285881510bf07f469bf360bb1050f12}{get\_note}}() \textcolor{keyword}{const};} +\DoxyCodeLine{36 } +\DoxyCodeLine{38 \textcolor{keywordtype}{void} \mbox{\hyperlink{classReservation_a03f0d1a522edb2c5fba7538f0c879573}{read}}(std::istream\& istr);} +\DoxyCodeLine{40 \textcolor{keywordtype}{void} \mbox{\hyperlink{classReservation_a1aba46b8e181750bd89fdfca6ff8ba32}{write}}(std::ostream\& ostr) \textcolor{keyword}{const};} +\DoxyCodeLine{42 \textcolor{keywordtype}{int} \mbox{\hyperlink{classReservation_a31cc66beeaf85befe2185dfc88086d38}{compare}}(\textcolor{keyword}{const} \mbox{\hyperlink{classReservation}{Reservation}}\& other) \textcolor{keyword}{const};} +\DoxyCodeLine{43 } +\DoxyCodeLine{45 \textcolor{keyword}{friend} std::istream\& \mbox{\hyperlink{classReservation_a2b7331e532f77bbc67eab217bfeb1f25}{operator>>}}(std::istream\& istr, \mbox{\hyperlink{classReservation}{Reservation}}\& reservation);} +\DoxyCodeLine{47 \textcolor{keyword}{friend} std::ostream\& \mbox{\hyperlink{classReservation_abf734c0a55da55ef89dab1e2f12b8ebd}{operator<<}}(std::ostream\& ostr, \textcolor{keyword}{const} \mbox{\hyperlink{classReservation}{Reservation}}\& reservation);} +\DoxyCodeLine{48 \};} +\DoxyCodeLine{49 } +\DoxyCodeLine{50 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/StatusCode_8h.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/StatusCode_8h.tex new file mode 100644 index 0000000..4d61d13 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/StatusCode_8h.tex @@ -0,0 +1,46 @@ +\hypertarget{StatusCode_8h}{}\doxysection{src/\+Services/\+Status\+Code.h File Reference} +\label{StatusCode_8h}\index{src/Services/StatusCode.h@{src/Services/StatusCode.h}} + + +Stores declaration of enum Status\+Code. + + +\doxysubsection*{Enumerations} +\begin{DoxyCompactItemize} +\item +enum \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \{ \newline +{\bfseries Success} +, {\bfseries W\+\_\+\+Ticket\+Had\+Not\+Been\+Reserved} +, {\bfseries E\+\_\+\+File\+Could\+Not\+Be\+Opened} +, {\bfseries E\+\_\+\+Hall\+Doesnt\+Exist} +, \newline +{\bfseries E\+\_\+\+Event\+Will\+Overlap} +, {\bfseries E\+\_\+\+Event\+Does\+Not\+Exist} +, {\bfseries E\+\_\+\+Ticket\+Already\+Bought} +, {\bfseries E\+\_\+\+Ticket\+Already\+Reserved} +, \newline +{\bfseries E\+\_\+\+Reservation\+Does\+Not\+Exist} +, {\bfseries E\+\_\+\+Wrong\+Reservation\+Password} + \} +\begin{DoxyCompactList}\small\item\em Used for communication between Services and what uses them. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores declaration of enum Status\+Code. + + + +\doxysubsection{Enumeration Type Documentation} +\mbox{\Hypertarget{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}\label{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}} +\index{StatusCode.h@{StatusCode.h}!StatusCode@{StatusCode}} +\index{StatusCode@{StatusCode}!StatusCode.h@{StatusCode.h}} +\doxysubsubsection{\texorpdfstring{StatusCode}{StatusCode}} +{\footnotesize\ttfamily enum \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}}} + + + +Used for communication between Services and what uses them. + +Most functions in Services return a Status\+Code. + +Those starting with W should be considered Warning, and those starting with E should be considered Errors.
\ No newline at end of file diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/StatusCode_8h_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/StatusCode_8h_source.tex new file mode 100644 index 0000000..77cc2e0 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/StatusCode_8h_source.tex @@ -0,0 +1,30 @@ +\hypertarget{StatusCode_8h_source}{}\doxysection{Status\+Code.\+h} +\label{StatusCode_8h_source}\index{src/Services/StatusCode.h@{src/Services/StatusCode.h}} +\mbox{\hyperlink{StatusCode_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_SERVICES\_STATUSCODE}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_SERVICES\_STATUSCODE}} +\DoxyCodeLine{3 } +\DoxyCodeLine{14 \textcolor{keyword}{enum} \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{StatusCode}} \{} +\DoxyCodeLine{15 Success,} +\DoxyCodeLine{16 } +\DoxyCodeLine{17 } +\DoxyCodeLine{18 W\_TicketHadNotBeenReserved,} +\DoxyCodeLine{19 } +\DoxyCodeLine{20 } +\DoxyCodeLine{21 E\_FileCouldNotBeOpened,} +\DoxyCodeLine{22 } +\DoxyCodeLine{23 E\_HallDoesntExist,} +\DoxyCodeLine{24 } +\DoxyCodeLine{25 E\_EventWillOverlap,} +\DoxyCodeLine{26 E\_EventDoesNotExist,} +\DoxyCodeLine{27 } +\DoxyCodeLine{28 E\_TicketAlreadyBought,} +\DoxyCodeLine{29 E\_TicketAlreadyReserved,} +\DoxyCodeLine{30 E\_ReservationDoesNotExist,} +\DoxyCodeLine{31 E\_WrongReservationPassword,} +\DoxyCodeLine{32 \};} +\DoxyCodeLine{33 } +\DoxyCodeLine{34 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/String_8h.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/String_8h.tex new file mode 100644 index 0000000..b8108e0 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/String_8h.tex @@ -0,0 +1,19 @@ +\hypertarget{String_8h}{}\doxysection{src/\+Generic/\+String/\+String.h File Reference} +\label{String_8h}\index{src/Generic/String/String.h@{src/Generic/String/String.h}} + + +Stores declaration of class \mbox{\hyperlink{classString}{String}}. + + +{\ttfamily \#include $<$istream$>$}\newline +{\ttfamily \#include $<$ostream$>$}\newline +\doxysubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classString}{String}} +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores declaration of class \mbox{\hyperlink{classString}{String}}. + diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/String_8h_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/String_8h_source.tex new file mode 100644 index 0000000..5db0734 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/String_8h_source.tex @@ -0,0 +1,46 @@ +\hypertarget{String_8h_source}{}\doxysection{String.\+h} +\label{String_8h_source}\index{src/Generic/String/String.h@{src/Generic/String/String.h}} +\mbox{\hyperlink{String_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_STRING}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_STRING}} +\DoxyCodeLine{3 } +\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <istream>}} +\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <ostream>}} +\DoxyCodeLine{10 } +\DoxyCodeLine{11 \textcolor{keyword}{class }\mbox{\hyperlink{classString}{String}} \{} +\DoxyCodeLine{12 \textcolor{keywordtype}{char}* str;} +\DoxyCodeLine{13 \textcolor{keywordtype}{unsigned} length;} +\DoxyCodeLine{14 } +\DoxyCodeLine{15 \textcolor{keywordtype}{void} free();} +\DoxyCodeLine{16 \textcolor{keywordtype}{void} copyFrom(\textcolor{keyword}{const} \mbox{\hyperlink{classString}{String}}\& other);} +\DoxyCodeLine{17 } +\DoxyCodeLine{18 \textcolor{keyword}{public}:} +\DoxyCodeLine{20 \mbox{\hyperlink{classString}{String}}(\textcolor{keywordtype}{unsigned} length);} +\DoxyCodeLine{22 \mbox{\hyperlink{classString}{String}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* str);} +\DoxyCodeLine{24 \textcolor{keyword}{const} \textcolor{keywordtype}{char}* \mbox{\hyperlink{classString_a3d7f953737f3d4dca72d1cc4836f7dcc}{get\_cstr}}() \textcolor{keyword}{const};} +\DoxyCodeLine{26 \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{classString_a7793a7e9a7601d4c724dcc85566259bf}{get\_length}}() \textcolor{keyword}{const};} +\DoxyCodeLine{28 \textcolor{keywordtype}{char}\& \mbox{\hyperlink{classString_a5d3b77a51619a8580a373d2cd1092a54}{operator[]}}(\textcolor{keywordtype}{unsigned} index);} +\DoxyCodeLine{29 } +\DoxyCodeLine{31 \mbox{\hyperlink{classString}{String}}\& \mbox{\hyperlink{classString_a64de9ab1af5df9397f8fbd8c79d5f4b6}{operator+=}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* str);} +\DoxyCodeLine{33 \mbox{\hyperlink{classString}{String}}\& \mbox{\hyperlink{classString_a64de9ab1af5df9397f8fbd8c79d5f4b6}{operator+=}}(\textcolor{keywordtype}{unsigned} number);} +\DoxyCodeLine{34 } +\DoxyCodeLine{35 \mbox{\hyperlink{classString}{String}}();} +\DoxyCodeLine{36 \mbox{\hyperlink{classString}{String}}(\textcolor{keyword}{const} \mbox{\hyperlink{classString}{String}}\& other);} +\DoxyCodeLine{37 \mbox{\hyperlink{classString}{String}}\& operator=(\textcolor{keyword}{const} \mbox{\hyperlink{classString}{String}}\& other);} +\DoxyCodeLine{38 \mbox{\hyperlink{classString}{\string~String}}();} +\DoxyCodeLine{39 } +\DoxyCodeLine{40 \mbox{\hyperlink{classString}{String}}(\mbox{\hyperlink{classString}{String}}\&\& other);} +\DoxyCodeLine{41 \mbox{\hyperlink{classString}{String}}\& operator=(\mbox{\hyperlink{classString}{String}}\&\& other);} +\DoxyCodeLine{42 } +\DoxyCodeLine{44 \textcolor{keywordtype}{void} \mbox{\hyperlink{classString_ad76bb9eca15651c67332808cdaad6344}{read}}(std::istream\& istr);} +\DoxyCodeLine{46 \textcolor{keywordtype}{void} \mbox{\hyperlink{classString_a7b0ea809587c21bc1d2b87bfee53e628}{write}}(std::ostream\& ostr) \textcolor{keyword}{const};} +\DoxyCodeLine{48 \textcolor{keywordtype}{int} \mbox{\hyperlink{classString_a3f420d69fbe3de91711dc69148d23cc7}{compare}}(\textcolor{keyword}{const} \mbox{\hyperlink{classString}{String}}\& other) \textcolor{keyword}{const};} +\DoxyCodeLine{49 } +\DoxyCodeLine{51 \textcolor{keyword}{friend} std::istream\& \mbox{\hyperlink{classString_a1918adea635f3f340dbecd6fb05341f8}{operator>>}}(std::istream\& istr, \mbox{\hyperlink{classString}{String}}\& event);} +\DoxyCodeLine{53 \textcolor{keyword}{friend} std::ostream\& \mbox{\hyperlink{classString_aa00d824f40064ff356aa7c15d6a9da12}{operator<<}}(std::ostream\& ostr, \textcolor{keyword}{const} \mbox{\hyperlink{classString}{String}}\& event);} +\DoxyCodeLine{54 \};} +\DoxyCodeLine{55 } +\DoxyCodeLine{56 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Ticket_8h.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Ticket_8h.tex new file mode 100644 index 0000000..42be99a --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Ticket_8h.tex @@ -0,0 +1,59 @@ +\hypertarget{Ticket_8h}{}\doxysection{src/\+Models/\+Ticket.h File Reference} +\label{Ticket_8h}\index{src/Models/Ticket.h@{src/Models/Ticket.h}} + + +Stores the declaration of class \mbox{\hyperlink{classTicket}{Ticket}}. + + +{\ttfamily \#include $<$istream$>$}\newline +{\ttfamily \#include $<$ostream$>$}\newline +\doxysubsection*{Classes} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classTicket}{Ticket}} +\begin{DoxyCompactList}\small\item\em Each \mbox{\hyperlink{classTicket}{Ticket}} contains a row and a seat number. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Functions} +\begin{DoxyCompactItemize} +\item +std\+::istream \& \mbox{\hyperlink{Ticket_8h_ac5c53ae039e173faa4cce85c2e32c920}{operator$>$$>$}} (std\+::istream \&istr, \mbox{\hyperlink{classTicket}{Ticket}} \&ticket) +\begin{DoxyCompactList}\small\item\em Reads \mbox{\hyperlink{classTicket}{Ticket}} from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. \end{DoxyCompactList}\item +std\+::ostream \& \mbox{\hyperlink{Ticket_8h_ae1686d3505df5e86e64e6e1b263e92ce}{operator$<$$<$}} (std\+::ostream \&ostr, const \mbox{\hyperlink{classTicket}{Ticket}} \&ticket) +\begin{DoxyCompactList}\small\item\em Writes \mbox{\hyperlink{classTicket}{Ticket}} to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores the declaration of class \mbox{\hyperlink{classTicket}{Ticket}}. + + + +\doxysubsection{Function Documentation} +\mbox{\Hypertarget{Ticket_8h_ae1686d3505df5e86e64e6e1b263e92ce}\label{Ticket_8h_ae1686d3505df5e86e64e6e1b263e92ce}} +\index{Ticket.h@{Ticket.h}!operator$<$$<$@{operator$<$$<$}} +\index{operator$<$$<$@{operator$<$$<$}!Ticket.h@{Ticket.h}} +\doxysubsubsection{\texorpdfstring{operator$<$$<$()}{operator<<()}} +{\footnotesize\ttfamily std\+::ostream \& operator$<$$<$ (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr, }\item[{const \mbox{\hyperlink{classTicket}{Ticket}} \&}]{ticket }\end{DoxyParamCaption})} + + + +Writes \mbox{\hyperlink{classTicket}{Ticket}} to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. + +Uses the stream\textquotesingle{}s \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator to write row and seat, separated by a space. + +\begin{DoxyNote}{Note} +Best used with std\+::cout or text std\+::ofstream +\end{DoxyNote} +\mbox{\Hypertarget{Ticket_8h_ac5c53ae039e173faa4cce85c2e32c920}\label{Ticket_8h_ac5c53ae039e173faa4cce85c2e32c920}} +\index{Ticket.h@{Ticket.h}!operator$>$$>$@{operator$>$$>$}} +\index{operator$>$$>$@{operator$>$$>$}!Ticket.h@{Ticket.h}} +\doxysubsubsection{\texorpdfstring{operator$>$$>$()}{operator>>()}} +{\footnotesize\ttfamily std\+::istream \& operator$>$$>$ (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr, }\item[{\mbox{\hyperlink{classTicket}{Ticket}} \&}]{ticket }\end{DoxyParamCaption})} + + + +Reads \mbox{\hyperlink{classTicket}{Ticket}} from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. + +Uses the stream\textquotesingle{}s \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator to read and parse row and seat. + +\begin{DoxyNote}{Note} +Best used with std\+::cin or text std\+::ifstream +\end{DoxyNote} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Ticket_8h_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Ticket_8h_source.tex new file mode 100644 index 0000000..c605906 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Ticket_8h_source.tex @@ -0,0 +1,32 @@ +\hypertarget{Ticket_8h_source}{}\doxysection{Ticket.\+h} +\label{Ticket_8h_source}\index{src/Models/Ticket.h@{src/Models/Ticket.h}} +\mbox{\hyperlink{Ticket_8h}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_HEADER\_TICKET}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_HEADER\_TICKET}} +\DoxyCodeLine{3 } +\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <istream>}} +\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <ostream>}} +\DoxyCodeLine{10 } +\DoxyCodeLine{13 \textcolor{keyword}{class }\mbox{\hyperlink{classTicket}{Ticket}} \{} +\DoxyCodeLine{14 \textcolor{keywordtype}{unsigned} row;} +\DoxyCodeLine{15 \textcolor{keywordtype}{unsigned} seat;} +\DoxyCodeLine{16 } +\DoxyCodeLine{17 \textcolor{keyword}{public}:} +\DoxyCodeLine{19 \mbox{\hyperlink{classTicket_aba3a46c9223efb6ab0bde93a09403537}{Ticket}}();} +\DoxyCodeLine{21 \mbox{\hyperlink{classTicket_aba3a46c9223efb6ab0bde93a09403537}{Ticket}}(\textcolor{keywordtype}{unsigned} row, \textcolor{keywordtype}{unsigned} seat);} +\DoxyCodeLine{22 } +\DoxyCodeLine{24 \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{classTicket_a94476de3cd6711185527d0fe4df9a278}{get\_row}}() \textcolor{keyword}{const};} +\DoxyCodeLine{26 \textcolor{keywordtype}{unsigned} \mbox{\hyperlink{classTicket_af7b64cb77a676d0f7bdb32255283f005}{get\_seat}}() \textcolor{keyword}{const};} +\DoxyCodeLine{27 } +\DoxyCodeLine{29 \textcolor{keywordtype}{void} \mbox{\hyperlink{classTicket_aad2d0b7b92b54ec861db92c31f50f4ad}{read}}(std::istream\& istr);} +\DoxyCodeLine{31 \textcolor{keywordtype}{void} \mbox{\hyperlink{classTicket_a584a11f6236fc96f3bdbd0592d3f60f4}{write}}(std::ostream\& ostr) \textcolor{keyword}{const};} +\DoxyCodeLine{33 \textcolor{keywordtype}{int} \mbox{\hyperlink{classTicket_a82a063f71be89f44dd969970855187c4}{compare}}(\textcolor{keyword}{const} \mbox{\hyperlink{classTicket}{Ticket}}\& other) \textcolor{keyword}{const};} +\DoxyCodeLine{34 \};} +\DoxyCodeLine{35 } +\DoxyCodeLine{37 std::istream\& \mbox{\hyperlink{Ticket_8h_ac5c53ae039e173faa4cce85c2e32c920}{operator>>}}(std::istream\& istr, \mbox{\hyperlink{classTicket}{Ticket}}\& ticket);} +\DoxyCodeLine{39 std::ostream\& \mbox{\hyperlink{Ticket_8h_ae1686d3505df5e86e64e6e1b263e92ce}{operator<<}}(std::ostream\& ostr, \textcolor{keyword}{const} \mbox{\hyperlink{classTicket}{Ticket}}\& ticket);} +\DoxyCodeLine{40 } +\DoxyCodeLine{41 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Toolbox_8hpp.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Toolbox_8hpp.tex new file mode 100644 index 0000000..246f05f --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Toolbox_8hpp.tex @@ -0,0 +1,423 @@ +\hypertarget{Toolbox_8hpp}{}\doxysection{src/\+Generic/\+Console\+Interface/\+Toolbox.hpp File Reference} +\label{Toolbox_8hpp}\index{src/Generic/ConsoleInterface/Toolbox.hpp@{src/Generic/ConsoleInterface/Toolbox.hpp}} + + +Stores a wide range of functions for simpler/more automated printing. + + +{\ttfamily \#include $<$iostream$>$}\newline +\doxysubsection*{Macros} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{Toolbox_8hpp_a09f908aa6474fe2b1f82b1aaade947f6}\label{Toolbox_8hpp_a09f908aa6474fe2b1f82b1aaade947f6}} +\#define {\bfseries MAX\+\_\+\+LINE\+\_\+\+WIDTH}~1024 +\end{DoxyCompactItemize} +\doxysubsection*{Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{Toolbox_8hpp_ac8bb3912a3ce86b15842e79d0b421204}{clear}} () +\begin{DoxyCompactList}\small\item\em Clears the console screen. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_a24a3fa9050ea032396c213ea85a1de0b}{title\+Box}} (const char $\ast$title) +\begin{DoxyCompactList}\small\item\em Prints a title box. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_ad557e4a1167be4e0c57fe530ce74a120}{sub\+Title\+Box}} (const char $\ast$title) +\begin{DoxyCompactList}\small\item\em Prints a title sub box. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_a6c82ac6987703376c17c74a81fb0a91a}{success\+Box}} (const char $\ast$message) +\begin{DoxyCompactList}\small\item\em Prints a success box. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_aa78e2e87fff9b64ca032a5b1c7054081}{success\+Sub\+Box}} (const char $\ast$message) +\begin{DoxyCompactList}\small\item\em Prints a success box as a sub box. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_a52222c9ff8739ef87c89df899deb5052}{warning\+Box}} (const char $\ast$message) +\begin{DoxyCompactList}\small\item\em Prints a warning box. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_a22f8b3135115d1b9fca09eea98dc6d92}{warning\+Sub\+Box}} (const char $\ast$message) +\begin{DoxyCompactList}\small\item\em Prints a warning box as a sub box. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_a9d709a3db7de05368cc38671c896bb2d}{error\+Box}} (const char $\ast$message) +\begin{DoxyCompactList}\small\item\em Prints an error box. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_ade748c3f15151748c9f978097715d2e7}{error\+Sub\+Box}} (const char $\ast$message) +\begin{DoxyCompactList}\small\item\em Prints an error box as a sub box. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_aa49b4d5a7b00249bc1fb08eec5e3aeaf}{input\+Line\+Box}} (const char $\ast$label, char $\ast$output, unsigned max\+Width, bool ignore=true) +\begin{DoxyCompactList}\small\item\em Prints label, gets a whole line of input and stores it to output. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_ad2c61ce27ec52d14e427d6f6e93d38f2}{input\+Line\+Sub\+Box}} (const char $\ast$label, char $\ast$output, unsigned max\+Width, bool ignore=true) +\begin{DoxyCompactList}\small\item\em Prints label as a sub box, gets a whole line of input and stores it to output. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_ac7f54319bf4e70a46e3155ae1b39e832}{press\+Enter\+To\+Continue}} (bool ignore=true) +\begin{DoxyCompactList}\small\item\em Waits for user to press enter. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_a4456d10f7e141c4fc1a29aff4ad29108}{reset\+Ordered\+List}} (int starter=1) +\begin{DoxyCompactList}\small\item\em Resets the ordered list starting number. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_a6c90056ede686f0319d0fb0a408d02e5}{table}} (unsigned start\+Number, unsigned columns, const char $\ast$items) +\begin{DoxyCompactList}\small\item\em Prints a string as a table. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_ac17b91efad13dbe9e10e5550ee4707c6}{\+\_\+print\+Sub\+Box\+Spacing}} () +\begin{DoxyCompactList}\small\item\em Semi-\/internal function that prints the spacing for sub boxes. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_ab3ce613add75d2385c8e1424527d2c3d}{\+\_\+print\+Input\+Box\+Label}} (const char $\ast$label) +\begin{DoxyCompactList}\small\item\em Semi-\/internal function that prints the label of an input box. \end{DoxyCompactList}\item +void \mbox{\hyperlink{Toolbox_8hpp_a27b565355e018d36b6ce47169cc26fad}{\+\_\+print\+Ordered\+List\+Beginning}} () +\begin{DoxyCompactList}\small\item\em Semi-\/internal function that prints the latest ordered list index. \end{DoxyCompactList}\item +\mbox{\Hypertarget{Toolbox_8hpp_a3c9098dc2b305107367c56ded5dec787}\label{Toolbox_8hpp_a3c9098dc2b305107367c56ded5dec787}} +{\footnotesize template$<$typename T $>$ }\\void {\bfseries read} (T $\ast$storage) +\begin{DoxyCompactList}\small\item\em Reads user input and stores it. \end{DoxyCompactList}\item +\mbox{\Hypertarget{Toolbox_8hpp_a06ca09434be2a02543a2371d477acfa0}\label{Toolbox_8hpp_a06ca09434be2a02543a2371d477acfa0}} +{\footnotesize template$<$typename T $>$ }\\void {\bfseries read} (T \&storage) +\begin{DoxyCompactList}\small\item\em Reads user input and stores it. \end{DoxyCompactList}\item +\mbox{\Hypertarget{Toolbox_8hpp_a5ca1093462d3266fceb8522e144c1e73}\label{Toolbox_8hpp_a5ca1093462d3266fceb8522e144c1e73}} +{\footnotesize template$<$typename T $>$ }\\void {\bfseries print} (const T $\ast$item) +\begin{DoxyCompactList}\small\item\em Prints given item. \end{DoxyCompactList}\item +\mbox{\Hypertarget{Toolbox_8hpp_a9c0a0d7d3210ca5f12f02ac4cb88476e}\label{Toolbox_8hpp_a9c0a0d7d3210ca5f12f02ac4cb88476e}} +{\footnotesize template$<$typename T $>$ }\\void {\bfseries print} (const T \&item) +\begin{DoxyCompactList}\small\item\em Prints given item. \end{DoxyCompactList}\item +\mbox{\Hypertarget{Toolbox_8hpp_a148d9d6b8b15bbfc2b1f4cdb16c2ee81}\label{Toolbox_8hpp_a148d9d6b8b15bbfc2b1f4cdb16c2ee81}} +{\footnotesize template$<$typename T $>$ }\\void {\bfseries print\+Line} (const T $\ast$item) +\begin{DoxyCompactList}\small\item\em Prints given item and an endline character. \end{DoxyCompactList}\item +\mbox{\Hypertarget{Toolbox_8hpp_a799f4cb5b4da3d40261e25d9e41995aa}\label{Toolbox_8hpp_a799f4cb5b4da3d40261e25d9e41995aa}} +{\footnotesize template$<$typename T $>$ }\\void {\bfseries print\+Line} (const T \&item) +\begin{DoxyCompactList}\small\item\em Prints given item and an endline character. \end{DoxyCompactList}\item +\mbox{\Hypertarget{Toolbox_8hpp_abe3a449632ee6d40eb59101dd2d2f114}\label{Toolbox_8hpp_abe3a449632ee6d40eb59101dd2d2f114}} +{\footnotesize template$<$typename T $>$ }\\void {\bfseries print\+Ordered\+List\+Elem} (const T \&elem) +\begin{DoxyCompactList}\small\item\em Prints the element as the latest list item. \end{DoxyCompactList}\item +\mbox{\Hypertarget{Toolbox_8hpp_ab7651f0a92f8d0d0be3d63c1045eee1e}\label{Toolbox_8hpp_ab7651f0a92f8d0d0be3d63c1045eee1e}} +{\footnotesize template$<$typename T $>$ }\\void {\bfseries input\+Box} (const char $\ast$label, T $\ast$output) +\begin{DoxyCompactList}\small\item\em Prints a label and then reads user input and stores it. \end{DoxyCompactList}\item +{\footnotesize template$<$typename T $>$ }\\void \mbox{\hyperlink{Toolbox_8hpp_a92da1c5f0023cd5c4809d9c1f682e92f}{input\+Sub\+Box}} (const char $\ast$label, T $\ast$output) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores a wide range of functions for simpler/more automated printing. + +Adds a lot of functions for printing. + +\begin{DoxyRemark}{Remarks} +iostream is included by necessity (templated functions), you should only use the provided functions, if you can. +\end{DoxyRemark} + + +\doxysubsection{Function Documentation} +\mbox{\Hypertarget{Toolbox_8hpp_ab3ce613add75d2385c8e1424527d2c3d}\label{Toolbox_8hpp_ab3ce613add75d2385c8e1424527d2c3d}} +\index{Toolbox.hpp@{Toolbox.hpp}!\_printInputBoxLabel@{\_printInputBoxLabel}} +\index{\_printInputBoxLabel@{\_printInputBoxLabel}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{\_printInputBoxLabel()}{\_printInputBoxLabel()}} +{\footnotesize\ttfamily void \+\_\+print\+Input\+Box\+Label (\begin{DoxyParamCaption}\item[{const char $\ast$}]{label }\end{DoxyParamCaption})} + + + +Semi-\/internal function that prints the label of an input box. + + +\begin{DoxyParams}{Parameters} +{\em label} & C-\/style string, there are no size checks so it could wrap\\ +\hline +\end{DoxyParams} +Prints \char`\"{}(+)\char`\"{} and then the given label. It doesn\textquotesingle{}t create spacing after label, so it should exist in the label itself. + +\begin{DoxyRemark}{Remarks} +Semi-\/internal means the function is defined in the header out of necessity (for templated functions) +\end{DoxyRemark} +\mbox{\Hypertarget{Toolbox_8hpp_a27b565355e018d36b6ce47169cc26fad}\label{Toolbox_8hpp_a27b565355e018d36b6ce47169cc26fad}} +\index{Toolbox.hpp@{Toolbox.hpp}!\_printOrderedListBeginning@{\_printOrderedListBeginning}} +\index{\_printOrderedListBeginning@{\_printOrderedListBeginning}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{\_printOrderedListBeginning()}{\_printOrderedListBeginning()}} +{\footnotesize\ttfamily void \+\_\+print\+Ordered\+List\+Beginning (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +Semi-\/internal function that prints the latest ordered list index. + +Prints the latests ordered list index, surrounded by square brackets, and increments the ordered list index. + +\begin{DoxyRemark}{Remarks} +There are no size checks, so list index could overflow. + +Semi-\/internal means the function is defined in the header out of necessity (for templated functions) +\end{DoxyRemark} +\mbox{\Hypertarget{Toolbox_8hpp_ac17b91efad13dbe9e10e5550ee4707c6}\label{Toolbox_8hpp_ac17b91efad13dbe9e10e5550ee4707c6}} +\index{Toolbox.hpp@{Toolbox.hpp}!\_printSubBoxSpacing@{\_printSubBoxSpacing}} +\index{\_printSubBoxSpacing@{\_printSubBoxSpacing}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{\_printSubBoxSpacing()}{\_printSubBoxSpacing()}} +{\footnotesize\ttfamily void \+\_\+print\+Sub\+Box\+Spacing (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +Semi-\/internal function that prints the spacing for sub boxes. + +Sub boxes are like normal boxes, but indented with 4 spaces. \mbox{\Hypertarget{Toolbox_8hpp_ac8bb3912a3ce86b15842e79d0b421204}\label{Toolbox_8hpp_ac8bb3912a3ce86b15842e79d0b421204}} +\index{Toolbox.hpp@{Toolbox.hpp}!clear@{clear}} +\index{clear@{clear}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{clear()}{clear()}} +{\footnotesize\ttfamily void clear (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +Clears the console screen. + +Erases display and moves cursor to top left corner via ANSI escape sequences\+: {\ttfamily ESC}\mbox{[}2J {\ttfamily ESC}\mbox{[}1;1H + +\begin{DoxyWarning}{Warning} +Not all terminals support any or all ANSI escape sequences +\end{DoxyWarning} +\begin{DoxyNote}{Note} +Source\+: \href{https://stackoverflow.com/a/52895729/12036073}{\texttt{ https\+://stackoverflow.\+com/a/52895729/12036073}} +\end{DoxyNote} +\mbox{\Hypertarget{Toolbox_8hpp_a9d709a3db7de05368cc38671c896bb2d}\label{Toolbox_8hpp_a9d709a3db7de05368cc38671c896bb2d}} +\index{Toolbox.hpp@{Toolbox.hpp}!errorBox@{errorBox}} +\index{errorBox@{errorBox}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{errorBox()}{errorBox()}} +{\footnotesize\ttfamily void error\+Box (\begin{DoxyParamCaption}\item[{const char $\ast$}]{message }\end{DoxyParamCaption})} + + + +Prints an error box. + + +\begin{DoxyParams}{Parameters} +{\em message} & C-\/style string, there are no size checks so it could wrap\\ +\hline +\end{DoxyParams} +Error boxes start with \char`\"{}$<$\+E$>$\char`\"{} and print the message. + +\begin{DoxyRemark}{Remarks} +Success/\+Warning/\+Error boxes start with \char`\"{}$<$\+C$>$\char`\"{} where C is an appropriate character. +\end{DoxyRemark} +\mbox{\Hypertarget{Toolbox_8hpp_ade748c3f15151748c9f978097715d2e7}\label{Toolbox_8hpp_ade748c3f15151748c9f978097715d2e7}} +\index{Toolbox.hpp@{Toolbox.hpp}!errorSubBox@{errorSubBox}} +\index{errorSubBox@{errorSubBox}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{errorSubBox()}{errorSubBox()}} +{\footnotesize\ttfamily void error\+Sub\+Box (\begin{DoxyParamCaption}\item[{const char $\ast$}]{message }\end{DoxyParamCaption})} + + + +Prints an error box as a sub box. + + +\begin{DoxyParams}{Parameters} +{\em message} & C-\/style string, there are no size checks so it could wrap\\ +\hline +\end{DoxyParams} +Error boxes start with \char`\"{}$<$\+E$>$\char`\"{} and print the message. + +\begin{DoxyRemark}{Remarks} +Success/\+Warning/\+Error boxes start with \char`\"{}$<$\+C$>$\char`\"{} where C is an appropriate character. +\end{DoxyRemark} +\begin{DoxySeeAlso}{See also} +\mbox{\hyperlink{Toolbox_8hpp_ac17b91efad13dbe9e10e5550ee4707c6}{\+\_\+print\+Sub\+Box\+Spacing()}} +\end{DoxySeeAlso} +\mbox{\Hypertarget{Toolbox_8hpp_aa49b4d5a7b00249bc1fb08eec5e3aeaf}\label{Toolbox_8hpp_aa49b4d5a7b00249bc1fb08eec5e3aeaf}} +\index{Toolbox.hpp@{Toolbox.hpp}!inputLineBox@{inputLineBox}} +\index{inputLineBox@{inputLineBox}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{inputLineBox()}{inputLineBox()}} +{\footnotesize\ttfamily void input\+Line\+Box (\begin{DoxyParamCaption}\item[{const char $\ast$}]{label, }\item[{char $\ast$}]{output, }\item[{unsigned}]{max\+Width, }\item[{bool}]{ignore }\end{DoxyParamCaption})} + + + +Prints label, gets a whole line of input and stores it to output. + + +\begin{DoxyParams}{Parameters} +{\em label} & C-\/style string, there are no size check so it could wrap \\ +\hline +{\em output} & Pointer to a char array \\ +\hline +{\em max\+Width} & Maximum count of characters to read from user input. output MUST be able to hold that many characters! \\ +\hline +{\em ignore} & Whether or not to ignore the first new-\/line delimiter. true by default, should be set to false only when an input\+Line\+Box/\+Sub\+Box has been issued directly prior or when it\textquotesingle{}s the very first issued box command.\\ +\hline +\end{DoxyParams} +Prints \char`\"{}(+)\char`\"{} before the label. \mbox{\Hypertarget{Toolbox_8hpp_ad2c61ce27ec52d14e427d6f6e93d38f2}\label{Toolbox_8hpp_ad2c61ce27ec52d14e427d6f6e93d38f2}} +\index{Toolbox.hpp@{Toolbox.hpp}!inputLineSubBox@{inputLineSubBox}} +\index{inputLineSubBox@{inputLineSubBox}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{inputLineSubBox()}{inputLineSubBox()}} +{\footnotesize\ttfamily void input\+Line\+Sub\+Box (\begin{DoxyParamCaption}\item[{const char $\ast$}]{label, }\item[{char $\ast$}]{output, }\item[{unsigned}]{max\+Width, }\item[{bool}]{ignore }\end{DoxyParamCaption})} + + + +Prints label as a sub box, gets a whole line of input and stores it to output. + + +\begin{DoxyParams}{Parameters} +{\em label} & C-\/style string, there are no size check so it could wrap \\ +\hline +{\em output} & Pointer to a char array \\ +\hline +{\em max\+Width} & Maximum count of characters to read from user input. output MUST be able to hold that many characters! \\ +\hline +{\em ignore} & Whether or not to ignore the first new-\/line delimiter. true by default, should be set to false only when an input\+Line\+Box/\+Sub\+Box has been issued directly prior or when it\textquotesingle{}s the very first issued box command.\\ +\hline +\end{DoxyParams} +Prints \char`\"{}(+)\char`\"{} before the label. \begin{DoxySeeAlso}{See also} +\mbox{\hyperlink{Toolbox_8hpp_ac17b91efad13dbe9e10e5550ee4707c6}{\+\_\+print\+Sub\+Box\+Spacing()}} +\end{DoxySeeAlso} +\mbox{\Hypertarget{Toolbox_8hpp_a92da1c5f0023cd5c4809d9c1f682e92f}\label{Toolbox_8hpp_a92da1c5f0023cd5c4809d9c1f682e92f}} +\index{Toolbox.hpp@{Toolbox.hpp}!inputSubBox@{inputSubBox}} +\index{inputSubBox@{inputSubBox}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{inputSubBox()}{inputSubBox()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +void input\+Sub\+Box (\begin{DoxyParamCaption}\item[{const char $\ast$}]{label, }\item[{T $\ast$}]{output }\end{DoxyParamCaption})} + +Prints a label with sub box spacing and then reads user input and stores it \begin{DoxySeeAlso}{See also} +\mbox{\hyperlink{Toolbox_8hpp_ac17b91efad13dbe9e10e5550ee4707c6}{\+\_\+print\+Sub\+Box\+Spacing()}} +\end{DoxySeeAlso} +\mbox{\Hypertarget{Toolbox_8hpp_ac7f54319bf4e70a46e3155ae1b39e832}\label{Toolbox_8hpp_ac7f54319bf4e70a46e3155ae1b39e832}} +\index{Toolbox.hpp@{Toolbox.hpp}!pressEnterToContinue@{pressEnterToContinue}} +\index{pressEnterToContinue@{pressEnterToContinue}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{pressEnterToContinue()}{pressEnterToContinue()}} +{\footnotesize\ttfamily void press\+Enter\+To\+Continue (\begin{DoxyParamCaption}\item[{bool}]{ignore }\end{DoxyParamCaption})} + + + +Waits for user to press enter. + + +\begin{DoxyParams}{Parameters} +{\em ignore} & Whether or not to ignore the first new-\/line delimiter. true by default, should be set to false only when an input\+Line\+Box/\+Sub\+Box has been issued directly prior or when it\textquotesingle{}s the very first issued box command.\\ +\hline +\end{DoxyParams} +Prints a \char`\"{}\+Press enter to continue\char`\"{} message and waits for the user \mbox{\Hypertarget{Toolbox_8hpp_a4456d10f7e141c4fc1a29aff4ad29108}\label{Toolbox_8hpp_a4456d10f7e141c4fc1a29aff4ad29108}} +\index{Toolbox.hpp@{Toolbox.hpp}!resetOrderedList@{resetOrderedList}} +\index{resetOrderedList@{resetOrderedList}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{resetOrderedList()}{resetOrderedList()}} +{\footnotesize\ttfamily void reset\+Ordered\+List (\begin{DoxyParamCaption}\item[{int}]{starter }\end{DoxyParamCaption})} + + + +Resets the ordered list starting number. + + +\begin{DoxyParams}{Parameters} +{\em starter} & Sets the starting number by which ordered list will enumerate\\ +\hline +\end{DoxyParams} +\begin{DoxyRemark}{Remarks} +Although starter can be a negative number, ordered list will always increment up the number. +\end{DoxyRemark} +\mbox{\Hypertarget{Toolbox_8hpp_ad557e4a1167be4e0c57fe530ce74a120}\label{Toolbox_8hpp_ad557e4a1167be4e0c57fe530ce74a120}} +\index{Toolbox.hpp@{Toolbox.hpp}!subTitleBox@{subTitleBox}} +\index{subTitleBox@{subTitleBox}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{subTitleBox()}{subTitleBox()}} +{\footnotesize\ttfamily void sub\+Title\+Box (\begin{DoxyParamCaption}\item[{const char $\ast$}]{title }\end{DoxyParamCaption})} + + + +Prints a title sub box. + + +\begin{DoxyParams}{Parameters} +{\em title} & C-\/style string, there are no size checks so it could wrap\\ +\hline +\end{DoxyParams} +Prints the title, surrounded by \char`\"{}-\/-\/-\/\char`\"{}. \mbox{\Hypertarget{Toolbox_8hpp_a6c82ac6987703376c17c74a81fb0a91a}\label{Toolbox_8hpp_a6c82ac6987703376c17c74a81fb0a91a}} +\index{Toolbox.hpp@{Toolbox.hpp}!successBox@{successBox}} +\index{successBox@{successBox}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{successBox()}{successBox()}} +{\footnotesize\ttfamily void success\+Box (\begin{DoxyParamCaption}\item[{const char $\ast$}]{message }\end{DoxyParamCaption})} + + + +Prints a success box. + + +\begin{DoxyParams}{Parameters} +{\em message} & C-\/style string, there are no size checks so it could wrap\\ +\hline +\end{DoxyParams} +Success boxes start with \char`\"{}$<$\+S$>$\char`\"{} and print the message. + +\begin{DoxyRemark}{Remarks} +Success/\+Warning/\+Error boxes start with \char`\"{}$<$\+C$>$\char`\"{} where C is an appropriate character. +\end{DoxyRemark} +\mbox{\Hypertarget{Toolbox_8hpp_aa78e2e87fff9b64ca032a5b1c7054081}\label{Toolbox_8hpp_aa78e2e87fff9b64ca032a5b1c7054081}} +\index{Toolbox.hpp@{Toolbox.hpp}!successSubBox@{successSubBox}} +\index{successSubBox@{successSubBox}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{successSubBox()}{successSubBox()}} +{\footnotesize\ttfamily void success\+Sub\+Box (\begin{DoxyParamCaption}\item[{const char $\ast$}]{message }\end{DoxyParamCaption})} + + + +Prints a success box as a sub box. + + +\begin{DoxyParams}{Parameters} +{\em message} & C-\/style string, there are no size checks so it could wrap\\ +\hline +\end{DoxyParams} +Success boxes start with \char`\"{}$<$\+S$>$\char`\"{} and print the message. + +\begin{DoxyRemark}{Remarks} +Success/\+Warning/\+Error boxes start with \char`\"{}$<$\+C$>$\char`\"{} where C is an appropriate character. +\end{DoxyRemark} +\begin{DoxySeeAlso}{See also} +\mbox{\hyperlink{Toolbox_8hpp_ac17b91efad13dbe9e10e5550ee4707c6}{\+\_\+print\+Sub\+Box\+Spacing()}} +\end{DoxySeeAlso} +\mbox{\Hypertarget{Toolbox_8hpp_a6c90056ede686f0319d0fb0a408d02e5}\label{Toolbox_8hpp_a6c90056ede686f0319d0fb0a408d02e5}} +\index{Toolbox.hpp@{Toolbox.hpp}!table@{table}} +\index{table@{table}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{table()}{table()}} +{\footnotesize\ttfamily void table (\begin{DoxyParamCaption}\item[{unsigned}]{start\+Number, }\item[{unsigned}]{columns, }\item[{const char $\ast$}]{items }\end{DoxyParamCaption})} + + + +Prints a string as a table. + + +\begin{DoxyParams}{Parameters} +{\em start\+Number} & The number by which column and row enumeration begins \\ +\hline +{\em columns} & How many columns the table should have \\ +\hline +{\em items} & C-\/style string, each cell is a single character from the string\\ +\hline +\end{DoxyParams} +Prints a string as a grid/table of characters from top to bottom, left to right. The first character is on the top left, the last one is on the bottom right. + +Table is printed until a terminating zero is encountered. The rows are \char`\"{}calculated\char`\"{} from the columns count and the items length. \mbox{\Hypertarget{Toolbox_8hpp_a24a3fa9050ea032396c213ea85a1de0b}\label{Toolbox_8hpp_a24a3fa9050ea032396c213ea85a1de0b}} +\index{Toolbox.hpp@{Toolbox.hpp}!titleBox@{titleBox}} +\index{titleBox@{titleBox}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{titleBox()}{titleBox()}} +{\footnotesize\ttfamily void title\+Box (\begin{DoxyParamCaption}\item[{const char $\ast$}]{title }\end{DoxyParamCaption})} + + + +Prints a title box. + + +\begin{DoxyParams}{Parameters} +{\em title} & C-\/style string, there are no size checks so it could wrap\\ +\hline +\end{DoxyParams} +Prints the title, surrounded by \char`\"{}===\char`\"{}. \mbox{\Hypertarget{Toolbox_8hpp_a52222c9ff8739ef87c89df899deb5052}\label{Toolbox_8hpp_a52222c9ff8739ef87c89df899deb5052}} +\index{Toolbox.hpp@{Toolbox.hpp}!warningBox@{warningBox}} +\index{warningBox@{warningBox}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{warningBox()}{warningBox()}} +{\footnotesize\ttfamily void warning\+Box (\begin{DoxyParamCaption}\item[{const char $\ast$}]{message }\end{DoxyParamCaption})} + + + +Prints a warning box. + + +\begin{DoxyParams}{Parameters} +{\em message} & C-\/style string, there are no size checks so it could wrap\\ +\hline +\end{DoxyParams} +Warning boxes start with \char`\"{}$<$\+W$>$\char`\"{} and print the message. + +\begin{DoxyRemark}{Remarks} +Success/\+Warning/\+Error boxes start with \char`\"{}$<$\+C$>$\char`\"{} where C is an appropriate character. +\end{DoxyRemark} +\mbox{\Hypertarget{Toolbox_8hpp_a22f8b3135115d1b9fca09eea98dc6d92}\label{Toolbox_8hpp_a22f8b3135115d1b9fca09eea98dc6d92}} +\index{Toolbox.hpp@{Toolbox.hpp}!warningSubBox@{warningSubBox}} +\index{warningSubBox@{warningSubBox}!Toolbox.hpp@{Toolbox.hpp}} +\doxysubsubsection{\texorpdfstring{warningSubBox()}{warningSubBox()}} +{\footnotesize\ttfamily void warning\+Sub\+Box (\begin{DoxyParamCaption}\item[{const char $\ast$}]{message }\end{DoxyParamCaption})} + + + +Prints a warning box as a sub box. + + +\begin{DoxyParams}{Parameters} +{\em message} & C-\/style string, there are no size checks so it could wrap\\ +\hline +\end{DoxyParams} +Warning boxes start with \char`\"{}$<$\+W$>$\char`\"{} and print the message. + +\begin{DoxyRemark}{Remarks} +Success/\+Warning/\+Error boxes start with \char`\"{}$<$\+C$>$\char`\"{} where C is an appropriate character. +\end{DoxyRemark} +\begin{DoxySeeAlso}{See also} +\mbox{\hyperlink{Toolbox_8hpp_ac17b91efad13dbe9e10e5550ee4707c6}{\+\_\+print\+Sub\+Box\+Spacing()}} +\end{DoxySeeAlso} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/Toolbox_8hpp_source.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/Toolbox_8hpp_source.tex new file mode 100644 index 0000000..a505d11 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/Toolbox_8hpp_source.tex @@ -0,0 +1,86 @@ +\hypertarget{Toolbox_8hpp_source}{}\doxysection{Toolbox.\+hpp} +\label{Toolbox_8hpp_source}\index{src/Generic/ConsoleInterface/Toolbox.hpp@{src/Generic/ConsoleInterface/Toolbox.hpp}} +\mbox{\hyperlink{Toolbox_8hpp}{Go to the documentation of this file.}} +\begin{DoxyCode}{0} +\DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef HEADER\_CONSOLEINTERFACE\_TOOLBOX}} +\DoxyCodeLine{2 \textcolor{preprocessor}{\#define HEADER\_CONSOLEINTERFACE\_TOOLBOX}} +\DoxyCodeLine{3 } +\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <iostream>}} +\DoxyCodeLine{5 } +\DoxyCodeLine{14 \textcolor{preprocessor}{\#define MAX\_LINE\_WIDTH 1024}} +\DoxyCodeLine{15 } +\DoxyCodeLine{17 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_ac8bb3912a3ce86b15842e79d0b421204}{clear}}();} +\DoxyCodeLine{19 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a24a3fa9050ea032396c213ea85a1de0b}{titleBox}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* title);} +\DoxyCodeLine{21 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_ad557e4a1167be4e0c57fe530ce74a120}{subTitleBox}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* title);} +\DoxyCodeLine{22 } +\DoxyCodeLine{24 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a6c82ac6987703376c17c74a81fb0a91a}{successBox}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* message);} +\DoxyCodeLine{26 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_aa78e2e87fff9b64ca032a5b1c7054081}{successSubBox}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* message);} +\DoxyCodeLine{28 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a52222c9ff8739ef87c89df899deb5052}{warningBox}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* message);} +\DoxyCodeLine{30 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a22f8b3135115d1b9fca09eea98dc6d92}{warningSubBox}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* message);} +\DoxyCodeLine{32 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a9d709a3db7de05368cc38671c896bb2d}{errorBox}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* message);} +\DoxyCodeLine{34 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_ade748c3f15151748c9f978097715d2e7}{errorSubBox}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* message);} +\DoxyCodeLine{35 } +\DoxyCodeLine{37 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_aa49b4d5a7b00249bc1fb08eec5e3aeaf}{inputLineBox}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* label, \textcolor{keywordtype}{char}* output, \textcolor{keywordtype}{unsigned} maxWidth, \textcolor{keywordtype}{bool} ignore = \textcolor{keyword}{true});} +\DoxyCodeLine{39 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_ad2c61ce27ec52d14e427d6f6e93d38f2}{inputLineSubBox}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* label, \textcolor{keywordtype}{char}* output, \textcolor{keywordtype}{unsigned} maxWidth, \textcolor{keywordtype}{bool} ignore = \textcolor{keyword}{true});} +\DoxyCodeLine{41 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_ac7f54319bf4e70a46e3155ae1b39e832}{pressEnterToContinue}}(\textcolor{keywordtype}{bool} ignore = \textcolor{keyword}{true});} +\DoxyCodeLine{42 } +\DoxyCodeLine{44 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a4456d10f7e141c4fc1a29aff4ad29108}{resetOrderedList}}(\textcolor{keywordtype}{int} starter = 1);} +\DoxyCodeLine{45 } +\DoxyCodeLine{47 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a6c90056ede686f0319d0fb0a408d02e5}{table}}(\textcolor{keywordtype}{unsigned} startNumber, \textcolor{keywordtype}{unsigned} columns, \textcolor{keyword}{const} \textcolor{keywordtype}{char}* items);} +\DoxyCodeLine{48 } +\DoxyCodeLine{50 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_ac17b91efad13dbe9e10e5550ee4707c6}{\_printSubBoxSpacing}}();} +\DoxyCodeLine{52 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_ab3ce613add75d2385c8e1424527d2c3d}{\_printInputBoxLabel}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* label);} +\DoxyCodeLine{54 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a27b565355e018d36b6ce47169cc26fad}{\_printOrderedListBeginning}}();} +\DoxyCodeLine{55 } +\DoxyCodeLine{57 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{58 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a3c9098dc2b305107367c56ded5dec787}{read}}(T* storage) \{} +\DoxyCodeLine{59 std::cin >> storage;} +\DoxyCodeLine{60 \}} +\DoxyCodeLine{61 } +\DoxyCodeLine{63 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{64 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a3c9098dc2b305107367c56ded5dec787}{read}}(T\& storage) \{} +\DoxyCodeLine{65 std::cin >> storage;} +\DoxyCodeLine{66 \}} +\DoxyCodeLine{67 } +\DoxyCodeLine{69 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{70 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a5ca1093462d3266fceb8522e144c1e73}{print}}(\textcolor{keyword}{const} T* item) \{} +\DoxyCodeLine{71 std::cout << item;} +\DoxyCodeLine{72 \}} +\DoxyCodeLine{73 } +\DoxyCodeLine{75 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{76 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a5ca1093462d3266fceb8522e144c1e73}{print}}(\textcolor{keyword}{const} T\& item) \{} +\DoxyCodeLine{77 std::cout << item;} +\DoxyCodeLine{78 \}} +\DoxyCodeLine{79 } +\DoxyCodeLine{81 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{82 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a148d9d6b8b15bbfc2b1f4cdb16c2ee81}{printLine}}(\textcolor{keyword}{const} T* item) \{} +\DoxyCodeLine{83 std::cout << item << std::endl;} +\DoxyCodeLine{84 \}} +\DoxyCodeLine{85 } +\DoxyCodeLine{87 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{88 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a148d9d6b8b15bbfc2b1f4cdb16c2ee81}{printLine}}(\textcolor{keyword}{const} T\& item) \{} +\DoxyCodeLine{89 std::cout << item << std::endl;} +\DoxyCodeLine{90 \}} +\DoxyCodeLine{91 } +\DoxyCodeLine{93 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{94 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_abe3a449632ee6d40eb59101dd2d2f114}{printOrderedListElem}}(\textcolor{keyword}{const} T\& elem) \{} +\DoxyCodeLine{95 \mbox{\hyperlink{Toolbox_8hpp_a27b565355e018d36b6ce47169cc26fad}{\_printOrderedListBeginning}}();} +\DoxyCodeLine{96 \mbox{\hyperlink{Toolbox_8hpp_a148d9d6b8b15bbfc2b1f4cdb16c2ee81}{printLine}}(elem);} +\DoxyCodeLine{97 \}} +\DoxyCodeLine{98 } +\DoxyCodeLine{100 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{101 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_ab7651f0a92f8d0d0be3d63c1045eee1e}{inputBox}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* label, T* output) \{} +\DoxyCodeLine{102 \mbox{\hyperlink{Toolbox_8hpp_ab3ce613add75d2385c8e1424527d2c3d}{\_printInputBoxLabel}}(label);} +\DoxyCodeLine{103 std::cin >> *output;} +\DoxyCodeLine{104 \}} +\DoxyCodeLine{105 } +\DoxyCodeLine{108 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} +\DoxyCodeLine{109 \textcolor{keywordtype}{void} \mbox{\hyperlink{Toolbox_8hpp_a92da1c5f0023cd5c4809d9c1f682e92f}{inputSubBox}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char}* label, T* output) \{} +\DoxyCodeLine{110 \mbox{\hyperlink{Toolbox_8hpp_ac17b91efad13dbe9e10e5550ee4707c6}{\_printSubBoxSpacing}}();} +\DoxyCodeLine{111 \mbox{\hyperlink{Toolbox_8hpp_ab3ce613add75d2385c8e1424527d2c3d}{\_printInputBoxLabel}}(label);} +\DoxyCodeLine{112 std::cin >> *output;} +\DoxyCodeLine{113 \}} +\DoxyCodeLine{114 } +\DoxyCodeLine{115 \textcolor{preprocessor}{\#endif}} + +\end{DoxyCode} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/annotated.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/annotated.tex new file mode 100644 index 0000000..ac5b211 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/annotated.tex @@ -0,0 +1,15 @@ +\doxysection{Class List} +Here are the classes, structs, unions and interfaces with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{\mbox{\hyperlink{classCommand}{Command}} \\*Stores a 256 character name and a function pointer to be executed when calling \mbox{\hyperlink{classCommand_a44689093b812bfc97b2787c2ba0303ce}{run()}} }{\pageref{classCommand}}{} +\item\contentsline{section}{\mbox{\hyperlink{classDate}{Date}} \\*Stores a day, month and year }{\pageref{classDate}}{} +\item\contentsline{section}{\mbox{\hyperlink{classEvent}{Event}} \\*Stores an event\textquotesingle{}s hall, name, date, bought tickets and reservations }{\pageref{classEvent}}{} +\item\contentsline{section}{\mbox{\hyperlink{classEventService}{Event\+Service}} \\*Each \mbox{\hyperlink{classEventService}{Event\+Service}} stores all events and a pointer to \mbox{\hyperlink{classHallService}{Hall\+Service}} }{\pageref{classEventService}}{} +\item\contentsline{section}{\mbox{\hyperlink{classHall}{Hall}} \\*Each hall contains a number, rows and seats per row }{\pageref{classHall}}{} +\item\contentsline{section}{\mbox{\hyperlink{classHallService}{Hall\+Service}} \\*Each \mbox{\hyperlink{classHallService}{Hall\+Service}} stores all halls }{\pageref{classHallService}}{} +\item\contentsline{section}{\mbox{\hyperlink{classList}{List$<$ T $>$}} \\*Templated class that stores an array of elements in dynamic memory }{\pageref{classList}}{} +\item\contentsline{section}{\mbox{\hyperlink{classMenu}{Menu}} \\*Handles navigation between multiple commands }{\pageref{classMenu}}{} +\item\contentsline{section}{\mbox{\hyperlink{classOrderedList}{Ordered\+List$<$ T $>$}} \\*Inherits \mbox{\hyperlink{classList}{List}}, but contains it\textquotesingle{}s elements in a sorted manner }{\pageref{classOrderedList}}{} +\item\contentsline{section}{\mbox{\hyperlink{classReservation}{Reservation}} \\*Each Reservations contains a ticket, a password and a note }{\pageref{classReservation}}{} +\item\contentsline{section}{\mbox{\hyperlink{classString}{String}} }{\pageref{classString}}{} +\item\contentsline{section}{\mbox{\hyperlink{classTicket}{Ticket}} \\*Each \mbox{\hyperlink{classTicket}{Ticket}} contains a row and a seat number }{\pageref{classTicket}}{} +\end{DoxyCompactList} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classCommand.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/classCommand.tex new file mode 100644 index 0000000..e588b0d --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classCommand.tex @@ -0,0 +1,68 @@ +\hypertarget{classCommand}{}\doxysection{Command Class Reference} +\label{classCommand}\index{Command@{Command}} + + +Stores a 256 character name and a function pointer to be executed when calling \mbox{\hyperlink{classCommand_a44689093b812bfc97b2787c2ba0303ce}{run()}} + + + + +{\ttfamily \#include $<$Command.\+h$>$} + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{classCommand_a18df2d81039392daeb0b78c346a70537}\label{classCommand_a18df2d81039392daeb0b78c346a70537}} +{\bfseries Command} () +\begin{DoxyCompactList}\small\item\em Leaves name empty and exec function pointer to nullptr. \end{DoxyCompactList}\item +\mbox{\hyperlink{classCommand_a4e22ce5bdf74f9c975494dddd280884a}{Command}} (const char $\ast$name\+In\+Menu, void($\ast$exec)()) +\begin{DoxyCompactList}\small\item\em Copies contents of name\+In\+Menu and stores exec. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classCommand_a44689093b812bfc97b2787c2ba0303ce}{run}} () const +\begin{DoxyCompactList}\small\item\em Executes the stored function pointer. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classCommand_a06adf2e6710dd57506449f0997f467c0}\label{classCommand_a06adf2e6710dd57506449f0997f467c0}} +const char $\ast$ {\bfseries get\+\_\+name\+In\+Menu} () const +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores a 256 character name and a function pointer to be executed when calling \mbox{\hyperlink{classCommand_a44689093b812bfc97b2787c2ba0303ce}{run()}} + +\mbox{\hyperlink{classMenu}{Menu}} uses this class for a more generic implementation of it\textquotesingle{}s navigate function. + +\doxysubsection{Constructor \& Destructor Documentation} +\mbox{\Hypertarget{classCommand_a4e22ce5bdf74f9c975494dddd280884a}\label{classCommand_a4e22ce5bdf74f9c975494dddd280884a}} +\index{Command@{Command}!Command@{Command}} +\index{Command@{Command}!Command@{Command}} +\doxysubsubsection{\texorpdfstring{Command()}{Command()}} +{\footnotesize\ttfamily Command\+::\+Command (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name\+In\+Menu, }\item[{void($\ast$)()}]{exec }\end{DoxyParamCaption})} + + + +Copies contents of name\+In\+Menu and stores exec. + + +\begin{DoxyParams}{Parameters} +{\em name\+In\+Menu} & C-\/style string, class stores at most 255 characters (last character is always terminating zero) \\ +\hline +{\em exec} & Function pointer that will be executed when \mbox{\hyperlink{classCommand_a44689093b812bfc97b2787c2ba0303ce}{run()}} is called. Can be nullptr. \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\mbox{\Hypertarget{classCommand_a44689093b812bfc97b2787c2ba0303ce}\label{classCommand_a44689093b812bfc97b2787c2ba0303ce}} +\index{Command@{Command}!run@{run}} +\index{run@{run}!Command@{Command}} +\doxysubsubsection{\texorpdfstring{run()}{run()}} +{\footnotesize\ttfamily void Command\+::run (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const} + + + +Executes the stored function pointer. + +Executes the stored function pointer, when it\textquotesingle{}s not nullptr. Otherwise does nothing. + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +src/\+Generic/\+Console\+Interface/\mbox{\hyperlink{Command_8h}{Command.\+h}}\item +src/\+Generic/\+Console\+Interface/Command.\+cpp\end{DoxyCompactItemize} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classDate.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/classDate.tex new file mode 100644 index 0000000..5a148e3 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classDate.tex @@ -0,0 +1,207 @@ +\hypertarget{classDate}{}\doxysection{Date Class Reference} +\label{classDate}\index{Date@{Date}} + + +Stores a day, month and year. + + + + +{\ttfamily \#include $<$Date.\+h$>$} + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{classDate_a4e59ed4ba66eec61c27460c5d09fa1bd}\label{classDate_a4e59ed4ba66eec61c27460c5d09fa1bd}} +{\bfseries Date} () +\begin{DoxyCompactList}\small\item\em Sets date as 01 May 2022. \end{DoxyCompactList}\item +\mbox{\hyperlink{classDate_a99d57b698afdacd18f5a414cdc7524fd}{Date}} (const char $\ast$str) +\begin{DoxyCompactList}\small\item\em Parses string. \end{DoxyCompactList}\item +\mbox{\hyperlink{classDate_a87b3c3ede7dee726e8779eebfcc0a299}{Date}} (unsigned short day, unsigned short month, unsigned short year) +\begin{DoxyCompactList}\small\item\em Sets day, month and year. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classDate_a2e4dc4249f8cccd40acc5950b42e1339}\label{classDate_a2e4dc4249f8cccd40acc5950b42e1339}} +unsigned short {\bfseries get\+\_\+day} () const +\begin{DoxyCompactList}\small\item\em Returns the day. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{classDate_acaf0c3ee1b2d36edf4f870ddd8acce08}{set\+\_\+day}} (unsigned short day) +\begin{DoxyCompactList}\small\item\em Sets the day. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classDate_a79ebbf3cb46f892604dc79ffc82bcfcc}\label{classDate_a79ebbf3cb46f892604dc79ffc82bcfcc}} +unsigned short {\bfseries get\+\_\+month} () const +\begin{DoxyCompactList}\small\item\em Returns the month. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{classDate_ad0a591a557ddde0871389c3d716e6044}{set\+\_\+month}} (unsigned short month) +\begin{DoxyCompactList}\small\item\em Sets the month. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classDate_a025aae2b290ba357e049d054085f91e3}\label{classDate_a025aae2b290ba357e049d054085f91e3}} +unsigned short {\bfseries get\+\_\+year} () const +\begin{DoxyCompactList}\small\item\em Returns the year. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{classDate_a6a0f3124e1850cd9f1514ebffcdd0cae}{set\+\_\+year}} (unsigned short year) +\begin{DoxyCompactList}\small\item\em Sets the year. \end{DoxyCompactList}\item +\mbox{\hyperlink{classString}{String}} \mbox{\hyperlink{classDate_a6e00ace9f8c923c96188bd76f1e064c2}{create\+String}} () const +\begin{DoxyCompactList}\small\item\em Returns the date as a \mbox{\hyperlink{classString}{String}} object. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classDate_a982c0c9098056aa33c5cbc9eba093852}{read}} (std\+::istream \&istr) +\begin{DoxyCompactList}\small\item\em Reads date from stream. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classDate_a9c728831f35f27abf3348132a13b7844}{write}} (std\+::ostream \&ostr) +\begin{DoxyCompactList}\small\item\em Writes date to stream. \end{DoxyCompactList}\item +int \mbox{\hyperlink{classDate_a3cda588bf2f65b84639303a1aa1105be}{compare}} (const \mbox{\hyperlink{classDate}{Date}} \&other) const +\begin{DoxyCompactList}\small\item\em Compares two dates. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores a day, month and year. + +\doxysubsection{Constructor \& Destructor Documentation} +\mbox{\Hypertarget{classDate_a99d57b698afdacd18f5a414cdc7524fd}\label{classDate_a99d57b698afdacd18f5a414cdc7524fd}} +\index{Date@{Date}!Date@{Date}} +\index{Date@{Date}!Date@{Date}} +\doxysubsubsection{\texorpdfstring{Date()}{Date()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} +{\footnotesize\ttfamily Date\+::\+Date (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str }\end{DoxyParamCaption})} + + + +Parses string. + + +\begin{DoxyParams}{Parameters} +{\em str} & C-\/style string\\ +\hline +\end{DoxyParams} +Values are initialized with zeroes. Then it parses the string\+: + +Skips spaces, saves day with atoi, skips two characters, skips spaces, saves month with atoi, skips two characters, skips spaces, saves year with atoi. + +Values are validated with setters. You should always have spaces between day, month and year and no non-\/numeric characters between them. + +\begin{DoxyRemark}{Remarks} +If there are non-\/numeric characters, as per atoi() spec, the appropriate property is zero. +\end{DoxyRemark} +\mbox{\Hypertarget{classDate_a87b3c3ede7dee726e8779eebfcc0a299}\label{classDate_a87b3c3ede7dee726e8779eebfcc0a299}} +\index{Date@{Date}!Date@{Date}} +\index{Date@{Date}!Date@{Date}} +\doxysubsubsection{\texorpdfstring{Date()}{Date()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} +{\footnotesize\ttfamily Date\+::\+Date (\begin{DoxyParamCaption}\item[{unsigned short}]{day, }\item[{unsigned short}]{month, }\item[{unsigned short}]{year }\end{DoxyParamCaption})} + + + +Sets day, month and year. + +Initializes values with zeroes and then uses setters to save the function arguments. + +\doxysubsection{Member Function Documentation} +\mbox{\Hypertarget{classDate_a3cda588bf2f65b84639303a1aa1105be}\label{classDate_a3cda588bf2f65b84639303a1aa1105be}} +\index{Date@{Date}!compare@{compare}} +\index{compare@{compare}!Date@{Date}} +\doxysubsubsection{\texorpdfstring{compare()}{compare()}} +{\footnotesize\ttfamily int Date\+::compare (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classDate}{Date}} \&}]{other }\end{DoxyParamCaption}) const} + + + +Compares two dates. + +\begin{DoxyReturn}{Returns} +-\/1 if this \texorpdfstring{$<$}{<} other, 1 if this \texorpdfstring{$>$}{>} other, 0 if this == other +\end{DoxyReturn} +\mbox{\Hypertarget{classDate_a6e00ace9f8c923c96188bd76f1e064c2}\label{classDate_a6e00ace9f8c923c96188bd76f1e064c2}} +\index{Date@{Date}!createString@{createString}} +\index{createString@{createString}!Date@{Date}} +\doxysubsubsection{\texorpdfstring{createString()}{createString()}} +{\footnotesize\ttfamily \mbox{\hyperlink{classString}{String}} Date\+::create\+String (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const} + + + +Returns the date as a \mbox{\hyperlink{classString}{String}} object. + +\begin{DoxyReturn}{Returns} +\mbox{\hyperlink{classString}{String}} object in the format \char`\"{}day.\+month.\+year\char`\"{} +\end{DoxyReturn} +\begin{DoxyNote}{Note} +Currently there isn\textquotesingle{}t any way to change the formatting +\end{DoxyNote} +\mbox{\Hypertarget{classDate_a982c0c9098056aa33c5cbc9eba093852}\label{classDate_a982c0c9098056aa33c5cbc9eba093852}} +\index{Date@{Date}!read@{read}} +\index{read@{read}!Date@{Date}} +\doxysubsubsection{\texorpdfstring{read()}{read()}} +{\footnotesize\ttfamily void Date\+::read (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr }\end{DoxyParamCaption})} + + + +Reads date from stream. + + +\begin{DoxyParams}{Parameters} +{\em istr} & An input stream\\ +\hline +\end{DoxyParams} +Directly reads bytes from stream (calls \mbox{\hyperlink{classDate_a982c0c9098056aa33c5cbc9eba093852}{read()}} function). + +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ifstream +\end{DoxyNote} +\mbox{\Hypertarget{classDate_acaf0c3ee1b2d36edf4f870ddd8acce08}\label{classDate_acaf0c3ee1b2d36edf4f870ddd8acce08}} +\index{Date@{Date}!set\_day@{set\_day}} +\index{set\_day@{set\_day}!Date@{Date}} +\doxysubsubsection{\texorpdfstring{set\_day()}{set\_day()}} +{\footnotesize\ttfamily bool Date\+::set\+\_\+day (\begin{DoxyParamCaption}\item[{unsigned short}]{new\+Day }\end{DoxyParamCaption})} + + + +Sets the day. + +\begin{DoxyReturn}{Returns} +Whether new\+Day was saved or not +\end{DoxyReturn} +If new\+Day is equal to 0, or is more than the appropriate days in the month, the day isn\textquotesingle{}t set. \mbox{\Hypertarget{classDate_ad0a591a557ddde0871389c3d716e6044}\label{classDate_ad0a591a557ddde0871389c3d716e6044}} +\index{Date@{Date}!set\_month@{set\_month}} +\index{set\_month@{set\_month}!Date@{Date}} +\doxysubsubsection{\texorpdfstring{set\_month()}{set\_month()}} +{\footnotesize\ttfamily bool Date\+::set\+\_\+month (\begin{DoxyParamCaption}\item[{unsigned short}]{new\+Month }\end{DoxyParamCaption})} + + + +Sets the month. + +\begin{DoxyReturn}{Returns} +Whether new\+Month was saved or not +\end{DoxyReturn} +If new\+Month is equal to 0 or is more than 12, the month isn\textquotesingle{}t set. \mbox{\Hypertarget{classDate_a6a0f3124e1850cd9f1514ebffcdd0cae}\label{classDate_a6a0f3124e1850cd9f1514ebffcdd0cae}} +\index{Date@{Date}!set\_year@{set\_year}} +\index{set\_year@{set\_year}!Date@{Date}} +\doxysubsubsection{\texorpdfstring{set\_year()}{set\_year()}} +{\footnotesize\ttfamily bool Date\+::set\+\_\+year (\begin{DoxyParamCaption}\item[{unsigned short}]{new\+Year }\end{DoxyParamCaption})} + + + +Sets the year. + +\begin{DoxyReturn}{Returns} +Whether year was saved or not +\end{DoxyReturn} +Year isn\textquotesingle{}t set when new\+Year is zero \mbox{\Hypertarget{classDate_a9c728831f35f27abf3348132a13b7844}\label{classDate_a9c728831f35f27abf3348132a13b7844}} +\index{Date@{Date}!write@{write}} +\index{write@{write}!Date@{Date}} +\doxysubsubsection{\texorpdfstring{write()}{write()}} +{\footnotesize\ttfamily void Date\+::write (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr }\end{DoxyParamCaption})} + + + +Writes date to stream. + + +\begin{DoxyParams}{Parameters} +{\em ostr} & An output stream\\ +\hline +\end{DoxyParams} +Directly writes bytes to stream (calls \mbox{\hyperlink{classDate_a9c728831f35f27abf3348132a13b7844}{write()}} function). + +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ofstream +\end{DoxyNote} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +src/\+Generic/\+Date/\mbox{\hyperlink{Date_8h}{Date.\+h}}\item +src/\+Generic/\+Date/Date.\+cpp\end{DoxyCompactItemize} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classEvent.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/classEvent.tex new file mode 100644 index 0000000..2396976 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classEvent.tex @@ -0,0 +1,118 @@ +\hypertarget{classEvent}{}\doxysection{Event Class Reference} +\label{classEvent}\index{Event@{Event}} + + +Stores an event\textquotesingle{}s hall, name, date, bought tickets and reservations. + + + + +{\ttfamily \#include $<$Event.\+h$>$} + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{classEvent_a5a40dd4708297f7031e29b39e039ae10}\label{classEvent_a5a40dd4708297f7031e29b39e039ae10}} +{\bfseries Event} () +\begin{DoxyCompactList}\small\item\em Calls default constructors on data. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classEvent_a6ecbd134ada51629f30b2d1cf352d88f}\label{classEvent_a6ecbd134ada51629f30b2d1cf352d88f}} +{\bfseries Event} (const \mbox{\hyperlink{classHall}{Hall}} \&hall, \mbox{\hyperlink{classString}{String}} name, \mbox{\hyperlink{classDate}{Date}} date) +\begin{DoxyCompactList}\small\item\em Copies given hall and sets name and date. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classEvent_ae3023ae2c487f46b3235f67554e58615}\label{classEvent_ae3023ae2c487f46b3235f67554e58615}} +const \mbox{\hyperlink{classHall}{Hall}} \& {\bfseries get\+\_\+hall} () const +\begin{DoxyCompactList}\small\item\em Returns constant reference \mbox{\hyperlink{classHall}{Hall}} in which event will be held. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classEvent_a7bf717630c32826689df41e0bb3ecbce}\label{classEvent_a7bf717630c32826689df41e0bb3ecbce}} +const \mbox{\hyperlink{classString}{String}} \& {\bfseries get\+\_\+name} () const +\begin{DoxyCompactList}\small\item\em Returns constant reference to name of event. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classEvent_a222904d44dfaf3f1f96e2190c5ea4293}\label{classEvent_a222904d44dfaf3f1f96e2190c5ea4293}} +const \mbox{\hyperlink{classDate}{Date}} \& {\bfseries get\+\_\+date} () const +\begin{DoxyCompactList}\small\item\em Returns constant reference to date on which event will be held. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classEvent_a16a84fced8e02f756232c54c27bb22ad}\label{classEvent_a16a84fced8e02f756232c54c27bb22ad}} +\mbox{\hyperlink{classOrderedList}{Ordered\+List}}$<$ \mbox{\hyperlink{classTicket}{Ticket}} $>$ \& {\bfseries get\+\_\+tickets} () +\begin{DoxyCompactList}\small\item\em Returns reference to bought tickets. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classEvent_a1f914fc91044a5c10d71f31b8e712c46}\label{classEvent_a1f914fc91044a5c10d71f31b8e712c46}} +const \mbox{\hyperlink{classOrderedList}{Ordered\+List}}$<$ \mbox{\hyperlink{classTicket}{Ticket}} $>$ \& {\bfseries get\+\_\+tickets} () const +\begin{DoxyCompactList}\small\item\em Returns constant reference to bought tickets. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classEvent_a43c6b2bddd42435eb6c8cd0f15d75c6f}\label{classEvent_a43c6b2bddd42435eb6c8cd0f15d75c6f}} +\mbox{\hyperlink{classOrderedList}{Ordered\+List}}$<$ \mbox{\hyperlink{classReservation}{Reservation}} $>$ \& {\bfseries get\+\_\+reservations} () +\begin{DoxyCompactList}\small\item\em Returns reference to reservations. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classEvent_a7af1c5d57d41701e6411b7c251bf904e}\label{classEvent_a7af1c5d57d41701e6411b7c251bf904e}} +const \mbox{\hyperlink{classOrderedList}{Ordered\+List}}$<$ \mbox{\hyperlink{classReservation}{Reservation}} $>$ \& {\bfseries get\+\_\+reservations} () const +\begin{DoxyCompactList}\small\item\em Returns constant reference to reservations. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classEvent_ae58d2ed716836adcdacaeec4dd08c1cf}{read}} (std\+::istream \&istr) +\begin{DoxyCompactList}\small\item\em Reads \mbox{\hyperlink{classEvent}{Event}} from stream. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classEvent_a05a302aa998977c30950987c07f0fbba}{write}} (std\+::ostream \&ostr) +\begin{DoxyCompactList}\small\item\em Writes \mbox{\hyperlink{classEvent}{Event}} to stream. \end{DoxyCompactList}\item +int \mbox{\hyperlink{classEvent_af5c84a902db8f29f8b8737026011f1f6}{compare}} (const \mbox{\hyperlink{classEvent}{Event}} \&other) +\begin{DoxyCompactList}\small\item\em Compares two events. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Stores an event\textquotesingle{}s hall, name, date, bought tickets and reservations. + +\doxysubsection{Member Function Documentation} +\mbox{\Hypertarget{classEvent_af5c84a902db8f29f8b8737026011f1f6}\label{classEvent_af5c84a902db8f29f8b8737026011f1f6}} +\index{Event@{Event}!compare@{compare}} +\index{compare@{compare}!Event@{Event}} +\doxysubsubsection{\texorpdfstring{compare()}{compare()}} +{\footnotesize\ttfamily int Event\+::compare (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classEvent}{Event}} \&}]{other }\end{DoxyParamCaption})} + + + +Compares two events. + +\begin{DoxyReturn}{Returns} +compare of halls, or if they are equal, compare of dates +\end{DoxyReturn} +\mbox{\Hypertarget{classEvent_ae58d2ed716836adcdacaeec4dd08c1cf}\label{classEvent_ae58d2ed716836adcdacaeec4dd08c1cf}} +\index{Event@{Event}!read@{read}} +\index{read@{read}!Event@{Event}} +\doxysubsubsection{\texorpdfstring{read()}{read()}} +{\footnotesize\ttfamily void Event\+::read (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr }\end{DoxyParamCaption})} + + + +Reads \mbox{\hyperlink{classEvent}{Event}} from stream. + + +\begin{DoxyParams}{Parameters} +{\em istr} & An input stream\\ +\hline +\end{DoxyParams} +Directly reads bytes from stream (calls \mbox{\hyperlink{classEvent_ae58d2ed716836adcdacaeec4dd08c1cf}{read()}} function). Stored types must have defined a \mbox{\hyperlink{classEvent_ae58d2ed716836adcdacaeec4dd08c1cf}{read()}} function. + +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ifstream +\end{DoxyNote} +\mbox{\Hypertarget{classEvent_a05a302aa998977c30950987c07f0fbba}\label{classEvent_a05a302aa998977c30950987c07f0fbba}} +\index{Event@{Event}!write@{write}} +\index{write@{write}!Event@{Event}} +\doxysubsubsection{\texorpdfstring{write()}{write()}} +{\footnotesize\ttfamily void Event\+::write (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr }\end{DoxyParamCaption})} + + + +Writes \mbox{\hyperlink{classEvent}{Event}} to stream. + + +\begin{DoxyParams}{Parameters} +{\em ostr} & An output stream\\ +\hline +\end{DoxyParams} +Directly writes bytes to stream (calls \mbox{\hyperlink{classEvent_a05a302aa998977c30950987c07f0fbba}{write()}} function). Stored types must have defined a \mbox{\hyperlink{classEvent_ae58d2ed716836adcdacaeec4dd08c1cf}{read()}} function. + +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ofstream +\end{DoxyNote} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +src/\+Models/\mbox{\hyperlink{Event_8h}{Event.\+h}}\item +src/\+Models/Event.\+cpp\end{DoxyCompactItemize} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classEventService.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/classEventService.tex new file mode 100644 index 0000000..d16cb71 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classEventService.tex @@ -0,0 +1,314 @@ +\hypertarget{classEventService}{}\doxysection{Event\+Service Class Reference} +\label{classEventService}\index{EventService@{EventService}} + + +Each \mbox{\hyperlink{classEventService}{Event\+Service}} stores all events and a pointer to \mbox{\hyperlink{classHallService}{Hall\+Service}}. + + + + +{\ttfamily \#include $<$Event\+Service.\+h$>$} + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{classEventService_a9b30bb95890abac259ba27b53cabe545}\label{classEventService_a9b30bb95890abac259ba27b53cabe545}} +{\bfseries Event\+Service} (const \mbox{\hyperlink{classHallService}{Hall\+Service}} $\ast$hs) +\begin{DoxyCompactList}\small\item\em Sets \mbox{\hyperlink{classHallService}{Hall\+Service}} pointer and initializes events \mbox{\hyperlink{classList}{List}}. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classEventService_af35cde4a05edfec88496772b6d0b1e37}\label{classEventService_af35cde4a05edfec88496772b6d0b1e37}} +{\bfseries Event\+Service} (const \mbox{\hyperlink{classHallService}{Hall\+Service}} $\ast$hs, const \mbox{\hyperlink{classEvent}{Event}} $\ast$events, unsigned event\+Count) +\begin{DoxyCompactList}\small\item\em Sets \mbox{\hyperlink{classHallService}{Hall\+Service}} pointer and copies values from events into events \mbox{\hyperlink{classList}{List}}. \end{DoxyCompactList}\item +\mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \mbox{\hyperlink{classEventService_a7a21a5909116215e402254510d6d81d6}{create\+Event}} (int hall\+Number, const \mbox{\hyperlink{classString}{String}} \&name, const \mbox{\hyperlink{classDate}{Date}} \&date) +\begin{DoxyCompactList}\small\item\em Creates an \mbox{\hyperlink{classEvent}{Event}}, with the given hall\+Number, name and date. \end{DoxyCompactList}\item +\mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \mbox{\hyperlink{classEventService_ac7ea565af5ad78e84749558477ceaf26}{cancel\+Event}} (const char $\ast$name, const \mbox{\hyperlink{classDate}{Date}} \&date) +\begin{DoxyCompactList}\small\item\em Cancels an \mbox{\hyperlink{classEvent}{Event}} with the given name and date. \end{DoxyCompactList}\item +\mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \mbox{\hyperlink{classEventService_a3c0d2a05e2a3026044b9e13e6802fbdb}{reserve\+Ticket}} (const char $\ast$name, const \mbox{\hyperlink{classDate}{Date}} \&date, const char $\ast$password, const char $\ast$note, const \mbox{\hyperlink{classTicket}{Ticket}} \&ticket) +\begin{DoxyCompactList}\small\item\em Creates a \mbox{\hyperlink{classReservation}{Reservation}} for an \mbox{\hyperlink{classEvent}{Event}} by name and date. \end{DoxyCompactList}\item +\mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \mbox{\hyperlink{classEventService_aa6fd620de878f225f7c51bb0df6ea749}{cancel\+Ticket\+Reservation}} (const char $\ast$name, const \mbox{\hyperlink{classDate}{Date}} \&date, const \mbox{\hyperlink{classTicket}{Ticket}} \&ticket) +\begin{DoxyCompactList}\small\item\em Cancels a \mbox{\hyperlink{classReservation}{Reservation}} for a ticket. \end{DoxyCompactList}\item +\mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \mbox{\hyperlink{classEventService_ad1efbed6111da8e755d86b5bc9ada806}{ticket\+Is\+Reserved}} (const char $\ast$name, const \mbox{\hyperlink{classDate}{Date}} \&date, const \mbox{\hyperlink{classTicket}{Ticket}} \&ticket) +\begin{DoxyCompactList}\small\item\em Whether a ticket is a reserved or not. \end{DoxyCompactList}\item +\mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \mbox{\hyperlink{classEventService_ac447cac3e4974b9cc676d9bb90152979}{buy\+Ticket}} (const char $\ast$name, const \mbox{\hyperlink{classDate}{Date}} \&date, const \mbox{\hyperlink{classTicket}{Ticket}} \&ticket, const char $\ast$password, \mbox{\hyperlink{classString}{String}} $\ast$reservation\+Note\+Output) +\begin{DoxyCompactList}\small\item\em Buys ticket, assuming it is reserved and stores the reservation note. \end{DoxyCompactList}\item +\mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \mbox{\hyperlink{classEventService_ad0a204aca9cc8287f562f42916248e9e}{buy\+Ticket}} (const char $\ast$name, const \mbox{\hyperlink{classDate}{Date}} \&date, const \mbox{\hyperlink{classTicket}{Ticket}} \&ticket) +\begin{DoxyCompactList}\small\item\em Buys ticket, assuming it isn\textquotesingle{}t reserved. \end{DoxyCompactList}\item +\mbox{\hyperlink{classString}{String}} \mbox{\hyperlink{classEventService_a7f4632e3beae5d24087047ab0223f85e}{create\+Seating\+String}} (const char $\ast$name, const \mbox{\hyperlink{classDate}{Date}} \&date, unsigned $\ast$seats\+Per\+Row) +\begin{DoxyCompactList}\small\item\em Creates a special \mbox{\hyperlink{classString}{String}} for status of all seats in given \mbox{\hyperlink{classEvent}{Event}} (by name and date) and returns seats\+Per\+Row in given pointer. \end{DoxyCompactList}\item +\mbox{\hyperlink{classList}{List}}$<$ \mbox{\hyperlink{classEvent}{Event}} $>$ \mbox{\hyperlink{classEventService_a6700bd4f9da6d12a47812b9c8549556e}{query\+Most\+Watched}} (unsigned topN) +\item +\mbox{\hyperlink{classList}{List}}$<$ \mbox{\hyperlink{classEvent}{Event}} $>$ \mbox{\hyperlink{classEventService_a814de3510f72150f2e54d44f8c8948bb}{query\+Insufficiently\+Visited}} () +\item +\mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \mbox{\hyperlink{classEventService_a277194aea79a2c9bf955b7706a20c54c}{report\+Reservations}} (const char $\ast$name, const \mbox{\hyperlink{classDate}{Date}} \&date) +\begin{DoxyCompactList}\small\item\em Creates a report that lists all Events (with given name and date) and their reserved tickets. \end{DoxyCompactList}\item +\mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \mbox{\hyperlink{classEventService_afc74fc6d44fca054bce8e54997c0cd3e}{report\+Bought\+Tickets}} (int hall\+Number, const \mbox{\hyperlink{classDate}{Date}} \&start, const \mbox{\hyperlink{classDate}{Date}} \&end, bool all=false) +\begin{DoxyCompactList}\small\item\em Creates a report that Lists all Events (with given name and date) and number of bought tickets. \end{DoxyCompactList}\item +\mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \mbox{\hyperlink{classEventService_a1225c23dae83fa928da47113cd1c5617}{load}} () +\begin{DoxyCompactList}\small\item\em Loads Events from a database file. \end{DoxyCompactList}\item +\mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \mbox{\hyperlink{classEventService_a5aac3df17ef30f84c1c28277c256ec32}{save}} () +\begin{DoxyCompactList}\small\item\em Saves Events to a database file. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Each \mbox{\hyperlink{classEventService}{Event\+Service}} stores all events and a pointer to \mbox{\hyperlink{classHallService}{Hall\+Service}}. + +\doxysubsection{Member Function Documentation} +\mbox{\Hypertarget{classEventService_ad0a204aca9cc8287f562f42916248e9e}\label{classEventService_ad0a204aca9cc8287f562f42916248e9e}} +\index{EventService@{EventService}!buyTicket@{buyTicket}} +\index{buyTicket@{buyTicket}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{buyTicket()}{buyTicket()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} +{\footnotesize\ttfamily \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} Event\+Service\+::buy\+Ticket (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name, }\item[{const \mbox{\hyperlink{classDate}{Date}} \&}]{date, }\item[{const \mbox{\hyperlink{classTicket}{Ticket}} \&}]{ticket }\end{DoxyParamCaption})} + + + +Buys ticket, assuming it isn\textquotesingle{}t reserved. + +Calls buy\+Ticket with \mbox{\hyperlink{classReservation}{Reservation}}, but sets password and note\+Output to nullptr. \begin{DoxyReturn}{Returns} +E\+\_\+\+Event\+Does\+Not\+Exist {\bfseries{if}} No \mbox{\hyperlink{classEvent}{Event}} with the given name and date exists + +E\+\_\+\+Ticket\+Already\+Bought {\bfseries{if}} A ticket for the given row and seat has already been bought + +E\+\_\+\+Ticket\+Already\+Reserved {\bfseries{if}} The seat and row are reserved, but given password is nullptr + +E\+\_\+\+Wrong\+Reservation\+Password {\bfseries{if}} The seat and row are reserved, but given password is incorrect + +Success {\bfseries{otherwise}} +\end{DoxyReturn} +\mbox{\Hypertarget{classEventService_ac447cac3e4974b9cc676d9bb90152979}\label{classEventService_ac447cac3e4974b9cc676d9bb90152979}} +\index{EventService@{EventService}!buyTicket@{buyTicket}} +\index{buyTicket@{buyTicket}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{buyTicket()}{buyTicket()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} +{\footnotesize\ttfamily \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} Event\+Service\+::buy\+Ticket (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name, }\item[{const \mbox{\hyperlink{classDate}{Date}} \&}]{date, }\item[{const \mbox{\hyperlink{classTicket}{Ticket}} \&}]{ticket, }\item[{const char $\ast$}]{password, }\item[{\mbox{\hyperlink{classString}{String}} $\ast$}]{reservation\+Note\+Output }\end{DoxyParamCaption})} + + + +Buys ticket, assuming it is reserved and stores the reservation note. + +\begin{DoxyReturn}{Returns} +E\+\_\+\+Event\+Does\+Not\+Exist {\bfseries{if}} No \mbox{\hyperlink{classEvent}{Event}} with the given name and date exists + +E\+\_\+\+Ticket\+Already\+Bought {\bfseries{if}} A ticket for the given row and seat has already been bought + +E\+\_\+\+Ticket\+Already\+Reserved {\bfseries{if}} The seat and row are reserved, but given password is nullptr + +E\+\_\+\+Wrong\+Reservation\+Password {\bfseries{if}} The seat and row are reserved, but given password is incorrect + +Success {\bfseries{otherwise}} +\end{DoxyReturn} +\mbox{\Hypertarget{classEventService_ac7ea565af5ad78e84749558477ceaf26}\label{classEventService_ac7ea565af5ad78e84749558477ceaf26}} +\index{EventService@{EventService}!cancelEvent@{cancelEvent}} +\index{cancelEvent@{cancelEvent}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{cancelEvent()}{cancelEvent()}} +{\footnotesize\ttfamily \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} Event\+Service\+::cancel\+Event (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name, }\item[{const \mbox{\hyperlink{classDate}{Date}} \&}]{date }\end{DoxyParamCaption})} + + + +Cancels an \mbox{\hyperlink{classEvent}{Event}} with the given name and date. + +\begin{DoxyReturn}{Returns} +E\+\_\+\+Event\+Does\+Not\+Exist {\bfseries{if}} No \mbox{\hyperlink{classEvent}{Event}} with the given name and date exists + +Success {\bfseries{otherwise}} +\end{DoxyReturn} +\mbox{\Hypertarget{classEventService_aa6fd620de878f225f7c51bb0df6ea749}\label{classEventService_aa6fd620de878f225f7c51bb0df6ea749}} +\index{EventService@{EventService}!cancelTicketReservation@{cancelTicketReservation}} +\index{cancelTicketReservation@{cancelTicketReservation}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{cancelTicketReservation()}{cancelTicketReservation()}} +{\footnotesize\ttfamily \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} Event\+Service\+::cancel\+Ticket\+Reservation (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name, }\item[{const \mbox{\hyperlink{classDate}{Date}} \&}]{date, }\item[{const \mbox{\hyperlink{classTicket}{Ticket}} \&}]{ticket }\end{DoxyParamCaption})} + + + +Cancels a \mbox{\hyperlink{classReservation}{Reservation}} for a ticket. + +Canceling a reservation doesn\textquotesingle{}t require password and doesn\textquotesingle{}t return the \mbox{\hyperlink{classReservation}{Reservation}}\textquotesingle{}s note + +\begin{DoxyReturn}{Returns} +E\+\_\+\+Event\+Does\+Not\+Exist {\bfseries{if}} No \mbox{\hyperlink{classEvent}{Event}} with the given name and date exists + +W\+\_\+\+Ticket\+Had\+Not\+Been\+Reserved {\bfseries{\mbox{\hyperlink{classTicket}{Ticket}}}} hadn\textquotesingle{}t been reserved in the first place + +Success {\bfseries{otherwise}} +\end{DoxyReturn} +\mbox{\Hypertarget{classEventService_a7a21a5909116215e402254510d6d81d6}\label{classEventService_a7a21a5909116215e402254510d6d81d6}} +\index{EventService@{EventService}!createEvent@{createEvent}} +\index{createEvent@{createEvent}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{createEvent()}{createEvent()}} +{\footnotesize\ttfamily \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} Event\+Service\+::create\+Event (\begin{DoxyParamCaption}\item[{int}]{hall\+Number, }\item[{const \mbox{\hyperlink{classString}{String}} \&}]{name, }\item[{const \mbox{\hyperlink{classDate}{Date}} \&}]{date }\end{DoxyParamCaption})} + + + +Creates an \mbox{\hyperlink{classEvent}{Event}}, with the given hall\+Number, name and date. + +Uses \mbox{\hyperlink{classHallService}{Hall\+Service}} pointer to get \mbox{\hyperlink{classHall}{Hall}} from hall\+Number \begin{DoxyReturn}{Returns} +E\+\_\+\+Hall\+Doesnt\+Exist {\bfseries{if}} hall\+Number doesn\textquotesingle{}t correspond to any \mbox{\hyperlink{classHall}{Hall}}, saved in \mbox{\hyperlink{classHallService}{Hall\+Service}} + +E\+\_\+\+Event\+Will\+Overlap {\bfseries{if}} \mbox{\hyperlink{classEvent}{Event}}\textquotesingle{}s date overlaps with another event in the same \mbox{\hyperlink{classHall}{Hall}} + +Success {\bfseries{otherwise}} +\end{DoxyReturn} +\mbox{\Hypertarget{classEventService_a7f4632e3beae5d24087047ab0223f85e}\label{classEventService_a7f4632e3beae5d24087047ab0223f85e}} +\index{EventService@{EventService}!createSeatingString@{createSeatingString}} +\index{createSeatingString@{createSeatingString}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{createSeatingString()}{createSeatingString()}} +{\footnotesize\ttfamily \mbox{\hyperlink{classString}{String}} Event\+Service\+::create\+Seating\+String (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name, }\item[{const \mbox{\hyperlink{classDate}{Date}} \&}]{date, }\item[{unsigned $\ast$}]{seats\+Per\+Row }\end{DoxyParamCaption})} + + + +Creates a special \mbox{\hyperlink{classString}{String}} for status of all seats in given \mbox{\hyperlink{classEvent}{Event}} (by name and date) and returns seats\+Per\+Row in given pointer. + +Each seat in the \mbox{\hyperlink{classHall}{Hall}} of the \mbox{\hyperlink{classEvent}{Event}} is represented by a single character, where \textquotesingle{}R\textquotesingle{} means the seat is reserved, \textquotesingle{}B\textquotesingle{} means the seat is bought and \textquotesingle{} \textquotesingle{} if it\textquotesingle{}s neither. + +\begin{DoxyReturn}{Returns} +Empty \mbox{\hyperlink{classString}{String}} {\bfseries{if}} No \mbox{\hyperlink{classEvent}{Event}} with the given name and date exists + +Proper \mbox{\hyperlink{classString}{String}} {\bfseries{otherwise}} +\end{DoxyReturn} +\mbox{\Hypertarget{classEventService_a1225c23dae83fa928da47113cd1c5617}\label{classEventService_a1225c23dae83fa928da47113cd1c5617}} +\index{EventService@{EventService}!load@{load}} +\index{load@{load}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{load()}{load()}} +{\footnotesize\ttfamily \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} Event\+Service\+::load (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +Loads Events from a database file. + +Looks for file named \char`\"{}events\+Databse.\+fmits\char`\"{}, which is just a binary file, and then reads it with the \char`\"{}read\char`\"{} function in events \mbox{\hyperlink{classList}{List}}. + +\begin{DoxyReturn}{Returns} +E\+\_\+\+File\+Could\+Not\+Be\+Opened {\bfseries{if}} The files couldn\textquotesingle{}t be opened/\+Doesn\textquotesingle{}t exist + +Success {\bfseries{otherwise}} +\end{DoxyReturn} +\mbox{\Hypertarget{classEventService_a814de3510f72150f2e54d44f8c8948bb}\label{classEventService_a814de3510f72150f2e54d44f8c8948bb}} +\index{EventService@{EventService}!queryInsufficientlyVisited@{queryInsufficientlyVisited}} +\index{queryInsufficientlyVisited@{queryInsufficientlyVisited}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{queryInsufficientlyVisited()}{queryInsufficientlyVisited()}} +{\footnotesize\ttfamily \mbox{\hyperlink{classList}{List}}$<$ \mbox{\hyperlink{classEvent}{Event}} $>$ Event\+Service\+::query\+Insufficiently\+Visited (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + +\begin{DoxyReturn}{Returns} +A \mbox{\hyperlink{classList}{List}} of events which have attracted sales of less than 10\% of the \mbox{\hyperlink{classHall}{Hall}}\textquotesingle{}s seat +\end{DoxyReturn} +\mbox{\Hypertarget{classEventService_a6700bd4f9da6d12a47812b9c8549556e}\label{classEventService_a6700bd4f9da6d12a47812b9c8549556e}} +\index{EventService@{EventService}!queryMostWatched@{queryMostWatched}} +\index{queryMostWatched@{queryMostWatched}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{queryMostWatched()}{queryMostWatched()}} +{\footnotesize\ttfamily \mbox{\hyperlink{classList}{List}}$<$ \mbox{\hyperlink{classEvent}{Event}} $>$ Event\+Service\+::query\+Most\+Watched (\begin{DoxyParamCaption}\item[{unsigned}]{topN }\end{DoxyParamCaption})} + +\begin{DoxyReturn}{Returns} +A \mbox{\hyperlink{classList}{List}} of topN most watched Events +\end{DoxyReturn} +Events are sorted from index 0 to last index decreasingly by number of watchers. Watchers count for an \mbox{\hyperlink{classEvent}{Event}} is the amount of bought tickets. + +If there are less events than topN, all events are returned. \mbox{\Hypertarget{classEventService_afc74fc6d44fca054bce8e54997c0cd3e}\label{classEventService_afc74fc6d44fca054bce8e54997c0cd3e}} +\index{EventService@{EventService}!reportBoughtTickets@{reportBoughtTickets}} +\index{reportBoughtTickets@{reportBoughtTickets}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{reportBoughtTickets()}{reportBoughtTickets()}} +{\footnotesize\ttfamily \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} Event\+Service\+::report\+Bought\+Tickets (\begin{DoxyParamCaption}\item[{int}]{hall\+Number, }\item[{const \mbox{\hyperlink{classDate}{Date}} \&}]{start, }\item[{const \mbox{\hyperlink{classDate}{Date}} \&}]{end, }\item[{bool}]{all = {\ttfamily false} }\end{DoxyParamCaption})} + + + +Creates a report that Lists all Events (with given name and date) and number of bought tickets. + + +\begin{DoxyParams}{Parameters} +{\em hall\+Number} & Number of the \mbox{\hyperlink{classEvent}{Event}}\textquotesingle{}s \mbox{\hyperlink{classHall}{Hall}} \\ +\hline +{\em start} & Starting \mbox{\hyperlink{classDate}{Date}} from which to take Events \\ +\hline +{\em end} & Ending \mbox{\hyperlink{classDate}{Date}} until which to take Evnets (including)\\ +\hline +\end{DoxyParams} +Report is saved in a file named \char`\"{}bought\+Tickets.\+txt\char`\"{} in the current directory. + +All Events are inserted into the file with the \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator and a setting of 0b01001. + +\begin{DoxyReturn}{Returns} +E\+\_\+\+File\+Could\+Not\+Be\+Opened {\bfseries{if}} Report file couldn\textquotesingle{}t be created + +Success {\bfseries{otherwise}} +\end{DoxyReturn} +\mbox{\Hypertarget{classEventService_a277194aea79a2c9bf955b7706a20c54c}\label{classEventService_a277194aea79a2c9bf955b7706a20c54c}} +\index{EventService@{EventService}!reportReservations@{reportReservations}} +\index{reportReservations@{reportReservations}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{reportReservations()}{reportReservations()}} +{\footnotesize\ttfamily \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} Event\+Service\+::report\+Reservations (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name, }\item[{const \mbox{\hyperlink{classDate}{Date}} \&}]{date }\end{DoxyParamCaption})} + + + +Creates a report that lists all Events (with given name and date) and their reserved tickets. + + +\begin{DoxyParams}{Parameters} +{\em name} & C-\/style string, if it is equal to \char`\"{}\+ALL\char`\"{}, reservations from all Events on the given date will be reported \\ +\hline +{\em date} & If day, month and year are equal to 0, reservations from all dates will be reported\\ +\hline +\end{DoxyParams} +Report is saved in a file in the current directory, named \char`\"{}report-\/\+NAME-\/\+DATE.\+txt\char`\"{}, where NAME is the given name, and DATE is the given date or \char`\"{}\+ALL\char`\"{} if the date is 0/0/0 + +All Events are inserted into the file with the \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator and a setting of 0b00101. + +\begin{DoxyReturn}{Returns} +E\+\_\+\+File\+Could\+Not\+Be\+Opened {\bfseries{if}} Report file couldn\textquotesingle{}t be created + +Success {\bfseries{otherwise}} +\end{DoxyReturn} +\mbox{\Hypertarget{classEventService_a3c0d2a05e2a3026044b9e13e6802fbdb}\label{classEventService_a3c0d2a05e2a3026044b9e13e6802fbdb}} +\index{EventService@{EventService}!reserveTicket@{reserveTicket}} +\index{reserveTicket@{reserveTicket}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{reserveTicket()}{reserveTicket()}} +{\footnotesize\ttfamily \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} Event\+Service\+::reserve\+Ticket (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name, }\item[{const \mbox{\hyperlink{classDate}{Date}} \&}]{date, }\item[{const char $\ast$}]{password, }\item[{const char $\ast$}]{note, }\item[{const \mbox{\hyperlink{classTicket}{Ticket}} \&}]{ticket }\end{DoxyParamCaption})} + + + +Creates a \mbox{\hyperlink{classReservation}{Reservation}} for an \mbox{\hyperlink{classEvent}{Event}} by name and date. + +\begin{DoxyReturn}{Returns} +E\+\_\+\+Event\+Does\+Not\+Exist {\bfseries{if}} No \mbox{\hyperlink{classEvent}{Event}} with the given name and date exists + +E\+\_\+\+Ticket\+Already\+Bought {\bfseries{if}} A ticket for the given row and seat has already been bought + +E\+\_\+\+Ticket\+Already\+Reserved {\bfseries{if}} A reservation has already been placed on the given row and seat + +Success {\bfseries{otherwise}} +\end{DoxyReturn} +\mbox{\Hypertarget{classEventService_a5aac3df17ef30f84c1c28277c256ec32}\label{classEventService_a5aac3df17ef30f84c1c28277c256ec32}} +\index{EventService@{EventService}!save@{save}} +\index{save@{save}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{save()}{save()}} +{\footnotesize\ttfamily \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} Event\+Service\+::save (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +Saves Events to a database file. + +Looks for file named \char`\"{}events\+Databse.\+fmits\char`\"{}, which is just a binary file, and then writes to it with the \char`\"{}write\char`\"{} function in events \mbox{\hyperlink{classList}{List}}. + +\begin{DoxyReturn}{Returns} +E\+\_\+\+File\+Could\+Not\+Be\+Opened {\bfseries{if}} The files couldn\textquotesingle{}t be opened + +Success {\bfseries{otherwise}} +\end{DoxyReturn} +\mbox{\Hypertarget{classEventService_ad1efbed6111da8e755d86b5bc9ada806}\label{classEventService_ad1efbed6111da8e755d86b5bc9ada806}} +\index{EventService@{EventService}!ticketIsReserved@{ticketIsReserved}} +\index{ticketIsReserved@{ticketIsReserved}!EventService@{EventService}} +\doxysubsubsection{\texorpdfstring{ticketIsReserved()}{ticketIsReserved()}} +{\footnotesize\ttfamily \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} Event\+Service\+::ticket\+Is\+Reserved (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name, }\item[{const \mbox{\hyperlink{classDate}{Date}} \&}]{date, }\item[{const \mbox{\hyperlink{classTicket}{Ticket}} \&}]{ticket }\end{DoxyParamCaption})} + + + +Whether a ticket is a reserved or not. + +\begin{DoxyReturn}{Returns} +E\+\_\+\+Event\+Does\+Not\+Exist {\bfseries{if}} No \mbox{\hyperlink{classEvent}{Event}} with the given name and date exists + +W\+\_\+\+Ticket\+Had\+Not\+Been\+Reserved {\bfseries{\mbox{\hyperlink{classTicket}{Ticket}}}} hadn\textquotesingle{}t been reserved in the first place + +Success {\bfseries{otherwise}} +\end{DoxyReturn} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +src/\+Services/\mbox{\hyperlink{EventService_8h}{Event\+Service.\+h}}\item +src/\+Services/Event\+Service.\+cpp\end{DoxyCompactItemize} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classHall.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/classHall.tex new file mode 100644 index 0000000..526db1e --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classHall.tex @@ -0,0 +1,109 @@ +\hypertarget{classHall}{}\doxysection{Hall Class Reference} +\label{classHall}\index{Hall@{Hall}} + + +Each hall contains a number, rows and seats per row. + + + + +{\ttfamily \#include $<$Hall.\+h$>$} + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{classHall_a122ed8085be305339c89cadb3e360b86}\label{classHall_a122ed8085be305339c89cadb3e360b86}} +{\bfseries Hall} () +\begin{DoxyCompactList}\small\item\em Sets values to 0. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classHall_af88f012be2e7671366e10d4e154a8d8f}\label{classHall_af88f012be2e7671366e10d4e154a8d8f}} +{\bfseries Hall} (int number) +\begin{DoxyCompactList}\small\item\em Sets values, except number, to 0. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classHall_ab93a2ca8463f3b3d398374a6efea4c71}\label{classHall_ab93a2ca8463f3b3d398374a6efea4c71}} +{\bfseries Hall} (int number, unsigned rows, unsigned seats\+Per\+Row) +\begin{DoxyCompactList}\small\item\em Sets values. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classHall_a84186aee50631f25b214f18f7b0dc178}\label{classHall_a84186aee50631f25b214f18f7b0dc178}} +int {\bfseries get\+\_\+number} () const +\begin{DoxyCompactList}\small\item\em Returns a \mbox{\hyperlink{classHall}{Hall}}\textquotesingle{}s number. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classHall_a6b3c304a95d3f56980c6faf0cc2073a2}\label{classHall_a6b3c304a95d3f56980c6faf0cc2073a2}} +unsigned {\bfseries get\+\_\+rows} () const +\begin{DoxyCompactList}\small\item\em Returns a \mbox{\hyperlink{classHall}{Hall}}\textquotesingle{}s row count. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classHall_a42e1cd716086d8a42a627e00cde17a7e}\label{classHall_a42e1cd716086d8a42a627e00cde17a7e}} +unsigned {\bfseries get\+\_\+seats\+Per\+Row} () const +\begin{DoxyCompactList}\small\item\em Return a \mbox{\hyperlink{classHall}{Hall}}\textquotesingle{}s seats per row count. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classHall_acef974f302d8131ef4608e15f96c2df9}{read}} (std\+::istream \&istr) +\begin{DoxyCompactList}\small\item\em Reads \mbox{\hyperlink{classHall}{Hall}} from stream. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classHall_a0239d59ab0f832f16cf35c820d0eba5a}{write}} (std\+::ostream \&ostr) const +\begin{DoxyCompactList}\small\item\em Writes \mbox{\hyperlink{classHall}{Hall}} to steam. \end{DoxyCompactList}\item +int \mbox{\hyperlink{classHall_a4259837f943c488c6b15ed6c80d5f30b}{compare}} (const \mbox{\hyperlink{classHall}{Hall}} \&other) const +\begin{DoxyCompactList}\small\item\em Compare two Halls. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Each hall contains a number, rows and seats per row. + +\doxysubsection{Member Function Documentation} +\mbox{\Hypertarget{classHall_a4259837f943c488c6b15ed6c80d5f30b}\label{classHall_a4259837f943c488c6b15ed6c80d5f30b}} +\index{Hall@{Hall}!compare@{compare}} +\index{compare@{compare}!Hall@{Hall}} +\doxysubsubsection{\texorpdfstring{compare()}{compare()}} +{\footnotesize\ttfamily int Hall\+::compare (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classHall}{Hall}} \&}]{other }\end{DoxyParamCaption}) const} + + + +Compare two Halls. + +\begin{DoxyReturn}{Returns} +-\/1 if number \texorpdfstring{$<$}{<} other.\+number, 1 if number \texorpdfstring{$>$}{>} other.\+number, 0 if number == other.\+number +\end{DoxyReturn} +\mbox{\Hypertarget{classHall_acef974f302d8131ef4608e15f96c2df9}\label{classHall_acef974f302d8131ef4608e15f96c2df9}} +\index{Hall@{Hall}!read@{read}} +\index{read@{read}!Hall@{Hall}} +\doxysubsubsection{\texorpdfstring{read()}{read()}} +{\footnotesize\ttfamily void Hall\+::read (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr }\end{DoxyParamCaption})} + + + +Reads \mbox{\hyperlink{classHall}{Hall}} from stream. + + +\begin{DoxyParams}{Parameters} +{\em istr} & An input stream\\ +\hline +\end{DoxyParams} +Directly reads bytes from stream (calls \mbox{\hyperlink{classHall_acef974f302d8131ef4608e15f96c2df9}{read()}} function). + +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ifstream +\end{DoxyNote} +\mbox{\Hypertarget{classHall_a0239d59ab0f832f16cf35c820d0eba5a}\label{classHall_a0239d59ab0f832f16cf35c820d0eba5a}} +\index{Hall@{Hall}!write@{write}} +\index{write@{write}!Hall@{Hall}} +\doxysubsubsection{\texorpdfstring{write()}{write()}} +{\footnotesize\ttfamily void Hall\+::write (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr }\end{DoxyParamCaption}) const} + + + +Writes \mbox{\hyperlink{classHall}{Hall}} to steam. + + +\begin{DoxyParams}{Parameters} +{\em ostr} & An output stream\\ +\hline +\end{DoxyParams} +Directly writes bytes to stream (calls \mbox{\hyperlink{classHall_a0239d59ab0f832f16cf35c820d0eba5a}{write()}} function). + +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ofstream +\end{DoxyNote} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +src/\+Models/\mbox{\hyperlink{Hall_8h}{Hall.\+h}}\item +src/\+Models/Hall.\+cpp\end{DoxyCompactItemize} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classHallService.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/classHallService.tex new file mode 100644 index 0000000..6ea0784 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classHallService.tex @@ -0,0 +1,70 @@ +\hypertarget{classHallService}{}\doxysection{Hall\+Service Class Reference} +\label{classHallService}\index{HallService@{HallService}} + + +Each \mbox{\hyperlink{classHallService}{Hall\+Service}} stores all halls. + + + + +{\ttfamily \#include $<$Hall\+Service.\+h$>$} + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{classHallService_a57a8117d8d510afb5351a3f7efc18dff}\label{classHallService_a57a8117d8d510afb5351a3f7efc18dff}} +{\bfseries Hall\+Service} (const \mbox{\hyperlink{classHall}{Hall}} $\ast$halls, unsigned hall\+Count) +\begin{DoxyCompactList}\small\item\em Copies halls from parameters. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classHallService_a641fdcc475e094687713e94094e2a623}\label{classHallService_a641fdcc475e094687713e94094e2a623}} +const \mbox{\hyperlink{classOrderedList}{Ordered\+List}}$<$ \mbox{\hyperlink{classHall}{Hall}} $>$ \& {\bfseries get\+\_\+halls} () const +\begin{DoxyCompactList}\small\item\em Returns a constant reference to halls. \end{DoxyCompactList}\item +\mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \mbox{\hyperlink{classHallService_ab63c1ccff811ed3268f2fe5e996eb6ae}{load}} () +\begin{DoxyCompactList}\small\item\em Loads Halls to a database file. \end{DoxyCompactList}\item +\mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} \mbox{\hyperlink{classHallService_a083e3d10ec89ee8c78a117c3754c66d2}{save}} () +\begin{DoxyCompactList}\small\item\em Saves Halls to a database file. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Each \mbox{\hyperlink{classHallService}{Hall\+Service}} stores all halls. + +\doxysubsection{Member Function Documentation} +\mbox{\Hypertarget{classHallService_ab63c1ccff811ed3268f2fe5e996eb6ae}\label{classHallService_ab63c1ccff811ed3268f2fe5e996eb6ae}} +\index{HallService@{HallService}!load@{load}} +\index{load@{load}!HallService@{HallService}} +\doxysubsubsection{\texorpdfstring{load()}{load()}} +{\footnotesize\ttfamily \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} Hall\+Service\+::load (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +Loads Halls to a database file. + +Looks for file named \char`\"{}halls\+Databse.\+fmits\char`\"{}, which is just a binary file, and then reads it with the \char`\"{}read\char`\"{} function in events \mbox{\hyperlink{classList}{List}}. + +\begin{DoxyReturn}{Returns} +E\+\_\+\+File\+Could\+Not\+Be\+Opened {\bfseries{if}} The files couldn\textquotesingle{}t be opened/\+Doesn\textquotesingle{}t exist + +Success {\bfseries{otherwise}} +\end{DoxyReturn} +\mbox{\Hypertarget{classHallService_a083e3d10ec89ee8c78a117c3754c66d2}\label{classHallService_a083e3d10ec89ee8c78a117c3754c66d2}} +\index{HallService@{HallService}!save@{save}} +\index{save@{save}!HallService@{HallService}} +\doxysubsubsection{\texorpdfstring{save()}{save()}} +{\footnotesize\ttfamily \mbox{\hyperlink{StatusCode_8h_ae98a46f4ea1a43ca48acaf15d2eb7113}{Status\+Code}} Hall\+Service\+::save (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + + + +Saves Halls to a database file. + +Looks for file named \char`\"{}halls\+Databse.\+fmits\char`\"{}, which is just a binary file, and then writes to it with the \char`\"{}write\char`\"{} function in events \mbox{\hyperlink{classList}{List}}. + +\begin{DoxyReturn}{Returns} +E\+\_\+\+File\+Could\+Not\+Be\+Opened {\bfseries{if}} The files couldn\textquotesingle{}t be opened + +Success {\bfseries{otherwise}} +\end{DoxyReturn} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +src/\+Services/\mbox{\hyperlink{HallService_8h}{Hall\+Service.\+h}}\item +src/\+Services/Hall\+Service.\+cpp\end{DoxyCompactItemize} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classList.eps b/Year 1/Object-oriented Programming/Project 1/docs/latex/classList.eps new file mode 100644 index 0000000..f3ba9f8 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classList.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 338.983063 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 1.475000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(List< T >) cw +(OrderedList< T >) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (List< T >) 0.000000 1.000000 box + (OrderedList< T >) 0.000000 0.000000 box + +% ----- relations ----- + +solid +1 0.000000 0.250000 out +solid +0 0.000000 0.750000 in diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classList.pdf b/Year 1/Object-oriented Programming/Project 1/docs/latex/classList.pdf new file mode 100644 index 0000000..072935e --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classList.pdf @@ -0,0 +1,116 @@ +%PDF-1.5 +%Çì�¢ +%%Invocation: gs -q -dSAFER -dNOPAUSE -dBATCH -dCompatibilityLevel=1.5 -sDEVICE=pdfwrite -sOutputFile=? -dPDFSETTINGS#/prepress -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -dAutoRotatePages#/None - +5 0 obj +<</Length 6 0 R/Filter /FlateDecode>> +stream +xœ•‘¿NÄ0Æw?…G`0¶“Ô�„�*ä
î/ˆ=�îõIÓ–ö8PÇ–íï÷%2 rƸj�qH©âV-Þ%¸~6¬i0Á´…aBP4RÌ%õFS�¯Ÿ7˜ðö2½Á}‚‚’‰wxÌÐá4ýªÂ5åñ󜾩“J©®rzzŸÛöàŒ™œö 6lzÁæ^´"BDWQ,FžëÍa³>÷ó‹žØy¢ž4Òå�¯·,ã-‹Å‘µÈg¢ãùz
ý¾PåGÓÙ|^–ú‹Ä†RÇü/’›Ô+StËÊé–=l¯þRé€Ê
|IluUendstream +endobj +6 0 obj +256 +endobj +4 0 obj +<</Type/Page/MediaBox [0 0 500 338.98] +/Parent 3 0 R +/Resources<</ProcSet[/PDF /Text] +/Font 9 0 R +>> +/Contents 5 0 R +>> +endobj +3 0 obj +<< /Type /Pages /Kids [ +4 0 R +] /Count 1 +>> +endobj +1 0 obj +<</Type /Catalog /Pages 3 0 R +/Metadata 11 0 R +>> +endobj +9 0 obj +<</R7 +7 0 R>> +endobj +7 0 obj +<</BaseFont/RTBSIO+Times-Roman/FontDescriptor 8 0 R/Type/Font +/FirstChar 32/LastChar 116/Widths[ +250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 564 0 564 0 +0 0 0 0 0 0 0 0 0 0 0 0 611 0 0 722 +0 0 0 0 611 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 500 444 0 0 0 278 0 0 0 0 0 0 +0 0 333 389 278] +/Encoding/WinAnsiEncoding/Subtype/Type1>> +endobj +8 0 obj +<</Type/FontDescriptor/FontName/RTBSIO+Times-Roman/FontBBox[0 -14 688 683]/Flags 131104 +/Ascent 683 +/CapHeight 676 +/Descent -14 +/ItalicAngle 0 +/StemV 103 +/MissingWidth 250 +/XHeight 460 +/CharSet(/L/O/T/d/e/greater/i/less/r/s/space/t)/FontFile3 10 0 R>> +endobj +10 0 obj +<</Filter/FlateDecode +/Subtype/Type1C/Length 1186>>stream +xœ�“PÓuÇ?_¾Û÷û¹œË¤é‘¸í¬³ÉÙAà�‡W˜iri€€‰è„©Ûp?Ôñ{ÀãÃÉ�ÆX2uâE'þˆ(Y¨]é¥yTzÕÕ•grýñ|¸uÍ®»ú»ÿžçyß=Ïs¯÷ópHƒ8Ž“eëôZsb¦Q_dx˜¯¢Ë8C—ó¤jnãÜ)UÊ‘ñD&é‹—ü¸|�Aý£`]„$—²5×ûÌŽÌÜU «Ó�e6“®¤Ô¢~^³6I]lSÿ£¨7jͺƒze48¢=d,Ók
–×túb«Yý÷Xu¦¶Äz¨ÈôßÚ¿Ýþ_„�Ìd¶dìÓnÓe«×§!”…²Ñ”ˆ^F›�½Š’‡–#ZÅ€$¨ýÊ¥rõ1\LaÌ·|_Ë×óýü8xäp—øiªŸ»=÷-�†^a³»¢ÇÁ`C£—ßìpÚ»”½•^g7ÁÁ^ßàÉ#~]‘Ñš¾Sõ“ètgYKª²lqb�§£ÅKð»{TÌ#ºrŽŒZ,§qö@�Ÿ&÷/þð +¬»±4ö|Ÿ+a¹´VpÖ;›ÄAìîÚ6K»¥ÍLðúÌÜô¬ÐÞ;»T“Nõ™É¡¸=�y›JGf-Ê +¦éŽw¶º£ƒbóºˆ×ÕïÀ±çï5ú—M_�¼qÉ|r[XÅÐ5£¯2HâÞ»|âÀÚ~¥†íãTânÌðÐNs+�.�SùzŠ^g(¯mp<ܤ©Ååqá�Ø„�r¢0rq$8~RYÝe=\Qg%qû+®ªàìQN�œ¥¿ù¹û³<œŸ{VÁNn:½Õît<¿]t¥WW¥7âcô´x^’š„ü…‡™¢oÒÜõžæ0¦zÑ}³»{º5 +¨)º×ƒÜÀ]8:ÃÓšIEu³ƒ4\Z×5¦¢×¢Œó+tµ[Ê£ŒÛ[ÚHÁg:ìÅ*¦µ¡²®½3ñ9&e+Øã·’€ÿdÄþ”j«ØÚO�KY§ +ÒÐPc¯-?zØn 8eÇ7°$oÝž¸�Ÿ£’Óíöë`�æèjHUìÚPhØJ2Iá�á²m¤!亂aJ¨ÿÌ>d +éûûrÉN’oÓêò‹Ë6’u˜)¿Lñ—¯"€F•lV+º¦O�™"S$hìNÂò¹ýUaúg˜;M�‡?æR,‹Å³'YAbhÍD¦j2ã‡}ß;!TPpßp7;¢Ê¸žN ¸D2FÆláƒo'¶€l¯Ùt$·ÎTn²XJKl9d7)x»d8oìÀ<™¼7zŸýàbàc‚£†Gïzrvñôì3Kc¯¿µì½Â–¶†Žæ›@lô°5ÙÒÊ(S¯ÛÛÒIâ‚_n¥èz±ÎþJ޽’9�¢Ìb1ÖÁ�ÀÐ�%`P=ôÞOï�rp|–§yï(ÖµV{›oaÚ>!võ•‡ƒ‚Ò¤óS‚ƒ¥IƒB?p}>Ýxb¾IhN®³§8ñ18'Ê£ïG§h%ýY1¯a>©C¤6$ý]d(„ì’FåÛ—T>éqq^ƒÒ§Dˆ°"aQ±ª‡ætBA�0òÈwF<2Ùײ…ý9>ç +endstream +endobj +11 0 obj +<</Type/Metadata +/Subtype/XML/Length 1233>>stream +<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?> +<?adobe-xap-filters esc="CRLF"?> +<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'> +<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'> +<rdf:Description rdf:about="" xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 9.53.3'/> +<rdf:Description rdf:about="" xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2022-05-12T20:31:17+03:00</xmp:ModifyDate> +<xmp:CreateDate>2022-05-12T20:31:17+03:00</xmp:CreateDate> +<xmp:CreatorTool>Doxygen</xmp:CreatorTool></rdf:Description> +<rdf:Description rdf:about="" xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='uuid:e0ff0276-0a35-11f8-0000-07a3afc5922a'/> +<rdf:Description rdf:about="" xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>ClassName</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li></rdf:li></rdf:Seq></dc:creator></rdf:Description> +</rdf:RDF> +</x:xmpmeta> + + +<?xpacket end='w'?> +endstream +endobj +2 0 obj +<</Producer(GPL Ghostscript 9.53.3) +/CreationDate(D:20220512203117+03'00') +/ModDate(D:20220512203117+03'00') +/Title(ClassName) +/Creator(Doxygen) +/Author()>>endobj +xref +0 12 +0000000000 65535 f +0000000767 00000 n +0000004058 00000 n +0000000708 00000 n +0000000573 00000 n +0000000228 00000 n +0000000554 00000 n +0000000861 00000 n +0000001210 00000 n +0000000832 00000 n +0000001477 00000 n +0000002748 00000 n +trailer +<< /Size 12 /Root 1 0 R /Info 2 0 R +/ID [<2C91EE083BFA5F7C036C26C82C94FBC4><2C91EE083BFA5F7C036C26C82C94FBC4>] +>> +startxref +4229 +%%EOF diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classList.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/classList.tex new file mode 100644 index 0000000..a363eaf --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classList.tex @@ -0,0 +1,267 @@ +\hypertarget{classList}{}\doxysection{List\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>} Class Template Reference} +\label{classList}\index{List$<$ T $>$@{List$<$ T $>$}} + + +Templated class that stores an array of elements in dynamic memory. + + + + +{\ttfamily \#include $<$List.\+hpp$>$} + +Inheritance diagram for List\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{classList} +\end{center} +\end{figure} +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{classList_a93cd36efc12aa5ef5fc28866edce7e61}\label{classList_a93cd36efc12aa5ef5fc28866edce7e61}} +{\bfseries List} (const T $\ast$elements, unsigned elements\+Count) +\begin{DoxyCompactList}\small\item\em Copies all elements in given array. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classList_abfec4f2e7990d06c143852ecfdf907bb}{add}} (const T \&element) +\begin{DoxyCompactList}\small\item\em Adds an element. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classList_ae4586debf72af33bccb3c2fbfce420e8}{insert\+At}} (const T \&element, unsigned index) +\begin{DoxyCompactList}\small\item\em Inserts element at given index. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{classList_ad9c0a5b5bca6286f458d6fab280de65a}{remove\+At}} (unsigned index) +\begin{DoxyCompactList}\small\item\em Removes element at index. \end{DoxyCompactList}\item +unsigned \mbox{\hyperlink{classList_a3804f03273ef5e339b504e439c5b6534}{find\+Index}} (const T \&element) const +\begin{DoxyCompactList}\small\item\em Finds the index of element. \end{DoxyCompactList}\item +bool \mbox{\hyperlink{classList_a163a070c7d5dc77ca3c1726b8f2d4bc1}{contain}} (const T \&element) const +\item +\mbox{\Hypertarget{classList_a321bb581943398344aad07198d1f02ac}\label{classList_a321bb581943398344aad07198d1f02ac}} +T \& {\bfseries operator\mbox{[}$\,$\mbox{]}} (unsigned index) +\begin{DoxyCompactList}\small\item\em Returns reference to element at index. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classList_a5fa582de3aec5094a871852b658cf853}\label{classList_a5fa582de3aec5094a871852b658cf853}} +const T \& {\bfseries operator\mbox{[}$\,$\mbox{]}} (unsigned index) const +\begin{DoxyCompactList}\small\item\em Returns constant reference to element at index. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classList_aa4332ce5a589da28528f035ded6d41e5}\label{classList_aa4332ce5a589da28528f035ded6d41e5}} +\mbox{\hyperlink{classList}{List}}$<$ T $>$ \& {\bfseries operator+=} (const \mbox{\hyperlink{classList}{List}}$<$ T $>$ other) +\begin{DoxyCompactList}\small\item\em Appends elements from other list. \end{DoxyCompactList}\item +std\+::istream \& \mbox{\hyperlink{classList_a5e3581ee07649f462aa8bb3221a5466e}{read}} (std\+::istream \&istr) +\begin{DoxyCompactList}\small\item\em Reads from stream. \end{DoxyCompactList}\item +std\+::ostream \& \mbox{\hyperlink{classList_a8d2babffd2fb4a5e0a40dbd306e19956}{write}} (std\+::ostream \&ostr) const +\begin{DoxyCompactList}\small\item\em Writes to stream. \end{DoxyCompactList}\item +unsigned \mbox{\hyperlink{classList_aa32109b77dccd8241b125ebabdda876c}{get\+\_\+length}} () const +\begin{DoxyCompactList}\small\item\em Returns the length. \end{DoxyCompactList}\item +unsigned \mbox{\hyperlink{classList_a3c1e3a3fc085f5b7ae68514c4758687b}{get\+\_\+count}} () const +\begin{DoxyCompactList}\small\item\em Returns the count. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classList_a248952759645a68a4a1ea5aa31bc089f}\label{classList_a248952759645a68a4a1ea5aa31bc089f}} +\mbox{\hyperlink{classList}{List}} \& {\bfseries operator=} (const \mbox{\hyperlink{classList}{List}} \&other) +\item +\mbox{\Hypertarget{classList_a43ce719b9dcc8aa532bad580c44e99f6}\label{classList_a43ce719b9dcc8aa532bad580c44e99f6}} +{\bfseries List} (const \mbox{\hyperlink{classList}{List}} \&other) +\item +\mbox{\Hypertarget{classList_a25feb644d97345e4f36bf54c7aab4ade}\label{classList_a25feb644d97345e4f36bf54c7aab4ade}} +{\bfseries List} (\mbox{\hyperlink{classList}{List}} \&\&other) +\item +\mbox{\Hypertarget{classList_a3be35847f78c9fdb37c957eff55c1608}\label{classList_a3be35847f78c9fdb37c957eff55c1608}} +\mbox{\hyperlink{classList}{List}} \& {\bfseries operator=} (\mbox{\hyperlink{classList}{List}} \&\&other) +\end{DoxyCompactItemize} +\doxysubsection*{Protected Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{classList_a302d78384a6516a4d4dede84d4f0968e}\label{classList_a302d78384a6516a4d4dede84d4f0968e}} +void {\bfseries resize} () +\item +\mbox{\Hypertarget{classList_a29cb6681b3f5514f747d04661b08cfd6}\label{classList_a29cb6681b3f5514f747d04661b08cfd6}} +void {\bfseries free} () +\item +\mbox{\Hypertarget{classList_aef2dcec4a271f7ba2f71ef164535e273}\label{classList_aef2dcec4a271f7ba2f71ef164535e273}} +void {\bfseries copy\+From} (const \mbox{\hyperlink{classList}{List}} \&other) +\end{DoxyCompactItemize} +\doxysubsection*{Protected Attributes} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{classList_ab28a0d67da45b5d3bb755c72105a516c}\label{classList_ab28a0d67da45b5d3bb755c72105a516c}} +T $\ast$ {\bfseries elements} +\item +\mbox{\Hypertarget{classList_af44323f3a486341510ad97b6bceda1be}\label{classList_af44323f3a486341510ad97b6bceda1be}} +unsigned {\bfseries length} +\item +\mbox{\Hypertarget{classList_a66db5f1795dd0530911f32552ddd9815}\label{classList_a66db5f1795dd0530911f32552ddd9815}} +unsigned {\bfseries count} +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename T$>$\newline +class List$<$ T $>$} +Templated class that stores an array of elements in dynamic memory. + +\begin{DoxyWarning}{Warning} +\mbox{\hyperlink{classList_a3804f03273ef5e339b504e439c5b6534}{find\+Index()}}, \mbox{\hyperlink{classList_a163a070c7d5dc77ca3c1726b8f2d4bc1}{contain()}}, \mbox{\hyperlink{classList_a5e3581ee07649f462aa8bb3221a5466e}{read()}}, \mbox{\hyperlink{classList_a8d2babffd2fb4a5e0a40dbd306e19956}{write()}}, operator$<$$<$() and operator$>$$>$() require the type to have defined a couple of functions. +\end{DoxyWarning} +\begin{DoxySeeAlso}{See also} +\mbox{\hyperlink{classList_a3804f03273ef5e339b504e439c5b6534}{find\+Index()}} + +\mbox{\hyperlink{classList_a163a070c7d5dc77ca3c1726b8f2d4bc1}{contain()}} + +\mbox{\hyperlink{classList_a5e3581ee07649f462aa8bb3221a5466e}{read()}} + +\mbox{\hyperlink{classList_a8d2babffd2fb4a5e0a40dbd306e19956}{write()}} + +\mbox{\hyperlink{Date_8h_ad12d4bbc4f7919efdec583d1478a6a76}{operator$<$$<$()}} + +\mbox{\hyperlink{Date_8h_ae020cf1772268f1a43d172d3adfc9797}{operator$>$$>$()}} +\end{DoxySeeAlso} + + +\doxysubsection{Member Function Documentation} +\mbox{\Hypertarget{classList_abfec4f2e7990d06c143852ecfdf907bb}\label{classList_abfec4f2e7990d06c143852ecfdf907bb}} +\index{List$<$ T $>$@{List$<$ T $>$}!add@{add}} +\index{add@{add}!List$<$ T $>$@{List$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{add()}{add()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +void \mbox{\hyperlink{classList}{List}}$<$ T $>$\+::add (\begin{DoxyParamCaption}\item[{const T \&}]{element }\end{DoxyParamCaption})} + + + +Adds an element. + +Resizes internal array if there is no space for additional elements. \mbox{\Hypertarget{classList_a163a070c7d5dc77ca3c1726b8f2d4bc1}\label{classList_a163a070c7d5dc77ca3c1726b8f2d4bc1}} +\index{List$<$ T $>$@{List$<$ T $>$}!contain@{contain}} +\index{contain@{contain}!List$<$ T $>$@{List$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{contain()}{contain()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +bool \mbox{\hyperlink{classList}{List}}$<$ T $>$\+::contain (\begin{DoxyParamCaption}\item[{const T \&}]{element }\end{DoxyParamCaption}) const} + +\begin{DoxyReturn}{Returns} +Whether the element is contained in the current \mbox{\hyperlink{classList}{List}} +\end{DoxyReturn} +\begin{DoxyWarning}{Warning} +Function depends on \mbox{\hyperlink{classList_a3804f03273ef5e339b504e439c5b6534}{find\+Index()}}, which means the same \char`\"{}compare\char`\"{} function must be defined in the type +\end{DoxyWarning} +\begin{DoxySeeAlso}{See also} +\mbox{\hyperlink{classList_a3804f03273ef5e339b504e439c5b6534}{find\+Index()}} +\end{DoxySeeAlso} +\mbox{\Hypertarget{classList_a3804f03273ef5e339b504e439c5b6534}\label{classList_a3804f03273ef5e339b504e439c5b6534}} +\index{List$<$ T $>$@{List$<$ T $>$}!findIndex@{findIndex}} +\index{findIndex@{findIndex}!List$<$ T $>$@{List$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{findIndex()}{findIndex()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +unsigned \mbox{\hyperlink{classList}{List}}$<$ T $>$\+::find\+Index (\begin{DoxyParamCaption}\item[{const T \&}]{element }\end{DoxyParamCaption}) const} + + + +Finds the index of element. + +\begin{DoxyReturn}{Returns} +Index of element. If element isn\textquotesingle{}t found, returns the count of element. +\end{DoxyReturn} +\begin{DoxyWarning}{Warning} +The function depends on the type having a function \char`\"{}compare\char`\"{} defined, which takes two elements and returns a number \texorpdfstring{$<$}{<}0 if elem1 \texorpdfstring{$<$}{<} elem2, \texorpdfstring{$>$}{>}0 if elem1 \texorpdfstring{$>$}{>} elem2, 0 if elem1 == elem2 +\end{DoxyWarning} +\begin{DoxyNote}{Note} +Searching is done linearly +\end{DoxyNote} +\mbox{\Hypertarget{classList_a3c1e3a3fc085f5b7ae68514c4758687b}\label{classList_a3c1e3a3fc085f5b7ae68514c4758687b}} +\index{List$<$ T $>$@{List$<$ T $>$}!get\_count@{get\_count}} +\index{get\_count@{get\_count}!List$<$ T $>$@{List$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{get\_count()}{get\_count()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +unsigned \mbox{\hyperlink{classList}{List}}$<$ T $>$\+::get\+\_\+count} + + + +Returns the count. + +Count is the amount of elements that are stored. \mbox{\Hypertarget{classList_aa32109b77dccd8241b125ebabdda876c}\label{classList_aa32109b77dccd8241b125ebabdda876c}} +\index{List$<$ T $>$@{List$<$ T $>$}!get\_length@{get\_length}} +\index{get\_length@{get\_length}!List$<$ T $>$@{List$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{get\_length()}{get\_length()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +unsigned \mbox{\hyperlink{classList}{List}}$<$ T $>$\+::get\+\_\+length} + + + +Returns the length. + +Length is the size of the underlying array (allocated memory). \mbox{\Hypertarget{classList_ae4586debf72af33bccb3c2fbfce420e8}\label{classList_ae4586debf72af33bccb3c2fbfce420e8}} +\index{List$<$ T $>$@{List$<$ T $>$}!insertAt@{insertAt}} +\index{insertAt@{insertAt}!List$<$ T $>$@{List$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{insertAt()}{insertAt()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +void \mbox{\hyperlink{classList}{List}}$<$ T $>$\+::insert\+At (\begin{DoxyParamCaption}\item[{const T \&}]{element, }\item[{unsigned}]{index }\end{DoxyParamCaption})} + + + +Inserts element at given index. + +If index is after the last element, the element is just added. Otherwise all elements after the index are shifted right and element is put in place. + +Resizes internal array if there is no space for additional elements. \mbox{\Hypertarget{classList_a5e3581ee07649f462aa8bb3221a5466e}\label{classList_a5e3581ee07649f462aa8bb3221a5466e}} +\index{List$<$ T $>$@{List$<$ T $>$}!read@{read}} +\index{read@{read}!List$<$ T $>$@{List$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{read()}{read()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +std\+::istream \& \mbox{\hyperlink{classList}{List}}$<$ T $>$\+::read (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr }\end{DoxyParamCaption})} + + + +Reads from stream. + + +\begin{DoxyParams}{Parameters} +{\em istr} & An input stream\\ +\hline +\end{DoxyParams} +Directly reads bytes from stream (calls \mbox{\hyperlink{classList_a5e3581ee07649f462aa8bb3221a5466e}{read()}} function). Any stored values are deleted and replaced with those from the stream. + +\begin{DoxyWarning}{Warning} +The function depends on the type having a function \char`\"{}read\char`\"{} defined, which takes an std\+::istream\& and writes it\textquotesingle{}s data to it. Return type doesn\textquotesingle{}t matter. +\end{DoxyWarning} +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ifstream +\end{DoxyNote} +\mbox{\Hypertarget{classList_ad9c0a5b5bca6286f458d6fab280de65a}\label{classList_ad9c0a5b5bca6286f458d6fab280de65a}} +\index{List$<$ T $>$@{List$<$ T $>$}!removeAt@{removeAt}} +\index{removeAt@{removeAt}!List$<$ T $>$@{List$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{removeAt()}{removeAt()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +bool \mbox{\hyperlink{classList}{List}}$<$ T $>$\+::remove\+At (\begin{DoxyParamCaption}\item[{unsigned}]{index }\end{DoxyParamCaption})} + + + +Removes element at index. + +\begin{DoxyReturn}{Returns} +Wether element could be removed +\end{DoxyReturn} +If index is after that of the last element, nothing is done and false is returned. Otherwise elements after index are shifted right and count is reduced. \mbox{\Hypertarget{classList_a8d2babffd2fb4a5e0a40dbd306e19956}\label{classList_a8d2babffd2fb4a5e0a40dbd306e19956}} +\index{List$<$ T $>$@{List$<$ T $>$}!write@{write}} +\index{write@{write}!List$<$ T $>$@{List$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{write()}{write()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +std\+::ostream \& \mbox{\hyperlink{classList}{List}}$<$ T $>$\+::write (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr }\end{DoxyParamCaption}) const} + + + +Writes to stream. + + +\begin{DoxyParams}{Parameters} +{\em ostr} & An output stream\\ +\hline +\end{DoxyParams} +Directly writes bytes to stream (calls \mbox{\hyperlink{classList_a8d2babffd2fb4a5e0a40dbd306e19956}{write()}} function). + +\begin{DoxyWarning}{Warning} +The function depends on the type having a function \char`\"{}write\char`\"{} defined, which takes an std\+::ostream\& and writes it\textquotesingle{}s data to it. Return type doesn\textquotesingle{}t matter. +\end{DoxyWarning} +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ofstream +\end{DoxyNote} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +src/\+Generic/\+List/\mbox{\hyperlink{List_8hpp}{List.\+hpp}}\end{DoxyCompactItemize} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classMenu.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/classMenu.tex new file mode 100644 index 0000000..3157f01 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classMenu.tex @@ -0,0 +1,156 @@ +\hypertarget{classMenu}{}\doxysection{Menu Class Reference} +\label{classMenu}\index{Menu@{Menu}} + + +Handles navigation between multiple commands. + + + + +{\ttfamily \#include $<$Menu.\+h$>$} + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{classMenu_ad466dd83355124a6ed958430450bfe94}\label{classMenu_ad466dd83355124a6ed958430450bfe94}} +{\bfseries Menu} () +\begin{DoxyCompactList}\small\item\em Sets name as \char`\"{}\+Menu\char`\"{}, leaves all flags to false and creates an empty \mbox{\hyperlink{classCommand}{Command}} list. \end{DoxyCompactList}\item +\mbox{\hyperlink{classMenu_aeec919379638ad526df5167ed755a1f3}{Menu}} (const char $\ast$title, bool back\+Exists\+App, bool is\+Sub\+Menu) +\begin{DoxyCompactList}\small\item\em Copies title, saves flags and creates and empty \mbox{\hyperlink{classCommand}{Command}} list. \end{DoxyCompactList}\item +\mbox{\hyperlink{classMenu_a12057ad84f3a9d41bc7092cc2d86c87a}{Menu}} (const char $\ast$title, bool back\+Exists\+App, bool is\+Sub\+Menu, const \mbox{\hyperlink{classCommand}{Command}} $\ast$commands, unsigned command\+Count) +\begin{DoxyCompactList}\small\item\em Copies title, saves flags and copies commands. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classMenu_a1f022cc8b705369073f8fd7b90b30c8d}\label{classMenu_a1f022cc8b705369073f8fd7b90b30c8d}} +void {\bfseries add\+Command} (const \mbox{\hyperlink{classCommand}{Command}} \&command) +\begin{DoxyCompactList}\small\item\em Adds a command to the internal \mbox{\hyperlink{classCommand}{Command}} list. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classMenu_aad506cb9a7f35dea98c60484bb2d095c}{register\+Error}} (const char $\ast$message) const +\begin{DoxyCompactList}\small\item\em Tell \mbox{\hyperlink{classMenu}{Menu}} to show an error message next time it prints. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classMenu_a5350b1addf9bf365351486cd161696ad}{register\+Warning}} (const char $\ast$message) const +\begin{DoxyCompactList}\small\item\em Tell \mbox{\hyperlink{classMenu}{Menu}} to show a warning message next time it prints. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classMenu_a3504e28b5d05e1ad70dada190bbc3a9c}{register\+Success}} (const char $\ast$message) const +\begin{DoxyCompactList}\small\item\em Tell \mbox{\hyperlink{classMenu}{Menu}} to show a success message next time it prints. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classMenu_a0400751da7f8583029b7a12d3003c36d}{navigate}} () const +\begin{DoxyCompactList}\small\item\em Lists commands and after user input executes an appropriate command run() function. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Handles navigation between multiple commands. + +Shows the title, then below it an Error/\+Warning/\+Success message if set, lists all command options as an enumerated list, takes command index and calls the chosen command\textquotesingle{}s run() function. + +\doxysubsection{Constructor \& Destructor Documentation} +\mbox{\Hypertarget{classMenu_aeec919379638ad526df5167ed755a1f3}\label{classMenu_aeec919379638ad526df5167ed755a1f3}} +\index{Menu@{Menu}!Menu@{Menu}} +\index{Menu@{Menu}!Menu@{Menu}} +\doxysubsubsection{\texorpdfstring{Menu()}{Menu()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} +{\footnotesize\ttfamily Menu\+::\+Menu (\begin{DoxyParamCaption}\item[{const char $\ast$}]{title, }\item[{bool}]{back\+Exists\+App, }\item[{bool}]{is\+Sub\+Menu }\end{DoxyParamCaption})} + + + +Copies title, saves flags and creates and empty \mbox{\hyperlink{classCommand}{Command}} list. + + +\begin{DoxyParams}{Parameters} +{\em title} & C-\/style string, class stores at most 255 characters (last character is always terminating zero) \\ +\hline +{\em back\+Exists\+App} & Flag whether or not to list the 0-\/th option as \char`\"{}\+Exit\char`\"{}, rather than \char`\"{}\+Go Back\char`\"{} \\ +\hline +{\em is\+Sub\+Menu} & Flag whether or not to show the title as a sub\+Title or not \\ +\hline +\end{DoxyParams} +\mbox{\Hypertarget{classMenu_a12057ad84f3a9d41bc7092cc2d86c87a}\label{classMenu_a12057ad84f3a9d41bc7092cc2d86c87a}} +\index{Menu@{Menu}!Menu@{Menu}} +\index{Menu@{Menu}!Menu@{Menu}} +\doxysubsubsection{\texorpdfstring{Menu()}{Menu()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} +{\footnotesize\ttfamily Menu\+::\+Menu (\begin{DoxyParamCaption}\item[{const char $\ast$}]{title, }\item[{bool}]{back\+Exists\+App, }\item[{bool}]{is\+Sub\+Menu, }\item[{const \mbox{\hyperlink{classCommand}{Command}} $\ast$}]{commands, }\item[{unsigned}]{command\+Count }\end{DoxyParamCaption})} + + + +Copies title, saves flags and copies commands. + + +\begin{DoxyParams}{Parameters} +{\em title} & C-\/style string, class stores at most 255 characters (last character is always terminating zero) \\ +\hline +{\em back\+Exists\+App} & Flag whether or not to list the 0-\/th option as \char`\"{}\+Exit\char`\"{}, rather than \char`\"{}\+Go Back\char`\"{} \\ +\hline +{\em is\+Sub\+Menu} & Flag whether or not to show the title as a sub\+Title or not \\ +\hline +{\em commands} & Pointer to an array of \mbox{\hyperlink{classCommand}{Command}} instances \\ +\hline +{\em command\+Count} & Number of elements that \char`\"{}commands\char`\"{} points to \\ +\hline +\end{DoxyParams} + + +\doxysubsection{Member Function Documentation} +\mbox{\Hypertarget{classMenu_a0400751da7f8583029b7a12d3003c36d}\label{classMenu_a0400751da7f8583029b7a12d3003c36d}} +\index{Menu@{Menu}!navigate@{navigate}} +\index{navigate@{navigate}!Menu@{Menu}} +\doxysubsubsection{\texorpdfstring{navigate()}{navigate()}} +{\footnotesize\ttfamily void Menu\+::navigate (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const} + + + +Lists commands and after user input executes an appropriate command run() function. + +Prints the title, then an Error/\+Warning/\+Sucess message (if set), prints all command names as an ordered list (starting from 1), waits for user input to select one of those commands (by list number) and finally executes the appropriate command\textquotesingle{}s run() function. + +After the run() function exists, everything is reprinted. The 0 list index is always \char`\"{}\+Go Back\char`\"{}/\char`\"{}\+Exit\char`\"{} and it always stops the reprinting loop. + +If there are no commands, prints \char`\"{}\+Menu is empty!\char`\"{}. If user input doesn\textquotesingle{}t correspond to any command, registers an error message and reprints. \mbox{\Hypertarget{classMenu_aad506cb9a7f35dea98c60484bb2d095c}\label{classMenu_aad506cb9a7f35dea98c60484bb2d095c}} +\index{Menu@{Menu}!registerError@{registerError}} +\index{registerError@{registerError}!Menu@{Menu}} +\doxysubsubsection{\texorpdfstring{registerError()}{registerError()}} +{\footnotesize\ttfamily void Menu\+::register\+Error (\begin{DoxyParamCaption}\item[{const char $\ast$}]{message }\end{DoxyParamCaption}) const} + + + +Tell \mbox{\hyperlink{classMenu}{Menu}} to show an error message next time it prints. + + +\begin{DoxyParams}{Parameters} +{\em message} & C-\/style string, saves to pointer for later reuse when showing the message.\\ +\hline +\end{DoxyParams} +Stores the message pointer in a global variable (in the cpp file) and sets it\textquotesingle{}s type as an Error in another global variable (in the cpp file). + +The next time the whole \mbox{\hyperlink{classMenu}{Menu}} is shown, the message will appear below the title. \mbox{\Hypertarget{classMenu_a3504e28b5d05e1ad70dada190bbc3a9c}\label{classMenu_a3504e28b5d05e1ad70dada190bbc3a9c}} +\index{Menu@{Menu}!registerSuccess@{registerSuccess}} +\index{registerSuccess@{registerSuccess}!Menu@{Menu}} +\doxysubsubsection{\texorpdfstring{registerSuccess()}{registerSuccess()}} +{\footnotesize\ttfamily void Menu\+::register\+Success (\begin{DoxyParamCaption}\item[{const char $\ast$}]{message }\end{DoxyParamCaption}) const} + + + +Tell \mbox{\hyperlink{classMenu}{Menu}} to show a success message next time it prints. + + +\begin{DoxyParams}{Parameters} +{\em message} & C-\/style string, saves to pointer for later reuse when showing the message.\\ +\hline +\end{DoxyParams} +Stores the message pointer in a global variable (in the cpp file) and sets it\textquotesingle{}s type as Success in another global variable (in the cpp file). + +The next time the whole \mbox{\hyperlink{classMenu}{Menu}} is shown, the message will appear below the title. \mbox{\Hypertarget{classMenu_a5350b1addf9bf365351486cd161696ad}\label{classMenu_a5350b1addf9bf365351486cd161696ad}} +\index{Menu@{Menu}!registerWarning@{registerWarning}} +\index{registerWarning@{registerWarning}!Menu@{Menu}} +\doxysubsubsection{\texorpdfstring{registerWarning()}{registerWarning()}} +{\footnotesize\ttfamily void Menu\+::register\+Warning (\begin{DoxyParamCaption}\item[{const char $\ast$}]{message }\end{DoxyParamCaption}) const} + + + +Tell \mbox{\hyperlink{classMenu}{Menu}} to show a warning message next time it prints. + + +\begin{DoxyParams}{Parameters} +{\em message} & C-\/style string, saves to pointer for later reuse when showing the message.\\ +\hline +\end{DoxyParams} +Stores the message pointer in a global variable (in the cpp file) and sets it\textquotesingle{}s type as a Warning in another global variable (in the cpp file). + +The next time the whole \mbox{\hyperlink{classMenu}{Menu}} is shown, the message will appear below the title. + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +src/\+Generic/\+Console\+Interface/\mbox{\hyperlink{Menu_8h}{Menu.\+h}}\item +src/\+Generic/\+Console\+Interface/Menu.\+cpp\end{DoxyCompactItemize} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classOrderedList.eps b/Year 1/Object-oriented Programming/Project 1/docs/latex/classOrderedList.eps new file mode 100644 index 0000000..7003121 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classOrderedList.eps @@ -0,0 +1,197 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: ClassName +%%Creator: Doxygen +%%CreationDate: Time +%%For: +%Magnification: 1.00 +%%Orientation: Portrait +%%BoundingBox: 0 0 500 338.983063 +%%Pages: 0 +%%BeginSetup +%%EndSetup +%%EndComments + +% ----- variables ----- + +/boxwidth 0 def +/boxheight 40 def +/fontheight 24 def +/marginwidth 10 def +/distx 20 def +/disty 40 def +/boundaspect 1.475000 def % aspect ratio of the BoundingBox (width/height) +/boundx 500 def +/boundy boundx boundaspect div def +/xspacing 0 def +/yspacing 0 def +/rows 2 def +/cols 1 def +/scalefactor 0 def +/boxfont /Times-Roman findfont fontheight scalefont def + +% ----- procedures ----- + +/dotted { [1 4] 0 setdash } def +/dashed { [5] 0 setdash } def +/solid { [] 0 setdash } def + +/max % result = MAX(arg1,arg2) +{ + /a exch def + /b exch def + a b gt {a} {b} ifelse +} def + +/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2) +{ + 0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max +} def + +/cw % boxwidth = MAX(boxwidth, stringwidth(arg1)) +{ + /str exch def + /boxwidth boxwidth str stringwidth pop max def +} def + +/box % draws a box with text 'arg1' at grid pos (arg2,arg3) +{ gsave + 2 setlinewidth + newpath + exch xspacing mul xoffset add + exch yspacing mul + moveto + boxwidth 0 rlineto + 0 boxheight rlineto + boxwidth neg 0 rlineto + 0 boxheight neg rlineto + closepath + dup stringwidth pop neg boxwidth add 2 div + boxheight fontheight 2 div sub 2 div + rmoveto show stroke + grestore +} def + +/mark +{ newpath + exch xspacing mul xoffset add boxwidth add + exch yspacing mul + moveto + 0 boxheight 4 div rlineto + boxheight neg 4 div boxheight neg 4 div rlineto + closepath + eofill + stroke +} def + +/arrow +{ newpath + moveto + 3 -8 rlineto + -6 0 rlineto + 3 8 rlineto + closepath + eofill + stroke +} def + +/out % draws an output connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight add + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/in % draws an input connector for the block at (arg1,arg2) +{ + newpath + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul disty 2 div sub + /y exch def + /x exch def + x y moveto + 0 disty 2 div rlineto + stroke + 1 eq { x y disty 2 div add arrow } if +} def + +/hedge +{ + exch xspacing mul xoffset add boxwidth 2 div add + exch yspacing mul boxheight 2 div sub + /y exch def + /x exch def + newpath + x y moveto + boxwidth 2 div distx add 0 rlineto + stroke + 1 eq + { newpath x boxwidth 2 div distx add add y moveto + -8 3 rlineto + 0 -6 rlineto + 8 3 rlineto + closepath + eofill + stroke + } if +} def + +/vedge +{ + /ye exch def + /ys exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add dup + ys yspacing mul boxheight 2 div sub + moveto + ye yspacing mul boxheight 2 div sub + lineto + stroke +} def + +/conn % connections the blocks from col 'arg1' to 'arg2' of row 'arg3' +{ + /ys exch def + /xe exch def + /xs exch def + newpath + xs xspacing mul xoffset add boxwidth 2 div add + ys yspacing mul disty 2 div sub + moveto + xspacing xe xs sub mul 0 + rlineto + stroke +} def + +% ----- main ------ + +boxfont setfont +1 boundaspect scale +(OrderedList< T >) cw +(List< T >) cw +/boxwidth boxwidth marginwidth 2 mul add def +/xspacing boxwidth distx add def +/yspacing boxheight disty add def +/scalefactor + boxwidth cols mul distx cols 1 sub mul add + boxheight rows mul disty rows 1 sub mul add boundaspect mul + max def +boundx scalefactor div boundy scalefactor div scale + +% ----- classes ----- + + (OrderedList< T >) 0.000000 0.000000 box + (List< T >) 0.000000 1.000000 box + +% ----- relations ----- + +solid +0 0.000000 0.000000 out +solid +1 0.000000 1.000000 in diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classOrderedList.pdf b/Year 1/Object-oriented Programming/Project 1/docs/latex/classOrderedList.pdf new file mode 100644 index 0000000..b49d530 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classOrderedList.pdf @@ -0,0 +1,117 @@ +%PDF-1.5 +%Çì�¢ +%%Invocation: gs -q -dSAFER -dNOPAUSE -dBATCH -dCompatibilityLevel=1.5 -sDEVICE=pdfwrite -sOutputFile=? -dPDFSETTINGS#/prepress -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -dAutoRotatePages#/None - +5 0 obj +<</Length 6 0 R/Filter /FlateDecode>> +stream +xœ•�ÏNÃ0Æï~ +�ƒqœ¤n$Ä qABƒ¼Áþ´6�öú8mÊ:mÔCl볿_¿=29äòÕwÙãöà†)ÖgÙãS†ûwÅÆ“Du˜70n8”†|Œ }C s7o‡Õú°^½~~ÿ<`ÆÇÛüÏ…Ô�G3y�=Nþœ{ˆÌ¥Ø�…ãH’µçutÔLƒšu²Í\ü�ÜI¢d# Ju€¿¤¾Â)Ž[²…J;µ•Ù»F¨mÎy}’uà•™¼k/ú!J:^šJœ¥1µ±udyîÆ_¿¾R5µ=1~óQQh"Vtm²@œ‰$SòóÉù•6w–Ñ/W1uUendstream +endobj +6 0 obj +260 +endobj +4 0 obj +<</Type/Page/MediaBox [0 0 500 338.98] +/Parent 3 0 R +/Resources<</ProcSet[/PDF /Text] +/Font 9 0 R +>> +/Contents 5 0 R +>> +endobj +3 0 obj +<< /Type /Pages /Kids [ +4 0 R +] /Count 1 +>> +endobj +1 0 obj +<</Type /Catalog /Pages 3 0 R +/Metadata 11 0 R +>> +endobj +9 0 obj +<</R7 +7 0 R>> +endobj +7 0 obj +<</BaseFont/RTBSIO+Times-Roman/FontDescriptor 8 0 R/Type/Font +/FirstChar 32/LastChar 116/Widths[ +250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 564 0 564 0 +0 0 0 0 0 0 0 0 0 0 0 0 611 0 0 722 +0 0 0 0 611 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 500 444 0 0 0 278 0 0 0 0 0 0 +0 0 333 389 278] +/Encoding/WinAnsiEncoding/Subtype/Type1>> +endobj +8 0 obj +<</Type/FontDescriptor/FontName/RTBSIO+Times-Roman/FontBBox[0 -14 688 683]/Flags 131104 +/Ascent 683 +/CapHeight 676 +/Descent -14 +/ItalicAngle 0 +/StemV 103 +/MissingWidth 250 +/XHeight 460 +/CharSet(/L/O/T/d/e/greater/i/less/r/s/space/t)/FontFile3 10 0 R>> +endobj +10 0 obj +<</Filter/FlateDecode +/Subtype/Type1C/Length 1186>>stream +xœ�“PÓuÇ?_¾Û÷û¹œË¤é‘¸í¬³ÉÙAà�‡W˜iri€€‰è„©Ûp?Ôñ{ÀãÃÉ�ÆX2uâE'þˆ(Y¨]é¥yTzÕÕ•grýñ|¸uÍ®»ú»ÿžçyß=Ïs¯÷ópHƒ8Ž“eëôZsb¦Q_dx˜¯¢Ë8C—ó¤jnãÜ)UÊ‘ñD&é‹—ü¸|�Aý£`]„$—²5×ûÌŽÌÜU «Ó�e6“®¤Ô¢~^³6I]lSÿ£¨7jͺƒze48¢=d,Ók
–×túb«Yý÷Xu¦¶Äz¨ÈôßÚ¿Ýþ_„�Ìd¶dìÓnÓe«×§!”…²Ñ”ˆ^F›�½Š’‡–#ZÅ€$¨ýÊ¥rõ1\LaÌ·|_Ë×óýü8xäp—øiªŸ»=÷-�†^a³»¢ÇÁ`C£—ßìpÚ»”½•^g7ÁÁ^ßàÉ#~]‘Ñš¾Sõ“ètgYKª²lqb�§£ÅKð»{TÌ#ºrŽŒZ,§qö@�Ÿ&÷/þð +¬»±4ö|Ÿ+a¹´VpÖ;›ÄAìîÚ6K»¥ÍLðúÌÜô¬ÐÞ;»T“Nõ™É¡¸=�y›JGf-Ê +¦éŽw¶º£ƒbóºˆ×ÕïÀ±çï5ú—M_�¼qÉ|r[XÅÐ5£¯2HâÞ»|âÀÚ~¥†íãTânÌðÐNs+�.�SùzŠ^g(¯mp<ܤ©Ååqá�Ø„�r¢0rq$8~RYÝe=\Qg%qû+®ªàìQN�œ¥¿ù¹û³<œŸ{VÁNn:½Õît<¿]t¥WW¥7âcô´x^’š„ü…‡™¢oÒÜõžæ0¦zÑ}³»{º5 +¨)º×ƒÜÀ]8:ÃÓšIEu³ƒ4\Z×5¦¢×¢Œó+tµ[Ê£ŒÛ[ÚHÁg:ìÅ*¦µ¡²®½3ñ9&e+Øã·’€ÿdÄþ”j«ØÚO�KY§ +ÒÐPc¯-?zØn 8eÇ7°$oÝž¸�Ÿ£’Óíöë`�æèjHUìÚPhØJ2Iá�á²m¤!亂aJ¨ÿÌ>d +éûûrÉN’oÓêò‹Ë6’u˜)¿Lñ—¯"€F•lV+º¦O�™"S$hìNÂò¹ýUaúg˜;M�‡?æR,‹Å³'YAbhÍD¦j2ã‡}ß;!TPpßp7;¢Ê¸žN ¸D2FÆláƒo'¶€l¯Ùt$·ÎTn²XJKl9d7)x»d8oìÀ<™¼7zŸýàbàc‚£†Gïzrvñôì3Kc¯¿µì½Â–¶†Žæ›@lô°5ÙÒÊ(S¯ÛÛÒIâ‚_n¥èz±ÎþJ޽’9�¢Ìb1ÖÁ�ÀÐ�%`P=ôÞOï�rp|–§yï(ÖµV{›oaÚ>!võ•‡ƒ‚Ò¤óS‚ƒ¥IƒB?p}>Ýxb¾IhN®³§8ñ18'Ê£ïG§h%ýY1¯a>©C¤6$ý]d(„ì’FåÛ—T>éqq^ƒÒ§Dˆ°"aQ±ª‡ætBA�0òÈwF<2Ùײ…ý9>ç +endstream +endobj +11 0 obj +<</Type/Metadata +/Subtype/XML/Length 1233>>stream +<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?> +<?adobe-xap-filters esc="CRLF"?> +<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'> +<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'> +<rdf:Description rdf:about="" xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 9.53.3'/> +<rdf:Description rdf:about="" xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2022-05-12T20:31:17+03:00</xmp:ModifyDate> +<xmp:CreateDate>2022-05-12T20:31:17+03:00</xmp:CreateDate> +<xmp:CreatorTool>Doxygen</xmp:CreatorTool></rdf:Description> +<rdf:Description rdf:about="" xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='uuid:e0ff0276-0a35-11f8-0000-265b83144446'/> +<rdf:Description rdf:about="" xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>ClassName</rdf:li></rdf:Alt></dc:title><dc:creator><rdf:Seq><rdf:li></rdf:li></rdf:Seq></dc:creator></rdf:Description> +</rdf:RDF> +</x:xmpmeta> + + +<?xpacket end='w'?> +endstream +endobj +2 0 obj +<</Producer(GPL Ghostscript 9.53.3) +/CreationDate(D:20220512203117+03'00') +/ModDate(D:20220512203117+03'00') +/Title(ClassName) +/Creator(Doxygen) +/Author()>>endobj +xref +0 12 +0000000000 65535 f +0000000771 00000 n +0000004062 00000 n +0000000712 00000 n +0000000577 00000 n +0000000228 00000 n +0000000558 00000 n +0000000865 00000 n +0000001214 00000 n +0000000836 00000 n +0000001481 00000 n +0000002752 00000 n +trailer +<< /Size 12 /Root 1 0 R /Info 2 0 R +/ID [<497BA3445BC612F34C75267FB1F523CD><497BA3445BC612F34C75267FB1F523CD>] +>> +startxref +4233 +%%EOF diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classOrderedList.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/classOrderedList.tex new file mode 100644 index 0000000..750b447 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classOrderedList.tex @@ -0,0 +1,94 @@ +\hypertarget{classOrderedList}{}\doxysection{Ordered\+List\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>} Class Template Reference} +\label{classOrderedList}\index{OrderedList$<$ T $>$@{OrderedList$<$ T $>$}} + + +Inherits \mbox{\hyperlink{classList}{List}}, but contains it\textquotesingle{}s elements in a sorted manner. + + + + +{\ttfamily \#include $<$Ordered\+List.\+hpp$>$} + +Inheritance diagram for Ordered\+List\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+:\begin{figure}[H] +\begin{center} +\leavevmode +\includegraphics[height=2.000000cm]{classOrderedList} +\end{center} +\end{figure} +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{classOrderedList_a736559aa9cd4d085e4bc76ae2c751097}\label{classOrderedList_a736559aa9cd4d085e4bc76ae2c751097}} +{\bfseries Ordered\+List} (const T $\ast$elements, unsigned elements\+Count) +\item +void \mbox{\hyperlink{classOrderedList_a8b2748c3cdefe4869e0d7a2fc9b4b2cd}{add}} (T element)=delete +\item +void \mbox{\hyperlink{classOrderedList_a45af729846bacc77fc8292e5d0690f99}{insert\+At}} (T element, unsigned index)=delete +\item +void \mbox{\hyperlink{classOrderedList_a1132cd9c92901e9b9950a4a409b0fc8b}{insert}} (T element) +\begin{DoxyCompactList}\small\item\em Inserts an element at a sorted position. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Additional Inherited Members} + + +\doxysubsection{Detailed Description} +\subsubsection*{template$<$typename T$>$\newline +class Ordered\+List$<$ T $>$} +Inherits \mbox{\hyperlink{classList}{List}}, but contains it\textquotesingle{}s elements in a sorted manner. + +\begin{DoxyWarning}{Warning} +Outside those defined in \mbox{\hyperlink{classList}{List}}, \mbox{\hyperlink{classOrderedList_a1132cd9c92901e9b9950a4a409b0fc8b}{insert()}} requires the type to have defined a \char`\"{}compare\char`\"{} of functions. +\end{DoxyWarning} +\begin{DoxySeeAlso}{See also} +\mbox{\hyperlink{classOrderedList_a1132cd9c92901e9b9950a4a409b0fc8b}{insert()}} +\end{DoxySeeAlso} + + +\doxysubsection{Member Function Documentation} +\mbox{\Hypertarget{classOrderedList_a8b2748c3cdefe4869e0d7a2fc9b4b2cd}\label{classOrderedList_a8b2748c3cdefe4869e0d7a2fc9b4b2cd}} +\index{OrderedList$<$ T $>$@{OrderedList$<$ T $>$}!add@{add}} +\index{add@{add}!OrderedList$<$ T $>$@{OrderedList$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{add()}{add()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +void \mbox{\hyperlink{classOrderedList}{Ordered\+List}}$<$ T $>$\+::add (\begin{DoxyParamCaption}\item[{T}]{element }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [delete]}} + +\begin{DoxyWarning}{Warning} +Function is deleted, use \mbox{\hyperlink{classOrderedList_a1132cd9c92901e9b9950a4a409b0fc8b}{insert()}} instead +\end{DoxyWarning} +\begin{DoxySeeAlso}{See also} +\mbox{\hyperlink{classOrderedList_a1132cd9c92901e9b9950a4a409b0fc8b}{insert()}} +\end{DoxySeeAlso} +\mbox{\Hypertarget{classOrderedList_a1132cd9c92901e9b9950a4a409b0fc8b}\label{classOrderedList_a1132cd9c92901e9b9950a4a409b0fc8b}} +\index{OrderedList$<$ T $>$@{OrderedList$<$ T $>$}!insert@{insert}} +\index{insert@{insert}!OrderedList$<$ T $>$@{OrderedList$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{insert()}{insert()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +void \mbox{\hyperlink{classOrderedList}{Ordered\+List}}$<$ T $>$\+::insert (\begin{DoxyParamCaption}\item[{T}]{element }\end{DoxyParamCaption})} + + + +Inserts an element at a sorted position. + +\begin{DoxyWarning}{Warning} +The function depends on the type having a function \char`\"{}compare\char`\"{} defined, which takes two elements and returns a number \texorpdfstring{$<$}{<}0 if elem1 \texorpdfstring{$<$}{<} elem2, \texorpdfstring{$>$}{>}0 if elem1 \texorpdfstring{$>$}{>} elem2, 0 if elem1 == elem2 +\end{DoxyWarning} +\begin{DoxyNote}{Note} +Insertion is done linearly +\end{DoxyNote} +\mbox{\Hypertarget{classOrderedList_a45af729846bacc77fc8292e5d0690f99}\label{classOrderedList_a45af729846bacc77fc8292e5d0690f99}} +\index{OrderedList$<$ T $>$@{OrderedList$<$ T $>$}!insertAt@{insertAt}} +\index{insertAt@{insertAt}!OrderedList$<$ T $>$@{OrderedList$<$ T $>$}} +\doxysubsubsection{\texorpdfstring{insertAt()}{insertAt()}} +{\footnotesize\ttfamily template$<$typename T $>$ \\ +void \mbox{\hyperlink{classOrderedList}{Ordered\+List}}$<$ T $>$\+::insert\+At (\begin{DoxyParamCaption}\item[{T}]{element, }\item[{unsigned}]{index }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [delete]}} + +\begin{DoxyWarning}{Warning} +Function is deleted, use \mbox{\hyperlink{classOrderedList_a1132cd9c92901e9b9950a4a409b0fc8b}{insert()}} instead +\end{DoxyWarning} +\begin{DoxySeeAlso}{See also} +\mbox{\hyperlink{classOrderedList_a1132cd9c92901e9b9950a4a409b0fc8b}{insert()}} +\end{DoxySeeAlso} + + +The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} +\item +src/\+Generic/\+List/\mbox{\hyperlink{OrderedList_8hpp}{Ordered\+List.\+hpp}}\end{DoxyCompactItemize} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classReservation.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/classReservation.tex new file mode 100644 index 0000000..ffe6aaa --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classReservation.tex @@ -0,0 +1,149 @@ +\hypertarget{classReservation}{}\doxysection{Reservation Class Reference} +\label{classReservation}\index{Reservation@{Reservation}} + + +Each Reservations contains a ticket, a password and a note. + + + + +{\ttfamily \#include $<$Reservation.\+h$>$} + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{classReservation_a63b283053695e6f50fa44c50da2b3de5}\label{classReservation_a63b283053695e6f50fa44c50da2b3de5}} +{\bfseries Reservation} () +\begin{DoxyCompactList}\small\item\em Sets ticket as default value and leaves password and note blank. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classReservation_a7320a032f87c7d45cf287a146c73695c}\label{classReservation_a7320a032f87c7d45cf287a146c73695c}} +{\bfseries Reservation} (const \mbox{\hyperlink{classTicket}{Ticket}} \&ticket) +\begin{DoxyCompactList}\small\item\em Sets ticket and leaves password and note blank. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classReservation_ac6fdecd9bc06f3de2e28129ab370f4f7}\label{classReservation_ac6fdecd9bc06f3de2e28129ab370f4f7}} +{\bfseries Reservation} (const \mbox{\hyperlink{classTicket}{Ticket}} \&ticket, const char $\ast$password, const char $\ast$note) +\begin{DoxyCompactList}\small\item\em Sets ticket, password and note. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classReservation_af1b95b3d7c46f506dec4d275d6821cdb}\label{classReservation_af1b95b3d7c46f506dec4d275d6821cdb}} +const \mbox{\hyperlink{classTicket}{Ticket}} \& {\bfseries get\+\_\+ticket} () const +\begin{DoxyCompactList}\small\item\em Returns constant reference to ticket. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classReservation_aa34cd16a057a4a483e569ec5d7527ad9}\label{classReservation_aa34cd16a057a4a483e569ec5d7527ad9}} +const char $\ast$ {\bfseries get\+\_\+password} () const +\begin{DoxyCompactList}\small\item\em Returns constant C-\/style string to password. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classReservation_a2285881510bf07f469bf360bb1050f12}\label{classReservation_a2285881510bf07f469bf360bb1050f12}} +const char $\ast$ {\bfseries get\+\_\+note} () const +\begin{DoxyCompactList}\small\item\em Returns constant C-\/style string to note. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classReservation_a03f0d1a522edb2c5fba7538f0c879573}{read}} (std\+::istream \&istr) +\begin{DoxyCompactList}\small\item\em Reads \mbox{\hyperlink{classReservation}{Reservation}} from stream. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classReservation_a1aba46b8e181750bd89fdfca6ff8ba32}{write}} (std\+::ostream \&ostr) const +\begin{DoxyCompactList}\small\item\em Writes \mbox{\hyperlink{classReservation}{Reservation}} to stream. \end{DoxyCompactList}\item +int \mbox{\hyperlink{classReservation_a31cc66beeaf85befe2185dfc88086d38}{compare}} (const \mbox{\hyperlink{classReservation}{Reservation}} \&other) const +\begin{DoxyCompactList}\small\item\em Compares two Reservations. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Friends} +\begin{DoxyCompactItemize} +\item +std\+::istream \& \mbox{\hyperlink{classReservation_a2b7331e532f77bbc67eab217bfeb1f25}{operator$>$$>$}} (std\+::istream \&istr, \mbox{\hyperlink{classReservation}{Reservation}} \&reservation) +\begin{DoxyCompactList}\small\item\em Reads \mbox{\hyperlink{classReservation}{Reservation}} from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. \end{DoxyCompactList}\item +std\+::ostream \& \mbox{\hyperlink{classReservation_abf734c0a55da55ef89dab1e2f12b8ebd}{operator$<$$<$}} (std\+::ostream \&ostr, const \mbox{\hyperlink{classReservation}{Reservation}} \&reservation) +\begin{DoxyCompactList}\small\item\em Writes \mbox{\hyperlink{classReservation}{Reservation}} to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Each Reservations contains a ticket, a password and a note. + +\doxysubsection{Member Function Documentation} +\mbox{\Hypertarget{classReservation_a31cc66beeaf85befe2185dfc88086d38}\label{classReservation_a31cc66beeaf85befe2185dfc88086d38}} +\index{Reservation@{Reservation}!compare@{compare}} +\index{compare@{compare}!Reservation@{Reservation}} +\doxysubsubsection{\texorpdfstring{compare()}{compare()}} +{\footnotesize\ttfamily int Reservation\+::compare (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classReservation}{Reservation}} \&}]{other }\end{DoxyParamCaption}) const} + + + +Compares two Reservations. + +\begin{DoxyReturn}{Returns} +Compares tickets +\end{DoxyReturn} +\mbox{\Hypertarget{classReservation_a03f0d1a522edb2c5fba7538f0c879573}\label{classReservation_a03f0d1a522edb2c5fba7538f0c879573}} +\index{Reservation@{Reservation}!read@{read}} +\index{read@{read}!Reservation@{Reservation}} +\doxysubsubsection{\texorpdfstring{read()}{read()}} +{\footnotesize\ttfamily void Reservation\+::read (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr }\end{DoxyParamCaption})} + + + +Reads \mbox{\hyperlink{classReservation}{Reservation}} from stream. + + +\begin{DoxyParams}{Parameters} +{\em istr} & An input stream\\ +\hline +\end{DoxyParams} +Directly reads bytes from stream (calls \mbox{\hyperlink{classReservation_a03f0d1a522edb2c5fba7538f0c879573}{read()}} function). Uses ticket\textquotesingle{}s \mbox{\hyperlink{classReservation_a03f0d1a522edb2c5fba7538f0c879573}{read()}} function. + +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ifstream +\end{DoxyNote} +\mbox{\Hypertarget{classReservation_a1aba46b8e181750bd89fdfca6ff8ba32}\label{classReservation_a1aba46b8e181750bd89fdfca6ff8ba32}} +\index{Reservation@{Reservation}!write@{write}} +\index{write@{write}!Reservation@{Reservation}} +\doxysubsubsection{\texorpdfstring{write()}{write()}} +{\footnotesize\ttfamily void Reservation\+::write (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr }\end{DoxyParamCaption}) const} + + + +Writes \mbox{\hyperlink{classReservation}{Reservation}} to stream. + + +\begin{DoxyParams}{Parameters} +{\em ostr} & An output stream\\ +\hline +\end{DoxyParams} +Directly writes bytes to stream (calls \mbox{\hyperlink{classReservation_a1aba46b8e181750bd89fdfca6ff8ba32}{write()}} function). Uses ticket\textquotesingle{}s \mbox{\hyperlink{classReservation_a1aba46b8e181750bd89fdfca6ff8ba32}{write()}} function. + +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ofstream +\end{DoxyNote} + + +\doxysubsection{Friends And Related Function Documentation} +\mbox{\Hypertarget{classReservation_abf734c0a55da55ef89dab1e2f12b8ebd}\label{classReservation_abf734c0a55da55ef89dab1e2f12b8ebd}} +\index{Reservation@{Reservation}!operator$<$$<$@{operator$<$$<$}} +\index{operator$<$$<$@{operator$<$$<$}!Reservation@{Reservation}} +\doxysubsubsection{\texorpdfstring{operator$<$$<$}{operator<<}} +{\footnotesize\ttfamily std\+::ostream \& operator$<$$<$ (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr, }\item[{const \mbox{\hyperlink{classReservation}{Reservation}} \&}]{reservation }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [friend]}} + + + +Writes \mbox{\hyperlink{classReservation}{Reservation}} to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. + +Uses the stream\textquotesingle{}s \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator to write the ticket only. + +\begin{DoxyNote}{Note} +Best used with std\+::cout or text std\+::ofstream +\end{DoxyNote} +\mbox{\Hypertarget{classReservation_a2b7331e532f77bbc67eab217bfeb1f25}\label{classReservation_a2b7331e532f77bbc67eab217bfeb1f25}} +\index{Reservation@{Reservation}!operator$>$$>$@{operator$>$$>$}} +\index{operator$>$$>$@{operator$>$$>$}!Reservation@{Reservation}} +\doxysubsubsection{\texorpdfstring{operator$>$$>$}{operator>>}} +{\footnotesize\ttfamily std\+::istream \& operator$>$$>$ (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr, }\item[{\mbox{\hyperlink{classReservation}{Reservation}} \&}]{reservation }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [friend]}} + + + +Reads \mbox{\hyperlink{classReservation}{Reservation}} from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. + +Uses the stream\textquotesingle{}s \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator to read and parse the ticket. Password and note are left blank. + +\begin{DoxyNote}{Note} +Best used with std\+::cin or text std\+::ifstream +\end{DoxyNote} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +src/\+Models/\mbox{\hyperlink{Reservation_8h}{Reservation.\+h}}\item +src/\+Models/Reservation.\+cpp\end{DoxyCompactItemize} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classString.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/classString.tex new file mode 100644 index 0000000..d0d0396 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classString.tex @@ -0,0 +1,194 @@ +\hypertarget{classString}{}\doxysection{String Class Reference} +\label{classString}\index{String@{String}} +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{classString_ad3d65397e27bb3c4db1295208cfb1559}{String}} (unsigned length) +\begin{DoxyCompactList}\small\item\em The underlying array is allocated with length (+ 1) size. \end{DoxyCompactList}\item +\mbox{\hyperlink{classString_a3fba40cf6cb11735ffddc355a5ff68f4}{String}} (const char $\ast$str) +\begin{DoxyCompactList}\small\item\em Copies str. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classString_a3d7f953737f3d4dca72d1cc4836f7dcc}\label{classString_a3d7f953737f3d4dca72d1cc4836f7dcc}} +const char $\ast$ {\bfseries get\+\_\+cstr} () const +\begin{DoxyCompactList}\small\item\em Returns internal C-\/style string. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classString_a7793a7e9a7601d4c724dcc85566259bf}\label{classString_a7793a7e9a7601d4c724dcc85566259bf}} +unsigned {\bfseries get\+\_\+length} () const +\begin{DoxyCompactList}\small\item\em Returns number of characters in string. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classString_a5d3b77a51619a8580a373d2cd1092a54}\label{classString_a5d3b77a51619a8580a373d2cd1092a54}} +char \& {\bfseries operator\mbox{[}$\,$\mbox{]}} (unsigned index) +\begin{DoxyCompactList}\small\item\em Returns a character reference (from the underlying C-\/style string) at the given index. \end{DoxyCompactList}\item +\mbox{\hyperlink{classString}{String}} \& \mbox{\hyperlink{classString_a64de9ab1af5df9397f8fbd8c79d5f4b6}{operator+=}} (const char $\ast$str) +\begin{DoxyCompactList}\small\item\em Appends a C-\/style string. \end{DoxyCompactList}\item +\mbox{\hyperlink{classString}{String}} \& \mbox{\hyperlink{classString_aed8480111703abc1f281148c778b0445}{operator+=}} (unsigned number) +\begin{DoxyCompactList}\small\item\em Appends a number. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classString_afc158dffcdf56e601bd640cbacdfcd3c}\label{classString_afc158dffcdf56e601bd640cbacdfcd3c}} +{\bfseries String} (const \mbox{\hyperlink{classString}{String}} \&other) +\item +\mbox{\Hypertarget{classString_a734f34a0b7a42bcad30c368d6e8c5469}\label{classString_a734f34a0b7a42bcad30c368d6e8c5469}} +\mbox{\hyperlink{classString}{String}} \& {\bfseries operator=} (const \mbox{\hyperlink{classString}{String}} \&other) +\item +\mbox{\Hypertarget{classString_a553fcc11563b3d0f5c020309e8b68843}\label{classString_a553fcc11563b3d0f5c020309e8b68843}} +{\bfseries String} (\mbox{\hyperlink{classString}{String}} \&\&other) +\item +\mbox{\Hypertarget{classString_a3c0ede83ee25c89959a0c4369166d98a}\label{classString_a3c0ede83ee25c89959a0c4369166d98a}} +\mbox{\hyperlink{classString}{String}} \& {\bfseries operator=} (\mbox{\hyperlink{classString}{String}} \&\&other) +\item +void \mbox{\hyperlink{classString_ad76bb9eca15651c67332808cdaad6344}{read}} (std\+::istream \&istr) +\begin{DoxyCompactList}\small\item\em Reads \mbox{\hyperlink{classString}{String}} from stream. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classString_a7b0ea809587c21bc1d2b87bfee53e628}{write}} (std\+::ostream \&ostr) const +\begin{DoxyCompactList}\small\item\em Writes \mbox{\hyperlink{classString}{String}} to stream. \end{DoxyCompactList}\item +int \mbox{\hyperlink{classString_a3f420d69fbe3de91711dc69148d23cc7}{compare}} (const \mbox{\hyperlink{classString}{String}} \&other) const +\begin{DoxyCompactList}\small\item\em Compares two strings. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Friends} +\begin{DoxyCompactItemize} +\item +std\+::istream \& \mbox{\hyperlink{classString_a1918adea635f3f340dbecd6fb05341f8}{operator$>$$>$}} (std\+::istream \&istr, \mbox{\hyperlink{classString}{String}} \&event) +\begin{DoxyCompactList}\small\item\em Reads \mbox{\hyperlink{classString}{String}} from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. \end{DoxyCompactList}\item +std\+::ostream \& \mbox{\hyperlink{classString_aa00d824f40064ff356aa7c15d6a9da12}{operator$<$$<$}} (std\+::ostream \&ostr, const \mbox{\hyperlink{classString}{String}} \&event) +\begin{DoxyCompactList}\small\item\em Writes \mbox{\hyperlink{classString}{String}} to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Constructor \& Destructor Documentation} +\mbox{\Hypertarget{classString_ad3d65397e27bb3c4db1295208cfb1559}\label{classString_ad3d65397e27bb3c4db1295208cfb1559}} +\index{String@{String}!String@{String}} +\index{String@{String}!String@{String}} +\doxysubsubsection{\texorpdfstring{String()}{String()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} +{\footnotesize\ttfamily String\+::\+String (\begin{DoxyParamCaption}\item[{unsigned}]{length }\end{DoxyParamCaption})} + + + +The underlying array is allocated with length (+ 1) size. + +Allocated with length + 1 size, so there is a terminating zero at the end. \mbox{\Hypertarget{classString_a3fba40cf6cb11735ffddc355a5ff68f4}\label{classString_a3fba40cf6cb11735ffddc355a5ff68f4}} +\index{String@{String}!String@{String}} +\index{String@{String}!String@{String}} +\doxysubsubsection{\texorpdfstring{String()}{String()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} +{\footnotesize\ttfamily String\+::\+String (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str }\end{DoxyParamCaption})} + + + +Copies str. + +\textbackslash{}params str C-\/style string + +\doxysubsection{Member Function Documentation} +\mbox{\Hypertarget{classString_a3f420d69fbe3de91711dc69148d23cc7}\label{classString_a3f420d69fbe3de91711dc69148d23cc7}} +\index{String@{String}!compare@{compare}} +\index{compare@{compare}!String@{String}} +\doxysubsubsection{\texorpdfstring{compare()}{compare()}} +{\footnotesize\ttfamily int String\+::compare (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classString}{String}} \&}]{other }\end{DoxyParamCaption}) const} + + + +Compares two strings. + +\textbackslash{}params other C-\/style string \begin{DoxyReturn}{Returns} +strcmp between underlying C-\/style string and \char`\"{}other\char`\"{} +\end{DoxyReturn} +\mbox{\Hypertarget{classString_a64de9ab1af5df9397f8fbd8c79d5f4b6}\label{classString_a64de9ab1af5df9397f8fbd8c79d5f4b6}} +\index{String@{String}!operator+=@{operator+=}} +\index{operator+=@{operator+=}!String@{String}} +\doxysubsubsection{\texorpdfstring{operator+=()}{operator+=()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} +{\footnotesize\ttfamily \mbox{\hyperlink{classString}{String}} \& String\+::operator+= (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str }\end{DoxyParamCaption})} + + + +Appends a C-\/style string. + +\textbackslash{}params str C-\/style string \mbox{\Hypertarget{classString_aed8480111703abc1f281148c778b0445}\label{classString_aed8480111703abc1f281148c778b0445}} +\index{String@{String}!operator+=@{operator+=}} +\index{operator+=@{operator+=}!String@{String}} +\doxysubsubsection{\texorpdfstring{operator+=()}{operator+=()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} +{\footnotesize\ttfamily \mbox{\hyperlink{classString}{String}} \& String\+::operator+= (\begin{DoxyParamCaption}\item[{unsigned}]{number }\end{DoxyParamCaption})} + + + +Appends a number. + +Converts the number to a C-\/style string and then uses += to append it. \mbox{\Hypertarget{classString_ad76bb9eca15651c67332808cdaad6344}\label{classString_ad76bb9eca15651c67332808cdaad6344}} +\index{String@{String}!read@{read}} +\index{read@{read}!String@{String}} +\doxysubsubsection{\texorpdfstring{read()}{read()}} +{\footnotesize\ttfamily void String\+::read (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr }\end{DoxyParamCaption})} + + + +Reads \mbox{\hyperlink{classString}{String}} from stream. + + +\begin{DoxyParams}{Parameters} +{\em istr} & An input stream\\ +\hline +\end{DoxyParams} +Directly reads bytes from stream (calls \mbox{\hyperlink{classString_ad76bb9eca15651c67332808cdaad6344}{read()}} function). First reads the string length, then the underlying C-\/style string (including terminating zero). + +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ifstream +\end{DoxyNote} +\mbox{\Hypertarget{classString_a7b0ea809587c21bc1d2b87bfee53e628}\label{classString_a7b0ea809587c21bc1d2b87bfee53e628}} +\index{String@{String}!write@{write}} +\index{write@{write}!String@{String}} +\doxysubsubsection{\texorpdfstring{write()}{write()}} +{\footnotesize\ttfamily void String\+::write (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr }\end{DoxyParamCaption}) const} + + + +Writes \mbox{\hyperlink{classString}{String}} to stream. + + +\begin{DoxyParams}{Parameters} +{\em ostr} & An output stream\\ +\hline +\end{DoxyParams} +Directly writes bytes to stream (calls \mbox{\hyperlink{classString_a7b0ea809587c21bc1d2b87bfee53e628}{write()}} function). First writes the string length, then the underlying C-\/style string (including terminating zero). + +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ofstream +\end{DoxyNote} + + +\doxysubsection{Friends And Related Function Documentation} +\mbox{\Hypertarget{classString_aa00d824f40064ff356aa7c15d6a9da12}\label{classString_aa00d824f40064ff356aa7c15d6a9da12}} +\index{String@{String}!operator$<$$<$@{operator$<$$<$}} +\index{operator$<$$<$@{operator$<$$<$}!String@{String}} +\doxysubsubsection{\texorpdfstring{operator$<$$<$}{operator<<}} +{\footnotesize\ttfamily std\+::ostream \& operator$<$$<$ (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr, }\item[{const \mbox{\hyperlink{classString}{String}} \&}]{event }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [friend]}} + + + +Writes \mbox{\hyperlink{classString}{String}} to stream with \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator. + +Uses the stream\textquotesingle{}s \texorpdfstring{$<$}{<}\texorpdfstring{$<$}{<} operator to write the underlying C-\/style string + +\begin{DoxyNote}{Note} +Best used with std\+::cout or text std\+::ofstream +\end{DoxyNote} +\mbox{\Hypertarget{classString_a1918adea635f3f340dbecd6fb05341f8}\label{classString_a1918adea635f3f340dbecd6fb05341f8}} +\index{String@{String}!operator$>$$>$@{operator$>$$>$}} +\index{operator$>$$>$@{operator$>$$>$}!String@{String}} +\doxysubsubsection{\texorpdfstring{operator$>$$>$}{operator>>}} +{\footnotesize\ttfamily std\+::istream \& operator$>$$>$ (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr, }\item[{\mbox{\hyperlink{classString}{String}} \&}]{event }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [friend]}} + + + +Reads \mbox{\hyperlink{classString}{String}} from stream with \texorpdfstring{$>$}{>}\texorpdfstring{$>$}{>} operator. + +Uses the stream\textquotesingle{}s getline function to read the data. + +\begin{DoxyWarning}{Warning} +It takes at most 1024 characters from the stream! +\end{DoxyWarning} +\begin{DoxyNote}{Note} +Best used with std\+::cin or text std\+::ifstream +\end{DoxyNote} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +src/\+Generic/\+String/\mbox{\hyperlink{String_8h}{String.\+h}}\item +src/\+Generic/\+String/String.\+cpp\end{DoxyCompactItemize} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/classTicket.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/classTicket.tex new file mode 100644 index 0000000..69d709f --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/classTicket.tex @@ -0,0 +1,103 @@ +\hypertarget{classTicket}{}\doxysection{Ticket Class Reference} +\label{classTicket}\index{Ticket@{Ticket}} + + +Each \mbox{\hyperlink{classTicket}{Ticket}} contains a row and a seat number. + + + + +{\ttfamily \#include $<$Ticket.\+h$>$} + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\Hypertarget{classTicket_aba3a46c9223efb6ab0bde93a09403537}\label{classTicket_aba3a46c9223efb6ab0bde93a09403537}} +{\bfseries Ticket} () +\begin{DoxyCompactList}\small\item\em Sets row and seat to zeroes. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classTicket_a6fa09371f1b70520b96dbb9ac9a71768}\label{classTicket_a6fa09371f1b70520b96dbb9ac9a71768}} +{\bfseries Ticket} (unsigned row, unsigned seat) +\begin{DoxyCompactList}\small\item\em Sets row and seat. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classTicket_a94476de3cd6711185527d0fe4df9a278}\label{classTicket_a94476de3cd6711185527d0fe4df9a278}} +unsigned {\bfseries get\+\_\+row} () const +\begin{DoxyCompactList}\small\item\em Returns row. \end{DoxyCompactList}\item +\mbox{\Hypertarget{classTicket_af7b64cb77a676d0f7bdb32255283f005}\label{classTicket_af7b64cb77a676d0f7bdb32255283f005}} +unsigned {\bfseries get\+\_\+seat} () const +\begin{DoxyCompactList}\small\item\em Returns seat. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classTicket_aad2d0b7b92b54ec861db92c31f50f4ad}{read}} (std\+::istream \&istr) +\begin{DoxyCompactList}\small\item\em Reads \mbox{\hyperlink{classTicket}{Ticket}} from stram. \end{DoxyCompactList}\item +void \mbox{\hyperlink{classTicket_a584a11f6236fc96f3bdbd0592d3f60f4}{write}} (std\+::ostream \&ostr) const +\begin{DoxyCompactList}\small\item\em Writes \mbox{\hyperlink{classTicket}{Ticket}} to stream. \end{DoxyCompactList}\item +int \mbox{\hyperlink{classTicket_a82a063f71be89f44dd969970855187c4}{compare}} (const \mbox{\hyperlink{classTicket}{Ticket}} \&other) const +\begin{DoxyCompactList}\small\item\em Compares two Tickets. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Each \mbox{\hyperlink{classTicket}{Ticket}} contains a row and a seat number. + +\doxysubsection{Member Function Documentation} +\mbox{\Hypertarget{classTicket_a82a063f71be89f44dd969970855187c4}\label{classTicket_a82a063f71be89f44dd969970855187c4}} +\index{Ticket@{Ticket}!compare@{compare}} +\index{compare@{compare}!Ticket@{Ticket}} +\doxysubsubsection{\texorpdfstring{compare()}{compare()}} +{\footnotesize\ttfamily int Ticket\+::compare (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classTicket}{Ticket}} \&}]{other }\end{DoxyParamCaption}) const} + + + +Compares two Tickets. + +\begin{DoxyReturn}{Returns} +If rows are equal, -\/1 if seat \texorpdfstring{$<$}{<} other.\+seat, 1 if seat \texorpdfstring{$>$}{>} other.\+seat, 0 if seat == other.\+seat, else the same, but for rows +\end{DoxyReturn} +\mbox{\Hypertarget{classTicket_aad2d0b7b92b54ec861db92c31f50f4ad}\label{classTicket_aad2d0b7b92b54ec861db92c31f50f4ad}} +\index{Ticket@{Ticket}!read@{read}} +\index{read@{read}!Ticket@{Ticket}} +\doxysubsubsection{\texorpdfstring{read()}{read()}} +{\footnotesize\ttfamily void Ticket\+::read (\begin{DoxyParamCaption}\item[{std\+::istream \&}]{istr }\end{DoxyParamCaption})} + + + +Reads \mbox{\hyperlink{classTicket}{Ticket}} from stram. + + +\begin{DoxyParams}{Parameters} +{\em istr} & An input stream\\ +\hline +\end{DoxyParams} +Directly reads bytes from stream (calls \mbox{\hyperlink{classTicket_aad2d0b7b92b54ec861db92c31f50f4ad}{read()}} function). + +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ifstream +\end{DoxyNote} +\mbox{\Hypertarget{classTicket_a584a11f6236fc96f3bdbd0592d3f60f4}\label{classTicket_a584a11f6236fc96f3bdbd0592d3f60f4}} +\index{Ticket@{Ticket}!write@{write}} +\index{write@{write}!Ticket@{Ticket}} +\doxysubsubsection{\texorpdfstring{write()}{write()}} +{\footnotesize\ttfamily void Ticket\+::write (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{ostr }\end{DoxyParamCaption}) const} + + + +Writes \mbox{\hyperlink{classTicket}{Ticket}} to stream. + + +\begin{DoxyParams}{Parameters} +{\em ostr} & An output stream\\ +\hline +\end{DoxyParams} +Directly writes bytes to stream (calls \mbox{\hyperlink{classTicket_a584a11f6236fc96f3bdbd0592d3f60f4}{write()}} function). + +\begin{DoxyRemark}{Remarks} +Doesn\textquotesingle{}t alter the stream in any other way. +\end{DoxyRemark} +\begin{DoxyNote}{Note} +Best used with binary ofstream +\end{DoxyNote} + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +src/\+Models/\mbox{\hyperlink{Ticket_8h}{Ticket.\+h}}\item +src/\+Models/Ticket.\+cpp\end{DoxyCompactItemize} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/doxygen.sty b/Year 1/Object-oriented Programming/Project 1/docs/latex/doxygen.sty new file mode 100644 index 0000000..7e01991 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/doxygen.sty @@ -0,0 +1,601 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{doxygen} + +% Packages used by this style file +\RequirePackage{alltt} +%%\RequirePackage{array} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package +\RequirePackage{calc} +\RequirePackage{float} +%%\RequirePackage{ifthen} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package +\RequirePackage{verbatim} +\RequirePackage[table]{xcolor} +\RequirePackage{longtable_doxygen} +\RequirePackage{tabu_doxygen} +\RequirePackage{fancyvrb} +\RequirePackage{tabularx} +\RequirePackage{multicol} +\RequirePackage{multirow} +\RequirePackage{hanging} +\RequirePackage{ifpdf} +\RequirePackage{adjustbox} +\RequirePackage{amssymb} +\RequirePackage{stackengine} +\RequirePackage{enumitem} +\RequirePackage{alphalph} +\RequirePackage[normalem]{ulem} % for strikeout, but don't modify emphasis +\RequirePackage{enumitem} + +%---------- Internal commands used in this style file ---------------- + +\newcommand{\ensurespace}[1]{% + \begingroup% + \setlength{\dimen@}{#1}% + \vskip\z@\@plus\dimen@% + \penalty -100\vskip\z@\@plus -\dimen@% + \vskip\dimen@% + \penalty 9999% + \vskip -\dimen@% + \vskip\z@skip% hide the previous |\vskip| from |\addvspace| + \endgroup% +} + +\newcommand{\DoxyHorRuler}[1]{% + \setlength{\parskip}{0ex plus 0ex minus 0ex}% + \ifthenelse{#1=0}% + {% + \hrule% + }% + {% + \hrulefilll% + }% +} +\newcommand{\DoxyLabelFont}{} +\newcommand{\entrylabel}[1]{% + {% + \parbox[b]{\labelwidth-4pt}{% + \makebox[0pt][l]{\DoxyLabelFont#1}% + \vspace{1.5\baselineskip}% + }% + }% +} + +\newenvironment{DoxyDesc}[1]{% + \ensurespace{4\baselineskip}% + \begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + %\setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + }% + \item[#1]% +}{% + \end{list}% +} + +\newsavebox{\xrefbox} +\newlength{\xreflength} +\newcommand{\xreflabel}[1]{% + \sbox{\xrefbox}{#1}% + \setlength{\xreflength}{\wd\xrefbox}% + \ifthenelse{\xreflength>\labelwidth}{% + \begin{minipage}{\textwidth}% + \setlength{\parindent}{0pt}% + \hangindent=15pt\bfseries #1\vspace{1.2\itemsep}% + \end{minipage}% + }{% + \parbox[b]{\labelwidth}{\makebox[0pt][l]{\textbf{#1}}}% + }% +} + +%---------- Commands used by doxygen LaTeX output generator ---------- + +% Used by <pre> ... </pre> +\newenvironment{DoxyPre}{% + \small% + \begin{alltt}% +}{% + \end{alltt}% + \normalsize% +} +% Necessary for redefining not defined characters, i.e. "Replacement Character" in tex output. +\newlength{\CodeWidthChar} +\newlength{\CodeHeightChar} +\settowidth{\CodeWidthChar}{?} +\settoheight{\CodeHeightChar}{?} +% Necessary for hanging indent +\newlength{\DoxyCodeWidth} + +\newcommand\DoxyCodeLine[1]{\hangpara{\DoxyCodeWidth}{1}{#1}\par} + +\newcommand\NiceSpace{% + \discretionary{}{\kern\fontdimen2\font}{\kern\fontdimen2\font}% +} + +% Used by @code ... @endcode +\newenvironment{DoxyCode}[1]{% + \par% + \scriptsize% + \normalfont\ttfamily% + \rightskip0pt plus 1fil% + \settowidth{\DoxyCodeWidth}{000000}% + \settowidth{\CodeWidthChar}{?}% + \settoheight{\CodeHeightChar}{?}% + \setlength{\parskip}{0ex plus 0ex minus 0ex}% + \ifthenelse{\equal{#1}{0}} + { + {\lccode`~32 \lowercase{\global\let~}\NiceSpace}\obeyspaces% + } + { + {\lccode`~32 \lowercase{\global\let~}}\obeyspaces% + } + +}{% + \normalfont% + \normalsize% + \settowidth{\CodeWidthChar}{?}% + \settoheight{\CodeHeightChar}{?}% +} + +% Redefining not defined characters, i.e. "Replacement Character" in tex output. +\def\ucr{\adjustbox{width=\CodeWidthChar,height=\CodeHeightChar}{\stackinset{c}{}{c}{-.2pt}{% + \textcolor{white}{\sffamily\bfseries\small ?}}{% + \rotatebox{45}{$\blacksquare$}}}} + +% Used by @example, @include, @includelineno and @dontinclude +\newenvironment{DoxyCodeInclude}[1]{% + \DoxyCode{#1}% +}{% + \endDoxyCode% +} + +% Used by @verbatim ... @endverbatim +\newenvironment{DoxyVerb}{% + \footnotesize% + \verbatim% +}{% + \endverbatim% + \normalsize% +} + +% Used by @verbinclude +\newenvironment{DoxyVerbInclude}{% + \DoxyVerb% +}{% + \endDoxyVerb% +} + +% Used by numbered lists (using '-#' or <ol> ... </ol>) +\setlistdepth{12} +\newlist{DoxyEnumerate}{enumerate}{12} +\setlist[DoxyEnumerate,1]{label=\arabic*.} +\setlist[DoxyEnumerate,2]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,3]{label=\roman*.} +\setlist[DoxyEnumerate,4]{label=\enumAlphAlphcnt*.} +\setlist[DoxyEnumerate,5]{label=\arabic*.} +\setlist[DoxyEnumerate,6]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,7]{label=\roman*.} +\setlist[DoxyEnumerate,8]{label=\enumAlphAlphcnt*.} +\setlist[DoxyEnumerate,9]{label=\arabic*.} +\setlist[DoxyEnumerate,10]{label=(\enumalphalphcnt*)} +\setlist[DoxyEnumerate,11]{label=\roman*.} +\setlist[DoxyEnumerate,12]{label=\enumAlphAlphcnt*.} + +% Used by bullet lists (using '-', @li, @arg, or <ul> ... </ul>) +\setlistdepth{12} +\newlist{DoxyItemize}{itemize}{12} +\setlist[DoxyItemize]{label=\textperiodcentered} + +\setlist[DoxyItemize,1]{label=\textbullet} +\setlist[DoxyItemize,2]{label=\normalfont\bfseries \textendash} +\setlist[DoxyItemize,3]{label=\textasteriskcentered} +\setlist[DoxyItemize,4]{label=\textperiodcentered} + +% Used by description lists (using <dl> ... </dl>) +\newenvironment{DoxyDescription}{% + \description% +}{% + \enddescription% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if caption is specified) +\newenvironment{DoxyImage}{% + \begin{figure}[H]% + \centering% +}{% + \end{figure}% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if no caption is specified) +\newenvironment{DoxyImageNoCaption}{% + \begin{center}% +}{% + \end{center}% +} + +% Used by @image +% (only if inline is specified) +\newenvironment{DoxyInlineImage}{% +}{% +} + +% Used by @attention +\newenvironment{DoxyAttention}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @author and @authors +\newenvironment{DoxyAuthor}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @date +\newenvironment{DoxyDate}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @invariant +\newenvironment{DoxyInvariant}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @note +\newenvironment{DoxyNote}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @post +\newenvironment{DoxyPostcond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @pre +\newenvironment{DoxyPrecond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @copyright +\newenvironment{DoxyCopyright}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @remark +\newenvironment{DoxyRemark}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @return and @returns +\newenvironment{DoxyReturn}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @since +\newenvironment{DoxySince}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @see +\newenvironment{DoxySeeAlso}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @version +\newenvironment{DoxyVersion}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @warning +\newenvironment{DoxyWarning}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @internal +\newenvironment{DoxyInternal}[1]{% + \paragraph*{#1}% +}{% +} + +% Used by @par and @paragraph +\newenvironment{DoxyParagraph}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by parameter lists +\newenvironment{DoxyParams}[2][]{% + \tabulinesep=1mm% + \par% + \ifthenelse{\equal{#1}{}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description + {\ifthenelse{\equal{#1}{1}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc + } + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for fields of simple structs +\newenvironment{DoxyFields}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|X[-1,l]|}% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for fields simple class style enums +\newenvironment{DoxyEnumFields}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for parameters within a detailed function description +\newenvironment{DoxyParamCaption}{% + \renewcommand{\item}[2][]{\\ \hspace*{2.0cm} ##1 {\em ##2}}% +}{% +} + +% Used by return value lists +\newenvironment{DoxyRetVals}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used by exception lists +\newenvironment{DoxyExceptions}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used by template parameter lists +\newenvironment{DoxyTemplParams}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for member lists +\newenvironment{DoxyCompactItemize}{% + \begin{itemize}% + \setlength{\itemsep}{-3pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \setlength{\partopsep}{0pt}% +}{% + \end{itemize}% +} + +% Used for member descriptions +\newenvironment{DoxyCompactList}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + \setlength{\itemsep}{0pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \renewcommand{\makelabel}{\hfill}% + }% +}{% + \end{list}% +} + +% Used for reference lists (@bug, @deprecated, @todo, etc.) +\newenvironment{DoxyRefList}{% + \begin{list}{}{% + \setlength{\labelwidth}{10pt}% + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}% + \renewcommand{\makelabel}{\xreflabel}% + }% +}{% + \end{list}% +} + +% Used by @bug, @deprecated, @todo, etc. +\newenvironment{DoxyRefDesc}[1]{% + \begin{list}{}{% + \renewcommand\makelabel[1]{\textbf{##1}}% + \settowidth\labelwidth{\makelabel{#1}}% + \setlength\leftmargin{\labelwidth+\labelsep}% + }% +}{% + \end{list}% +} + +% Used by parameter lists and simple sections +\newenvironment{Desc} +{\begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + \setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + } +}{% + \end{list}% +} + +% Used by tables +\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}% +\newenvironment{TabularC}[1]% +{\tabulinesep=1mm +\begin{longtabu*}spread 0pt [c]{*#1{|X[-1]}|}}% +{\end{longtabu*}\par}% + +\newenvironment{TabularNC}[1]% +{\begin{tabu}spread 0pt [l]{*#1{|X[-1]}|}}% +{\end{tabu}\par}% + +% Used for member group headers +\newenvironment{Indent}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + }% + \item[]\ignorespaces% +}{% + \unskip% + \end{list}% +} + +% Used when hyperlinks are turned off +\newcommand{\doxyref}[3]{% + \textbf{#1} (\textnormal{#2}\,\pageref{#3})% +} + +% Used to link to a table when hyperlinks are turned on +\newcommand{\doxytablelink}[2]{% + \ref{#1}% +} + +% Used to link to a table when hyperlinks are turned off +\newcommand{\doxytableref}[3]{% + \ref{#3}% +} + +% Used by @addindex +\newcommand{\lcurly}{\{} +\newcommand{\rcurly}{\}} + +% Colors used for syntax highlighting +\definecolor{comment}{rgb}{0.5,0.0,0.0} +\definecolor{keyword}{rgb}{0.0,0.5,0.0} +\definecolor{keywordtype}{rgb}{0.38,0.25,0.125} +\definecolor{keywordflow}{rgb}{0.88,0.5,0.0} +\definecolor{preprocessor}{rgb}{0.5,0.38,0.125} +\definecolor{stringliteral}{rgb}{0.0,0.125,0.25} +\definecolor{charliteral}{rgb}{0.0,0.5,0.5} +\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0} +\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43} +\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0} +\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0} + +% Color used for table heading +\newcommand{\tableheadbgcolor}{lightgray}% + +% Version of hypertarget with correct landing location +\newcommand{\Hypertarget}[1]{\Hy@raisedlink{\hypertarget{#1}{}}} + +% possibility to have sections etc. be within the margins +% unfortunately had to copy part of book.cls and add \raggedright +\makeatletter +\newcommand\doxysection{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\raggedright\normalfont\Large\bfseries}} +\newcommand\doxysubsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\large\bfseries}} +\newcommand\doxysubsubsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxyparagraph{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus1ex \@minus.2ex}% + {-1em}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubparagraph{\@startsection{subparagraph}{5}{\parindent}% + {3.25ex \@plus1ex \@minus .2ex}% + {-1em}% + {\raggedright\normalfont\normalsize\bfseries}} +\makeatother +% Define caption that is also suitable in a table +\makeatletter +\def\doxyfigcaption{% +\H@refstepcounter{figure}% +\@dblarg{\@caption{figure}}} +\makeatother + +% Define alpha enumarative names for counters > 26 +\makeatletter +\def\enumalphalphcnt#1{\expandafter\@enumalphalphcnt\csname c@#1\endcsname} +\def\@enumalphalphcnt#1{\alphalph{#1}} +\def\enumAlphAlphcnt#1{\expandafter\@enumAlphAlphcnt\csname c@#1\endcsname} +\def\@enumAlphAlphcnt#1{\AlphAlph{#1}} +\makeatother +\AddEnumerateCounter{\enumalphalphcnt}{\@enumalphalphcnt}{aa} +\AddEnumerateCounter{\enumAlphAlphcnt}{\@enumAlphAlphcnt}{AA} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/files.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/files.tex new file mode 100644 index 0000000..42bfeb7 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/files.tex @@ -0,0 +1,19 @@ +\doxysection{File List} +Here is a list of all documented files with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{src/\mbox{\hyperlink{main_8cpp}{main.\+cpp}} \\*Entry point for application }{\pageref{main_8cpp}}{} +\item\contentsline{section}{src/\+Generic/\+Console\+Interface/\mbox{\hyperlink{Command_8h}{Command.\+h}} \\*Stores the declaration of class \mbox{\hyperlink{classCommand}{Command}} }{\pageref{Command_8h}}{} +\item\contentsline{section}{src/\+Generic/\+Console\+Interface/\mbox{\hyperlink{Menu_8h}{Menu.\+h}} \\*Stores the declaration of class \mbox{\hyperlink{classMenu}{Menu}} }{\pageref{Menu_8h}}{} +\item\contentsline{section}{src/\+Generic/\+Console\+Interface/\mbox{\hyperlink{Toolbox_8hpp}{Toolbox.\+hpp}} \\*Stores a wide range of functions for simpler/more automated printing }{\pageref{Toolbox_8hpp}}{} +\item\contentsline{section}{src/\+Generic/\+Date/\mbox{\hyperlink{Date_8h}{Date.\+h}} \\*Stores the declaration of class \mbox{\hyperlink{classDate}{Date}} }{\pageref{Date_8h}}{} +\item\contentsline{section}{src/\+Generic/\+List/\mbox{\hyperlink{List_8hpp}{List.\+hpp}} \\*Stores declaration and definition of templated class \mbox{\hyperlink{classList}{List}} }{\pageref{List_8hpp}}{} +\item\contentsline{section}{src/\+Generic/\+List/\mbox{\hyperlink{OrderedList_8hpp}{Ordered\+List.\+hpp}} \\*Stores declaration and definition of templated class \mbox{\hyperlink{classOrderedList}{Ordered\+List}} }{\pageref{OrderedList_8hpp}}{} +\item\contentsline{section}{src/\+Generic/\+String/\mbox{\hyperlink{String_8h}{String.\+h}} \\*Stores declaration of class \mbox{\hyperlink{classString}{String}} }{\pageref{String_8h}}{} +\item\contentsline{section}{src/\+Models/\mbox{\hyperlink{Event_8h}{Event.\+h}} \\*Stores the declaration of class \mbox{\hyperlink{classEvent}{Event}} }{\pageref{Event_8h}}{} +\item\contentsline{section}{src/\+Models/\mbox{\hyperlink{Hall_8h}{Hall.\+h}} \\*Stores the declaration of class \mbox{\hyperlink{classHall}{Hall}} }{\pageref{Hall_8h}}{} +\item\contentsline{section}{src/\+Models/\mbox{\hyperlink{Reservation_8h}{Reservation.\+h}} \\*Stores the declaration of class \mbox{\hyperlink{classReservation}{Reservation}} }{\pageref{Reservation_8h}}{} +\item\contentsline{section}{src/\+Models/\mbox{\hyperlink{Ticket_8h}{Ticket.\+h}} \\*Stores the declaration of class \mbox{\hyperlink{classTicket}{Ticket}} }{\pageref{Ticket_8h}}{} +\item\contentsline{section}{src/\+Services/\mbox{\hyperlink{EventService_8h}{Event\+Service.\+h}} \\*Stores the declaration of class \mbox{\hyperlink{classEventService}{Event\+Service}} }{\pageref{EventService_8h}}{} +\item\contentsline{section}{src/\+Services/\mbox{\hyperlink{HallService_8h}{Hall\+Service.\+h}} \\*Stores the declaration of class \mbox{\hyperlink{classHallService}{Hall\+Service}} }{\pageref{HallService_8h}}{} +\item\contentsline{section}{src/\+Services/\mbox{\hyperlink{StatusCode_8h}{Status\+Code.\+h}} \\*Stores declaration of enum Status\+Code }{\pageref{StatusCode_8h}}{} +\item\contentsline{section}{src/\+User\+Interface/\mbox{\hyperlink{FMITicketSystemConsoleUI_8h}{FMITicket\+System\+Console\+UI.\+h}} \\*Stores declaration of run\+UI function }{\pageref{FMITicketSystemConsoleUI_8h}}{} +\end{DoxyCompactList} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/hierarchy.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/hierarchy.tex new file mode 100644 index 0000000..822760c --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/hierarchy.tex @@ -0,0 +1,34 @@ +\doxysection{Class Hierarchy} +This inheritance list is sorted roughly, but not completely, alphabetically\+:\begin{DoxyCompactList} +\item \contentsline{section}{Command}{\pageref{classCommand}}{} +\item \contentsline{section}{Date}{\pageref{classDate}}{} +\item \contentsline{section}{Event}{\pageref{classEvent}}{} +\item \contentsline{section}{Event\+Service}{\pageref{classEventService}}{} +\item \contentsline{section}{Hall}{\pageref{classHall}}{} +\item \contentsline{section}{Hall\+Service}{\pageref{classHallService}}{} +\item \contentsline{section}{List\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}}{\pageref{classList}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Ordered\+List\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}}{\pageref{classOrderedList}}{} +\end{DoxyCompactList} +\item \contentsline{section}{List\texorpdfstring{$<$}{<} Command \texorpdfstring{$>$}{>}}{\pageref{classList}}{} +\item \contentsline{section}{List\texorpdfstring{$<$}{<} Event \texorpdfstring{$>$}{>}}{\pageref{classList}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Ordered\+List\texorpdfstring{$<$}{<} Event \texorpdfstring{$>$}{>}}{\pageref{classOrderedList}}{} +\end{DoxyCompactList} +\item \contentsline{section}{List\texorpdfstring{$<$}{<} Hall \texorpdfstring{$>$}{>}}{\pageref{classList}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Ordered\+List\texorpdfstring{$<$}{<} Hall \texorpdfstring{$>$}{>}}{\pageref{classOrderedList}}{} +\end{DoxyCompactList} +\item \contentsline{section}{List\texorpdfstring{$<$}{<} Reservation \texorpdfstring{$>$}{>}}{\pageref{classList}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Ordered\+List\texorpdfstring{$<$}{<} Reservation \texorpdfstring{$>$}{>}}{\pageref{classOrderedList}}{} +\end{DoxyCompactList} +\item \contentsline{section}{List\texorpdfstring{$<$}{<} Ticket \texorpdfstring{$>$}{>}}{\pageref{classList}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Ordered\+List\texorpdfstring{$<$}{<} Ticket \texorpdfstring{$>$}{>}}{\pageref{classOrderedList}}{} +\end{DoxyCompactList} +\item \contentsline{section}{Menu}{\pageref{classMenu}}{} +\item \contentsline{section}{Reservation}{\pageref{classReservation}}{} +\item \contentsline{section}{String}{\pageref{classString}}{} +\item \contentsline{section}{Ticket}{\pageref{classTicket}}{} +\end{DoxyCompactList} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/index.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/index.tex new file mode 100644 index 0000000..7552a6f --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/index.tex @@ -0,0 +1,62 @@ +\label{index_mainpage}% +\Hypertarget{index_mainpage}% + \begin{DoxyAuthor}{Author} +Kamen Mladenov; FMI Computer Science, Year 1, Group 6; Project 1, Topic 4 +\end{DoxyAuthor} +\begin{DoxyDate}{Date} +12 May 2022 +\end{DoxyDate} +\begin{DoxyCopyright}{Copyright} +GNU General Public License v3.\+0 +\end{DoxyCopyright} + +\begin{DoxyDescription} +\item[Source Code ]\href{https://github.com/Syndamia/FMI-OOP-P1_TicketSystem}{\texttt{ https\+://github.\+com/\+Syndamia/\+FMI-\/\+OOP-\/\+P1\+\_\+\+Ticket\+System}} +\end{DoxyDescription}\hypertarget{index_autotoc_md0}{}\doxysection{About}\label{index_autotoc_md0} +The \char`\"{}\+FMI Ticket System\char`\"{} is a small project, designed for managing the seats for different events. You can create or cancel an event in any available hall, reserve or straight out buy tickets for any given event and create some reports.\hypertarget{index_autotoc_md1}{}\doxysection{Structure overview}\label{index_autotoc_md1} +The project is roughly divided into 4 main components\+: User Interface, Services, Models and Generic \mbox{\hyperlink{index_fig1}{fig1}}. +\begin{DoxyItemize} +\item The User Interface is the messenger between a user and the underlying application. All input and output is handled here. +\item Services contain the business logic of the whole application. All requests to do anything like buying a ticket or creating an event must be sent to here. +\item Models are the general classes that are used in the previous two layers. +\item Generic is a place for all code that is can be used independently from the project. Stuff like \mbox{\hyperlink{classDate}{Date}}, \mbox{\hyperlink{classString}{String}} or \mbox{\hyperlink{classList}{List}}. +\end{DoxyItemize} + +This offers a fairly modular and flexible architecture, which should make big changes or additions to the code easier and more pain-\/free.\hypertarget{index_autotoc_md2}{}\doxysection{Building the project}\label{index_autotoc_md2} +Instructions are all for {\ttfamily gcc}. All commands should be executed while in the {\ttfamily src} folder.\hypertarget{index_autotoc_md3}{}\doxysubsection{Linux/\+BSD/\+Mac\+OS}\label{index_autotoc_md3} + +\begin{DoxyCode}{0} +\DoxyCodeLine{g++ *.cpp */*.cpp */*/*.cpp -\/o TicketSystem.out \&\& ./TicketSystem.out} + +\end{DoxyCode} +\hypertarget{index_autotoc_md4}{}\doxysubsection{Windows (\+Power\+Shell)}\label{index_autotoc_md4} + +\begin{DoxyCode}{0} +\DoxyCodeLine{g++ (Get-\/ChildItem -\/Recurse *.cpp) -\/o TicketSystem.exe \&\& ./TicketSystem.exe} + +\end{DoxyCode} +\hypertarget{index_autotoc_md5}{}\doxysection{Running the tests}\label{index_autotoc_md5} +Instructions are all for {\ttfamily gcc}. All commands should be executed while in the {\ttfamily tests} folder.\hypertarget{index_autotoc_md6}{}\doxysubsection{Linux/\+BSD/\+Mac\+OS}\label{index_autotoc_md6} + +\begin{DoxyCode}{0} +\DoxyCodeLine{g++ Tests\_ALL.cpp ../src/*/*.cpp ../src/*/*/*.cpp -\/o Tests\_ALL.out \&\& ./Tests\_ALL.out} + +\end{DoxyCode} +\hypertarget{index_autotoc_md7}{}\doxysection{Acknowledgements}\label{index_autotoc_md7} + +\begin{DoxyDescription} +\item[Wikipedia ]Leap year calculation for \mbox{\hyperlink{classDate}{Date}} ~\newline + \href{https://en.wikipedia.org/wiki/Leap_year\#Gregorian_calendar}{\texttt{ https\+://en.\+wikipedia.\+org/wiki/\+Leap\+\_\+year\#\+Gregorian\+\_\+calendar}} +\item[Stack\+Overflow ]Way to clear the console in \mbox{\hyperlink{Toolbox_8hpp}{Toolbox.\+hpp}} ~\newline + \href{https://stackoverflow.com/a/52895729/12036073}{\texttt{ https\+://stackoverflow.\+com/a/52895729/12036073}} +\end{DoxyDescription}\hypertarget{index_autotoc_md8}{}\doxysection{Figures}\label{index_autotoc_md8} +\label{index_fig1}% +\Hypertarget{index_fig1}% +{\bfseries{Figure 1\+:}} Overview of the \char`\"{}\+FMI Ticket System\char`\"{} design + + +\begin{DoxyImage} +\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{FMI-OOP-P1_TicketSystem Overview.svg} +\doxyfigcaption{Not available in La\+Te\+X!} +\end{DoxyImage} +
\ No newline at end of file diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/longtable_doxygen.sty b/Year 1/Object-oriented Programming/Project 1/docs/latex/longtable_doxygen.sty new file mode 100644 index 0000000..a0eb314 --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/longtable_doxygen.sty @@ -0,0 +1,448 @@ +%% +%% This is file `longtable.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% longtable.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% The source is maintained by the LaTeX Project team and bug +%% reports for it can be opened at http://latex-project.org/bugs.html +%% (but please observe conditions on bug reports sent to that address!) +%% +%% Copyright 1993-2016 +%% The LaTeX3 Project and any individual authors listed elsewhere +%% in this file. +%% +%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'. +%% -------------------------------------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle' +%% without such generated files. +%% +%% The list of all files belonging to the LaTeX `Tools Bundle' is +%% given in the file `manifest.txt'. +%% +%% File: longtable.dtx Copyright (C) 1990-2001 David Carlisle +\NeedsTeXFormat{LaTeX2e}[1995/06/01] +\ProvidesPackage{longtable_doxygen} + [2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen] +\def\LT@err{\PackageError{longtable}} +\def\LT@warn{\PackageWarning{longtable}} +\def\LT@final@warn{% + \AtEndDocument{% + \LT@warn{Table \@width s have changed. Rerun LaTeX.\@gobbletwo}}% + \global\let\LT@final@warn\relax} +\DeclareOption{errorshow}{% + \def\LT@warn{\PackageInfo{longtable}}} +\DeclareOption{pausing}{% + \def\LT@warn#1{% + \LT@err{#1}{This is not really an error}}} +\DeclareOption{set}{} +\DeclareOption{final}{} +\ProcessOptions +\newskip\LTleft \LTleft=\fill +\newskip\LTright \LTright=\fill +\newskip\LTpre \LTpre=\bigskipamount +\newskip\LTpost \LTpost=\bigskipamount +\newcount\LTchunksize \LTchunksize=20 +\let\c@LTchunksize\LTchunksize +\newdimen\LTcapwidth \LTcapwidth=4in +\newbox\LT@head +\newbox\LT@firsthead +\newbox\LT@foot +\newbox\LT@lastfoot +\newcount\LT@cols +\newcount\LT@rows +\newcounter{LT@tables} +\newcounter{LT@chunks}[LT@tables] +\ifx\c@table\undefined + \newcounter{table} + \def\fnum@table{\tablename~\thetable} +\fi +\ifx\tablename\undefined + \def\tablename{Table} +\fi +\newtoks\LT@p@ftn +\mathchardef\LT@end@pen=30000 +\def\longtable{% + \par + \ifx\multicols\@undefined + \else + \ifnum\col@number>\@ne + \@twocolumntrue + \fi + \fi + \if@twocolumn + \LT@err{longtable not in 1-column mode}\@ehc + \fi + \begingroup + \@ifnextchar[\LT@array{\LT@array[x]}} +\def\LT@array[#1]#2{% + \refstepcounter{table}\stepcounter{LT@tables}% + \if l#1% + \LTleft\z@ \LTright\fill + \else\if r#1% + \LTleft\fill \LTright\z@ + \else\if c#1% + \LTleft\fill \LTright\fill + \fi\fi\fi + \let\LT@mcol\multicolumn + \let\LT@@tabarray\@tabarray + \let\LT@@hl\hline + \def\@tabarray{% + \let\hline\LT@@hl + \LT@@tabarray}% + \let\\\LT@tabularcr\let\tabularnewline\\% + \def\newpage{\noalign{\break}}% + \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}% + \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}% + \let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption + \@tempdima\ht\strutbox + \let\@endpbox\LT@endpbox + \ifx\extrarowheight\@undefined + \let\@acol\@tabacol + \let\@classz\@tabclassz \let\@classiv\@tabclassiv + \def\@startpbox{\vtop\LT@startpbox}% + \let\@@startpbox\@startpbox + \let\@@endpbox\@endpbox + \let\LT@LL@FM@cr\@tabularcr + \else + \advance\@tempdima\extrarowheight + \col@sep\tabcolsep + \let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr + \fi + \setbox\@arstrutbox\hbox{\vrule + \@height \arraystretch \@tempdima + \@depth \arraystretch \dp \strutbox + \@width \z@}% + \let\@sharp##\let\protect\relax + \begingroup + \@mkpream{#2}% + \xdef\LT@bchunk{% + \global\advance\c@LT@chunks\@ne + \global\LT@rows\z@\setbox\z@\vbox\bgroup + \LT@setprevdepth + \tabskip\LTleft \noexpand\halign to\hsize\bgroup + \tabskip\z@ \@arstrut \@preamble \tabskip\LTright \cr}% + \endgroup + \expandafter\LT@nofcols\LT@bchunk&\LT@nofcols + \LT@make@row + \m@th\let\par\@empty + \everycr{}\lineskip\z@\baselineskip\z@ + \LT@bchunk} +\def\LT@no@pgbk#1[#2]{\penalty #1\@getpen{#2}\ifnum`{=0\fi}} +\def\LT@start{% + \let\LT@start\endgraf + \endgraf\penalty\z@\vskip\LTpre + \dimen@\pagetotal + \advance\dimen@ \ht\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi + \advance\dimen@ \dp\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi + \advance\dimen@ \ht\LT@foot + \dimen@ii\vfuzz + \vfuzz\maxdimen + \setbox\tw@\copy\z@ + \setbox\tw@\vsplit\tw@ to \ht\@arstrutbox + \setbox\tw@\vbox{\unvbox\tw@}% + \vfuzz\dimen@ii + \advance\dimen@ \ht + \ifdim\ht\@arstrutbox>\ht\tw@\@arstrutbox\else\tw@\fi + \advance\dimen@\dp + \ifdim\dp\@arstrutbox>\dp\tw@\@arstrutbox\else\tw@\fi + \advance\dimen@ -\pagegoal + \ifdim \dimen@>\z@\vfil\break\fi + \global\@colroom\@colht + \ifvoid\LT@foot\else + \advance\vsize-\ht\LT@foot + \global\advance\@colroom-\ht\LT@foot + \dimen@\pagegoal\advance\dimen@-\ht\LT@foot\pagegoal\dimen@ + \maxdepth\z@ + \fi + \ifvoid\LT@firsthead\copy\LT@head\else\box\LT@firsthead\fi\nobreak + \output{\LT@output}} +\def\endlongtable{% + \crcr + \noalign{% + \let\LT@entry\LT@entry@chop + \xdef\LT@save@row{\LT@save@row}}% + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \if@filesw + {\let\LT@entry\LT@entry@write\immediate\write\@auxout{% + \gdef\expandafter\noexpand + \csname LT@\romannumeral\c@LT@tables\endcsname + {\LT@save@row}}}% + \fi + \ifx\LT@save@row\LT@@save@row + \else + \LT@warn{Column \@width s have changed\MessageBreak + in table \thetable}% + \LT@final@warn + \fi + \endgraf\penalty -\LT@end@pen + \endgroup + \global\@mparbottom\z@ + \pagegoal\vsize + \endgraf\penalty\z@\addvspace\LTpost + \ifvoid\footins\else\insert\footins{}\fi} +\def\LT@nofcols#1&{% + \futurelet\@let@token\LT@n@fcols} +\def\LT@n@fcols{% + \advance\LT@cols\@ne + \ifx\@let@token\LT@nofcols + \expandafter\@gobble + \else + \expandafter\LT@nofcols + \fi} +\def\LT@tabularcr{% + \relax\iffalse{\fi\ifnum0=`}\fi + \@ifstar + {\def\crcr{\LT@crcr\noalign{\nobreak}}\let\cr\crcr + \LT@t@bularcr}% + {\LT@t@bularcr}} +\let\LT@crcr\crcr +\let\LT@setprevdepth\relax +\def\LT@t@bularcr{% + \global\advance\LT@rows\@ne + \ifnum\LT@rows=\LTchunksize + \gdef\LT@setprevdepth{% + \prevdepth\z@\global + \global\let\LT@setprevdepth\relax}% + \expandafter\LT@xtabularcr + \else + \ifnum0=`{}\fi + \expandafter\LT@LL@FM@cr + \fi} +\def\LT@xtabularcr{% + \@ifnextchar[\LT@argtabularcr\LT@ntabularcr} +\def\LT@ntabularcr{% + \ifnum0=`{}\fi + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \LT@bchunk} +\def\LT@argtabularcr[#1]{% + \ifnum0=`{}\fi + \ifdim #1>\z@ + \unskip\@xargarraycr{#1}% + \else + \@yargarraycr{#1}% + \fi + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \LT@bchunk} +\def\LT@echunk{% + \crcr\LT@save@row\cr\egroup + \global\setbox\@ne\lastbox + \unskip + \egroup} +\def\LT@entry#1#2{% + \ifhmode\@firstofone{&}\fi\omit + \ifnum#1=\c@LT@chunks + \else + \kern#2\relax + \fi} +\def\LT@entry@chop#1#2{% + \noexpand\LT@entry + {\ifnum#1>\c@LT@chunks + 1}{0pt% + \else + #1}{#2% + \fi}} +\def\LT@entry@write{% + \noexpand\LT@entry^^J% + \@spaces} +\def\LT@kill{% + \LT@echunk + \LT@get@widths + \expandafter\LT@rebox\LT@bchunk} +\def\LT@rebox#1\bgroup{% + #1\bgroup + \unvbox\z@ + \unskip + \setbox\z@\lastbox} +\def\LT@blank@row{% + \xdef\LT@save@row{\expandafter\LT@build@blank + \romannumeral\number\LT@cols 001 }} +\def\LT@build@blank#1{% + \if#1m% + \noexpand\LT@entry{1}{0pt}% + \expandafter\LT@build@blank + \fi} +\def\LT@make@row{% + \global\expandafter\let\expandafter\LT@save@row + \csname LT@\romannumeral\c@LT@tables\endcsname + \ifx\LT@save@row\relax + \LT@blank@row + \else + {\let\LT@entry\or + \if!% + \ifcase\expandafter\expandafter\expandafter\LT@cols + \expandafter\@gobble\LT@save@row + \or + \else + \relax + \fi + !% + \else + \aftergroup\LT@blank@row + \fi}% + \fi} +\let\setlongtables\relax +\def\LT@get@widths{% + \setbox\tw@\hbox{% + \unhbox\@ne + \let\LT@old@row\LT@save@row + \global\let\LT@save@row\@empty + \count@\LT@cols + \loop + \unskip + \setbox\tw@\lastbox + \ifhbox\tw@ + \LT@def@row + \advance\count@\m@ne + \repeat}% + \ifx\LT@@save@row\@undefined + \let\LT@@save@row\LT@save@row + \fi} +\def\LT@def@row{% + \let\LT@entry\or + \edef\@tempa{% + \ifcase\expandafter\count@\LT@old@row + \else + {1}{0pt}% + \fi}% + \let\LT@entry\relax + \xdef\LT@save@row{% + \LT@entry + \expandafter\LT@max@sel\@tempa + \LT@save@row}} +\def\LT@max@sel#1#2{% + {\ifdim#2=\wd\tw@ + #1% + \else + \number\c@LT@chunks + \fi}% + {\the\wd\tw@}} +\def\LT@hline{% + \noalign{\ifnum0=`}\fi + \penalty\@M + \futurelet\@let@token\LT@@hline} +\def\LT@@hline{% + \ifx\@let@token\hline + \global\let\@gtempa\@gobble + \gdef\LT@sep{\penalty-\@medpenalty\vskip\doublerulesep}% + \else + \global\let\@gtempa\@empty + \gdef\LT@sep{\penalty-\@lowpenalty\vskip-\arrayrulewidth}% + \fi + \ifnum0=`{\fi}% + \multispan\LT@cols + \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr + \noalign{\LT@sep}% + \multispan\LT@cols + \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr + \noalign{\penalty\@M}% + \@gtempa} +\def\LT@caption{% + \noalign\bgroup + \@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n} +\def\LT@c@ption#1[#2]#3{% + \LT@makecaption#1\fnum@table{#3}% + \def\@tempa{#2}% + \ifx\@tempa\@empty\else + {\let\\\space + \addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}% + \fi} +\def\LT@capti@n{% + \@ifstar + {\egroup\LT@c@ption\@gobble[]}% + {\egroup\@xdblarg{\LT@c@ption\@firstofone}}} +\def\LT@makecaption#1#2#3{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{% + \sbox\@tempboxa{#1{#2: }#3}% + \ifdim\wd\@tempboxa>\hsize + #1{#2: }#3% + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \endgraf\vskip\baselineskip}% + \hss}}} +\def\LT@output{% + \ifnum\outputpenalty <-\@Mi + \ifnum\outputpenalty > -\LT@end@pen + \LT@err{floats and marginpars not allowed in a longtable}\@ehc + \else + \setbox\z@\vbox{\unvbox\@cclv}% + \ifdim \ht\LT@lastfoot>\ht\LT@foot + \dimen@\pagegoal + \advance\dimen@-\ht\LT@lastfoot + \ifdim\dimen@<\ht\z@ + \setbox\@cclv\vbox{\unvbox\z@\copy\LT@foot\vss}% + \@makecol + \@outputpage + \setbox\z@\vbox{\box\LT@head}% + \fi + \fi + \global\@colroom\@colht + \global\vsize\@colht + \vbox + {\unvbox\z@\box\ifvoid\LT@lastfoot\LT@foot\else\LT@lastfoot\fi}% + \fi + \else + \setbox\@cclv\vbox{\unvbox\@cclv\copy\LT@foot\vss}% + \@makecol + \@outputpage + \global\vsize\@colroom + \copy\LT@head\nobreak + \fi} +\def\LT@end@hd@ft#1{% + \LT@echunk + \ifx\LT@start\endgraf + \LT@err + {Longtable head or foot not at start of table}% + {Increase LTchunksize}% + \fi + \setbox#1\box\z@ + \LT@get@widths + \LT@bchunk} +\def\endfirsthead{\LT@end@hd@ft\LT@firsthead} +\def\endhead{\LT@end@hd@ft\LT@head} +\def\endfoot{\LT@end@hd@ft\LT@foot} +\def\endlastfoot{\LT@end@hd@ft\LT@lastfoot} +\def\LT@startpbox#1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \vrule \@height \ht\@arstrutbox \@width \z@} +\def\LT@endpbox{% + \@finalstrut\@arstrutbox + \egroup + \the\LT@p@ftn + \global\LT@p@ftn{}% + \hfil} +\def\LT@p@ftntext#1{% + \edef\@tempa{\the\LT@p@ftn\noexpand\footnotetext[\the\c@footnote]}% + \global\LT@p@ftn\expandafter{\@tempa{#1}}}% + +\@namedef{ver@longtable.sty}{2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen} +\endinput +%% +%% End of file `longtable.sty'. diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/main_8cpp.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/main_8cpp.tex new file mode 100644 index 0000000..31e87fd --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/main_8cpp.tex @@ -0,0 +1,31 @@ +\hypertarget{main_8cpp}{}\doxysection{src/main.cpp File Reference} +\label{main_8cpp}\index{src/main.cpp@{src/main.cpp}} + + +Entry point for application. + + +{\ttfamily \#include \char`\"{}Services/\+Event\+Service.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Services/\+Hall\+Service.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}Models/\+Hall.\+h\char`\"{}}\newline +{\ttfamily \#include \char`\"{}User\+Interface/\+FMITicket\+System\+Console\+UI.\+h\char`\"{}}\newline +\doxysubsection*{Functions} +\begin{DoxyCompactItemize} +\item +int \mbox{\hyperlink{main_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4}{main}} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Entry point for application. + +Contains the \mbox{\hyperlink{main_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4}{main()}} function. + +\doxysubsection{Function Documentation} +\mbox{\Hypertarget{main_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4}\label{main_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4}} +\index{main.cpp@{main.cpp}!main@{main}} +\index{main@{main}!main.cpp@{main.cpp}} +\doxysubsubsection{\texorpdfstring{main()}{main()}} +{\footnotesize\ttfamily int main (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} + +Creates instances of \mbox{\hyperlink{classHallService}{Hall\+Service}} and \mbox{\hyperlink{classEventService}{Event\+Service}} and executes \mbox{\hyperlink{FMITicketSystemConsoleUI_8h_a79d6833c27b5a32b6d9917f5cd6e32a3}{run\+UI()}} function.
\ No newline at end of file diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/refman.pdf b/Year 1/Object-oriented Programming/Project 1/docs/latex/refman.pdf Binary files differnew file mode 100644 index 0000000..86078ce --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/refman.pdf diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/refman.tex b/Year 1/Object-oriented Programming/Project 1/docs/latex/refman.tex new file mode 100644 index 0000000..4d8b16b --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/refman.tex @@ -0,0 +1,240 @@ + % Handle batch mode + % to overcome problems with too many open files + \let\mypdfximage\pdfximage\def\pdfximage{\immediate\mypdfximage} + % Set document class depending on configuration + \documentclass[twoside]{book} + %% moved from doxygen.sty due to workaround for LaTex 2019 version and unmaintained tabu package + \usepackage{ifthen} + \ifx\requestedLaTeXdate\undefined + \usepackage{array} + \else + \usepackage{array}[=2016-10-06] + \fi + %% + % Packages required by doxygen + \usepackage{fixltx2e} % for \textsubscript + \usepackage{doxygen} + \usepackage{graphicx} + \usepackage[utf8]{inputenc} + \usepackage{makeidx} + \PassOptionsToPackage{warn}{textcomp} + \usepackage{textcomp} + \usepackage[nointegrals]{wasysym} + \usepackage{ifxetex} + % NLS support packages + % Define default fonts + % Font selection + \usepackage[T1]{fontenc} + % set main and monospaced font + \usepackage[scaled=.90]{helvet} +\usepackage{courier} +\renewcommand{\familydefault}{\sfdefault} + \usepackage{sectsty} + \allsectionsfont{% + \fontseries{bc}\selectfont% + \color{darkgray}% + } + \renewcommand{\DoxyLabelFont}{% + \fontseries{bc}\selectfont% + \color{darkgray}% + } + \newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}} + % Arguments of doxygenemoji: + % 1) ':<text>:' form of the emoji, already LaTeX-escaped + % 2) file with the name of the emoji without the .png extension + % in case image exist use this otherwise use the ':<text>:' form + \newcommand{\doxygenemoji}[2]{% + \IfFileExists{./#2.png}{\raisebox{-0.1em}{\includegraphics[height=0.9em]{./#2.png}}}{#1}% + } + % Page & text layout + \usepackage{geometry} + \geometry{% + a4paper,% + top=2.5cm,% + bottom=2.5cm,% + left=2.5cm,% + right=2.5cm% + } + % Allow a bit of overflow to go unnoticed by other means + \tolerance=750 + \hfuzz=15pt + \hbadness=750 + \setlength{\emergencystretch}{15pt} + \setlength{\parindent}{0cm} + \newcommand{\doxynormalparskip}{\setlength{\parskip}{3ex plus 2ex minus 2ex}} + \newcommand{\doxytocparskip}{\setlength{\parskip}{1ex plus 0ex minus 0ex}} + \doxynormalparskip + % Redefine paragraph/subparagraph environments, using sectsty fonts + \makeatletter + \renewcommand{\paragraph}{% + \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@parafont% + }% + } + \renewcommand{\subparagraph}{% + \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@subparafont% + }% + } + \makeatother + \makeatletter + \newcommand\hrulefilll{\leavevmode\leaders\hrule\hskip 0pt plus 1filll\kern\z@} + \makeatother + % Headers & footers + \usepackage{fancyhdr} + \pagestyle{fancyplain} + \renewcommand{\footrulewidth}{0.4pt} + \fancypagestyle{fancyplain}{ + \fancyhf{} + \fancyhead[LE, RO]{\bfseries\thepage} + \fancyhead[LO]{\bfseries\rightmark} + \fancyhead[RE]{\bfseries\leftmark} + \fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen } + } + \fancypagestyle{plain}{ + \fancyhf{} + \fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen } + \renewcommand{\headrulewidth}{0pt} + } + \pagestyle{fancyplain} + \renewcommand{\chaptermark}[1]{% + \markboth{#1}{}% + } + \renewcommand{\sectionmark}[1]{% + \markright{\thesection\ #1}% + } + % ToC, LoF, LoT, bibliography, and index + % Indices & bibliography + \usepackage{natbib} + \usepackage[titles]{tocloft} + \setcounter{tocdepth}{3} + \setcounter{secnumdepth}{5} + % creating indexes + \makeindex + \usepackage{newunicodechar} + \newunicodechar{�}{${}^{-}$}% Superscript minus + \newunicodechar{²}{${}^{2}$}% Superscript two + \newunicodechar{³}{${}^{3}$}% Superscript three + % Hyperlinks + % Hyperlinks (required, but should be loaded last) + \ifpdf + \usepackage[pdftex,pagebackref=true]{hyperref} + \else + \ifxetex + \usepackage[pagebackref=true]{hyperref} + \else + \usepackage[ps2pdf,pagebackref=true]{hyperref} + \fi + \fi + \hypersetup{% + colorlinks=true,% + linkcolor=blue,% + citecolor=blue,% + unicode,% + pdftitle=FMI Ticket System,% + pdfsubject=$\vert$ Kamen Mladenov $\vert$ FMI Computer Science Year 1 Group 6 $\vert$ Project 1 $\vert$ Project Topic 4 $\vert$% + } + % Custom commands used by the header + % Custom commands + \newcommand{\clearemptydoublepage}{% + \newpage{\pagestyle{empty}\cleardoublepage}% + } + % caption style definition + \usepackage{caption} + \captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top} + % in page table of contents + \usepackage{etoc} + \etocsettocstyle{\doxytocparskip}{\doxynormalparskip} + % prevent numbers overlap the titles in toc + \renewcommand{\numberline}[1]{#1~} +% End of preamble, now comes the document contents +%===== C O N T E N T S ===== +\begin{document} + \raggedbottom + % Titlepage & ToC + % To avoid duplicate page anchors due to reuse of same numbers for + % the index (be it as roman numbers) + \hypersetup{pageanchor=false, + bookmarksnumbered=true, + pdfencoding=unicode + } + \pagenumbering{alph} + \begin{titlepage} + \vspace*{7cm} + \begin{center}% + {\Large FMI Ticket System}\\ + \vspace*{1cm} + {\large Generated by Doxygen 1.9.3}\\ + \end{center} + \end{titlepage} + \clearemptydoublepage + \pagenumbering{roman} + \tableofcontents + \clearemptydoublepage + \pagenumbering{arabic} + % re-enable anchors again + \hypersetup{pageanchor=true} +%--- Begin generated contents --- +\chapter{FMI Tickets System} +\label{index}\hypertarget{index}{}\input{index} +\chapter{Hierarchical Index} +\input{hierarchy} +\chapter{Class Index} +\input{annotated} +\chapter{File Index} +\input{files} +\chapter{Class Documentation} +\input{classCommand} +\input{classDate} +\input{classEvent} +\input{classEventService} +\input{classHall} +\input{classHallService} +\input{classList} +\input{classMenu} +\input{classOrderedList} +\input{classReservation} +\input{classString} +\input{classTicket} +\chapter{File Documentation} +\input{Command_8h} +\input{Command_8h_source} +\input{Menu_8h} +\input{Menu_8h_source} +\input{Toolbox_8hpp} +\input{Toolbox_8hpp_source} +\input{Date_8h} +\input{Date_8h_source} +\input{List_8hpp} +\input{List_8hpp_source} +\input{OrderedList_8hpp} +\input{OrderedList_8hpp_source} +\input{String_8h} +\input{String_8h_source} +\input{main_8cpp} +\input{Event_8h} +\input{Event_8h_source} +\input{Hall_8h} +\input{Hall_8h_source} +\input{Reservation_8h} +\input{Reservation_8h_source} +\input{Ticket_8h} +\input{Ticket_8h_source} +\input{EventService_8h} +\input{EventService_8h_source} +\input{HallService_8h} +\input{HallService_8h_source} +\input{StatusCode_8h} +\input{StatusCode_8h_source} +\input{FMITicketSystemConsoleUI_8h} +\input{FMITicketSystemConsoleUI_8h_source} +%--- End generated contents --- +% Index + \backmatter + \newpage + \phantomsection + \clearemptydoublepage + \addcontentsline{toc}{chapter}{\indexname} + \printindex +% Required for some languages (in combination with latexdocumentpre from the header) +\end{document} diff --git a/Year 1/Object-oriented Programming/Project 1/docs/latex/tabu_doxygen.sty b/Year 1/Object-oriented Programming/Project 1/docs/latex/tabu_doxygen.sty new file mode 100644 index 0000000..3f17d1d --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/latex/tabu_doxygen.sty @@ -0,0 +1,2557 @@ +%% +%% This is file `tabu.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% tabu.dtx (with options: `package') +%% +%% This is a generated file. +%% Copyright (FC) 2010-2011 - lppl +%% +%% tabu : 2011/02/26 v2.8 - tabu : Flexible LaTeX tabulars +%% +%% ********************************************************************************************** +%% \begin{tabu} { preamble } => default target: \linewidth or \linegoal +%% \begin{tabu} to <dimen>{ preamble } => target specified +%% \begin{tabu} spread <dimen>{ preamble } => target relative to the ``natural width'' +%% +%% tabu works in text and in math modes. +%% +%% X columns: automatic width adjustment + horizontal and vertical alignment +%% \begin{tabu} { X[4c] X[1c] X[-2ml] } +%% +%% Horizontal lines and / or leaders: +%% \hline\hline => double horizontal line +%% \firsthline\hline => for nested tabulars +%% \lasthline\hline => for nested tabulars +%% \tabucline[line spec]{column-column} => ``funny'' lines (dash/leader) +%% Automatic lines / leaders : +%% \everyrow{\hline\hline} +%% +%% Vertical lines and / or leaders: +%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt blue] } +%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt on 2pt off 4pt blue] } +%% +%% Fixed vertical spacing adjustment: +%% \extrarowheight=<dimen> \extrarowdepth=<dimen> +%% or: \extrarowsep=<dimen> => may be prefixed by \global +%% +%% Dynamic vertical spacing adjustment: +%% \abovetabulinesep=<dimen> \belowtabulinesep=<dimen> +%% or: \tabulinesep=<dimen> => may be prefixed by \global +%% +%% delarray.sty shortcuts: in math and text modes +%% \begin{tabu} .... \({ preamble }\) +%% +%% Algorithms reports: +%% \tracingtabu=1 \tracingtabu=2 +%% +%% ********************************************************************************************** +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any later +%% version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% +%% This work consists of the main source file tabu.dtx +%% and the derived files +%% tabu.sty, tabu.pdf, tabu.ins +%% +%% tabu : Flexible LaTeX tabulars +%% lppl copyright 2010-2011 by FC <florent.chervet@free.fr> +%% + +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +\ProvidesPackage{tabu_doxygen}[2011/02/26 v2.8 - flexible LaTeX tabulars (FC), frozen version for doxygen] +\RequirePackage{array}[2008/09/09] +\RequirePackage{varwidth}[2009/03/30] +\AtEndOfPackage{\tabu@AtEnd \let\tabu@AtEnd \@undefined} +\let\tabu@AtEnd\@empty +\def\TMP@EnsureCode#1={% + \edef\tabu@AtEnd{\tabu@AtEnd + \catcode#1 \the\catcode#1}% + \catcode#1=% +}% \TMP@EnsureCode +\TMP@EnsureCode 33 = 12 % ! +\TMP@EnsureCode 58 = 12 % : (for siunitx) +\TMP@EnsureCode124 = 12 % | +\TMP@EnsureCode 36 = 3 % $ = math shift +\TMP@EnsureCode 38 = 4 % & = tab alignment character +\TMP@EnsureCode 32 = 10 % space +\TMP@EnsureCode 94 = 7 % ^ +\TMP@EnsureCode 95 = 8 % _ +%% Constants -------------------------------------------------------- +\newcount \c@taburow \def\thetaburow {\number\c@taburow} +\newcount \tabu@nbcols +\newcount \tabu@cnt +\newcount \tabu@Xcol +\let\tabu@start \@tempcnta +\let\tabu@stop \@tempcntb +\newcount \tabu@alloc \tabu@alloc=\m@ne +\newcount \tabu@nested +\def\tabu@alloc@{\global\advance\tabu@alloc \@ne \tabu@nested\tabu@alloc} +\newdimen \tabu@target +\newdimen \tabu@spreadtarget +\newdimen \tabu@naturalX +\newdimen \tabucolX +\let\tabu@DELTA \@tempdimc +\let\tabu@thick \@tempdima +\let\tabu@on \@tempdimb +\let\tabu@off \@tempdimc +\newdimen \tabu@Xsum +\newdimen \extrarowdepth +\newdimen \abovetabulinesep +\newdimen \belowtabulinesep +\newdimen \tabustrutrule \tabustrutrule \z@ +\newtoks \tabu@thebody +\newtoks \tabu@footnotes +\newsavebox \tabu@box +\newsavebox \tabu@arstrutbox +\newsavebox \tabu@hleads +\newsavebox \tabu@vleads +\newif \iftabu@colortbl +\newif \iftabu@siunitx +\newif \iftabu@measuring +\newif \iftabu@spread +\newif \iftabu@negcoef +\newif \iftabu@everyrow +\def\tabu@everyrowtrue {\global\let\iftabu@everyrow \iftrue} +\def\tabu@everyrowfalse{\global\let\iftabu@everyrow \iffalse} +\newif \iftabu@long +\newif \iftabuscantokens +\def\tabu@rescan {\tabu@verbatim \scantokens } +%% Utilities (for internal usage) ----------------------------------- +\def\tabu@gobblespace #1 {#1} +\def\tabu@gobbletoken #1#2{#1} +\def\tabu@gobbleX{\futurelet\@let@token \tabu@gobblex} +\def\tabu@gobblex{\if ^^J\noexpand\@let@token \expandafter\@gobble + \else\ifx \@sptoken\@let@token + \expandafter\tabu@gobblespace\expandafter\tabu@gobbleX + \fi\fi +}% \tabu@gobblex +\def\tabu@X{^^J} +{\obeyspaces +\global\let\tabu@spxiii= % saves an active space (for \ifx) +\gdef\tabu@@spxiii{ }} +\def\tabu@ifenvir {% only for \multicolumn + \expandafter\tabu@if@nvir\csname\@currenvir\endcsname +}% \tabu@ifenvir +\def\tabu@if@nvir #1{\csname @\ifx\tabu#1first\else + \ifx\longtabu#1first\else + second\fi\fi oftwo\endcsname +}% \tabu@ifenvir +\def\tabu@modulo #1#2{\numexpr\ifnum\numexpr#1=\z@ 0\else #1-(#1-(#2-1)/2)/(#2)*(#2)\fi} +{\catcode`\&=3 +\gdef\tabu@strtrim #1{% #1 = control sequence to trim + \ifodd 1\ifx #1\@empty \else \ifx #1\space \else 0\fi \fi + \let\tabu@c@l@r \@empty \let#1\@empty + \else \expandafter \tabu@trimspaces #1\@nnil + \fi +}% \tabu@strtrim +\gdef\tabu@trimspaces #1\@nnil{\let\tabu@c@l@r=#2\tabu@firstspace .#1& }% +\gdef\tabu@firstspace #1#2#3 &{\tabu@lastspace #2#3&} +\gdef\tabu@lastspace #1{\def #3{#1}% + \ifx #3\tabu@c@l@r \def\tabu@c@l@r{\protect\color{#1}}\expandafter\remove@to@nnil \fi + \tabu@trimspaces #1\@nnil} +}% \catcode +\def\tabu@sanitizearg #1#2{{% + \csname \ifcsname if@safe@actives\endcsname % <babel> + @safe@activestrue\else + relax\fi \endcsname + \edef#2{#1}\tabu@strtrim#2\@onelevel@sanitize#2% + \expandafter}\expandafter\def\expandafter#2\expandafter{#2}% +}% \tabu@sanitizearg +\def\tabu@textbar #1{\begingroup \endlinechar\m@ne \scantokens{\def\:{|}}% + \expandafter\endgroup \expandafter#1\:% !!! semi simple group !!! +}% \tabu@textbar +\def\tabu@everyrow@bgroup{\iftabu@everyrow \begingroup \else \noalign{\ifnum0=`}\fi \fi} +\def\tabu@everyrow@egroup{% + \iftabu@everyrow \expandafter \endgroup \the\toks@ + \else \ifnum0=`{\fi}% + \fi +}% \tabu@everyrow@egroup +\def\tabu@arstrut {\global\setbox\@arstrutbox \hbox{\vrule + height \arraystretch \dimexpr\ht\strutbox+\extrarowheight + depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth + width \z@}% +}% \tabu@arstrut +\def\tabu@rearstrut {% + \@tempdima \arraystretch\dimexpr\ht\strutbox+\extrarowheight \relax + \@tempdimb \arraystretch\dimexpr\dp\strutbox+\extrarowdepth \relax + \ifodd 1\ifdim \ht\@arstrutbox=\@tempdima + \ifdim \dp\@arstrutbox=\@tempdimb 0 \fi\fi + \tabu@mkarstrut + \fi +}% \tabu@rearstrut +\def\tabu@@DBG #1{\ifdim\tabustrutrule>\z@ \color{#1}\fi} +\def\tabu@DBG@arstrut {\global\setbox\@arstrutbox + \hbox to\z@{\hbox to\z@{\hss + {\tabu@DBG{cyan}\vrule + height \arraystretch \dimexpr\ht\strutbox+\extrarowheight + depth \z@ + width \tabustrutrule}\kern-\tabustrutrule + {\tabu@DBG{pink}\vrule + height \z@ + depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth + width \tabustrutrule}}}% +}% \tabu@DBG@arstrut +\def\tabu@save@decl{\toks\count@ \expandafter{\the\toks\expandafter\count@ + \@nextchar}}% +\def\tabu@savedecl{\ifcat$\d@llarend\else + \let\save@decl \tabu@save@decl \fi % no inversion of tokens in text mode +}% \tabu@savedecl +\def\tabu@finalstrut #1{\unskip\ifhmode\nobreak\fi\vrule height\z@ depth\z@ width\z@} +\newcommand*\tabuDisableCommands {\g@addto@macro\tabu@trialh@@k } +\let\tabu@trialh@@k \@empty +\def\tabu@nowrite #1#{{\afterassignment}\toks@} +\let\tabu@write\write +\let\tabu@immediate\immediate +\def\tabu@WRITE{\begingroup + \def\immediate\write{\aftergroup\endgroup + \tabu@immediate\tabu@write}% +}% \tabu@WRITE +\expandafter\def\expandafter\tabu@GenericError\expandafter{% + \expandafter\tabu@WRITE\GenericError} +\def\tabu@warn{\tabu@WRITE\PackageWarning{tabu}} +\def\tabu@noxfootnote [#1]{\@gobble} +\def\tabu@nocolor #1#{\@gobble} +\newcommand*\tabu@norowcolor[2][]{} +\def\tabu@maybesiunitx #1{\def\tabu@temp{#1}% + \futurelet\@let@token \tabu@m@ybesiunitx} +\def\tabu@m@ybesiunitx #1{\def\tabu@m@ybesiunitx {% + \ifx #1\@let@token \let\tabu@cellleft \@empty \let\tabu@cellright \@empty \fi + \tabu@temp}% \tabu@m@ybesiunitx +}\expandafter\tabu@m@ybesiunitx \csname siunitx_table_collect_begin:Nn\endcsname +\def\tabu@celllalign@def #1{\def\tabu@celllalign{\tabu@maybesiunitx{#1}}}% +%% Fixed vertical spacing adjustment: \extrarowsep ------------------ +\newcommand*\extrarowsep{\edef\tabu@C@extra{\the\numexpr\tabu@C@extra+1}% + \iftabu@everyrow \aftergroup\tabu@Gextra + \else \aftergroup\tabu@n@Gextra + \fi + \@ifnextchar={\tabu@gobbletoken\tabu@extra} \tabu@extra +}% \extrarowsep +\def\tabu@extra {\@ifnextchar_% + {\tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}} + {\ifx ^\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}}% + \else \let\tabu@temp \@empty + \afterassignment \tabu@setextrasep \extrarowdepth + \fi \tabu@temp}% +}% \tabu@extra +\def\tabu@setextra #1#2{\def\tabu@temp{\tabu@extr@#1#2}\afterassignment\tabu@temp#2} +\def\tabu@extr@ #1#2{\@ifnextchar^% + {\tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}} + {\ifx _\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}}% + \else \let\tabu@temp \@empty + \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth + \fi \tabu@temp}% +}% \tabu@extr@ +\def\tabu@setextrasep {\extrarowheight=\extrarowdepth + \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth +}% \tabu@setextrasep +\def\tabu@Gextra{\ifx \tabu@G@extra\@empty \else {\tabu@Rextra}\fi} +\def\tabu@n@Gextra{\ifx \tabu@G@extra\@empty \else \noalign{\tabu@Rextra}\fi} +\def\tabu@Rextra{\tabu@Grestore \tabu@G@extra \tabu@C@extra} +\let\tabu@C@extra \z@ +\let\tabu@G@extra \@empty +%% Dynamic vertical spacing adjustment: \tabulinesep ---------------- +\newcommand*\tabulinesep{\edef\tabu@C@linesep{\the\numexpr\tabu@C@linesep+1}% + \iftabu@everyrow \aftergroup\tabu@Glinesep + \else \aftergroup\tabu@n@Glinesep + \fi + \@ifnextchar={\tabu@gobbletoken\tabu@linesep} \tabu@linesep +}% \tabulinesep +\def\tabu@linesep {\@ifnextchar_% + {\tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}} + {\ifx ^\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}}% + \else \let\tabu@temp \@empty + \afterassignment \tabu@setlinesep \abovetabulinesep + \fi \tabu@temp}% +}% \tabu@linesep +\def\tabu@setsep #1#2{\def\tabu@temp{\tabu@sets@p#1#2}\afterassignment\tabu@temp#2} +\def\tabu@sets@p #1#2{\@ifnextchar^% + {\tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}} + {\ifx _\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}}% + \else \let\tabu@temp \@empty + \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep + \fi \tabu@temp}% +}% \tabu@sets@p +\def\tabu@setlinesep {\belowtabulinesep=\abovetabulinesep + \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep +}% \tabu@setlinesep +\def\tabu@Glinesep{\ifx \tabu@G@linesep\@empty \else {\tabu@Rlinesep}\fi} +\def\tabu@n@Glinesep{\ifx \tabu@G@linesep\@empty \else \noalign{\tabu@Rlinesep}\fi} +\def\tabu@Rlinesep{\tabu@Grestore \tabu@G@linesep \tabu@C@linesep} +\let\tabu@C@linesep \z@ +\let\tabu@G@linesep \@empty +%% \global\extrarowsep and \global\tabulinesep ------------------- +\def\tabu@Gsave #1#2#3#4{\xdef#1{#1% + \toks#2{\toks\the\currentgrouplevel{\global#3\the#3\global#4\the#4}}}% +}% \tabu@Gsave +\def\tabu@Grestore#1#2{% + \toks#2{}#1\toks\currentgrouplevel\expandafter{\expandafter}\the\toks#2\relax + \ifcat$\the\toks\currentgrouplevel$\else + \global\let#1\@empty \global\let#2\z@ + \the\toks\currentgrouplevel + \fi +}% \tabu@Grestore +%% Setting code for every row --------------------------------------- +\newcommand*\everyrow{\tabu@everyrow@bgroup + \tabu@start \z@ \tabu@stop \z@ \tabu@evrstartstop +}% \everyrow +\def\tabu@evrstartstop {\@ifnextchar^% + {\afterassignment \tabu@evrstartstop \tabu@stop=}% + {\ifx ^\@let@token + \afterassignment\tabu@evrstartstop \tabu@start=% + \else \afterassignment\tabu@everyr@w \toks@ + \fi}% +}% \tabu@evrstartstop +\def\tabu@everyr@w {% + \xdef\tabu@everyrow{% + \noexpand\tabu@everyrowfalse + \let\noalign \relax + \noexpand\tabu@rowfontreset + \iftabu@colortbl \noexpand\tabu@rc@ \fi % \taburowcolors + \let\noexpand\tabu@docline \noexpand\tabu@docline@evr + \the\toks@ + \noexpand\tabu@evrh@@k + \noexpand\tabu@rearstrut + \global\advance\c@taburow \@ne}% + \iftabu@everyrow \toks@\expandafter + {\expandafter\def\expandafter\tabu@evr@L\expandafter{\the\toks@}\ignorespaces}% + \else \xdef\tabu@evr@G{\the\toks@}% + \fi + \tabu@everyrow@egroup +}% \tabu@everyr@w +\def\tabu@evr {\def\tabu@evrh@@k} % for internal use only +\tabu@evr{} +%% line style and leaders ------------------------------------------- +\newcommand*\newtabulinestyle [1]{% + {\@for \@tempa :=#1\do{\expandafter\tabu@newlinestyle \@tempa==\@nil}}% +}% \newtabulinestyle +\def\tabu@newlinestyle #1=#2=#3\@nil{\tabu@getline {#2}% + \tabu@sanitizearg {#1}\@tempa + \ifodd 1\ifx \@tempa\@empty \ifdefined\tabu@linestyle@ 0 \fi\fi + \global\expandafter\let + \csname tabu@linestyle@\@tempa \endcsname =\tabu@thestyle \fi +}% \tabu@newlinestyle +\newcommand*\tabulinestyle [1]{\tabu@everyrow@bgroup \tabu@getline{#1}% + \iftabu@everyrow + \toks@\expandafter{\expandafter \def \expandafter + \tabu@ls@L\expandafter{\tabu@thestyle}\ignorespaces}% + \gdef\tabu@ls@{\tabu@ls@L}% + \else + \global\let\tabu@ls@G \tabu@thestyle + \gdef\tabu@ls@{\tabu@ls@G}% + \fi + \tabu@everyrow@egroup +}% \tabulinestyle +\newcommand*\taburulecolor{\tabu@everyrow@bgroup \tabu@textbar \tabu@rulecolor} +\def\tabu@rulecolor #1{\toks@{}% + \def\tabu@temp #1##1#1{\tabu@ruledrsc{##1}}\@ifnextchar #1% + \tabu@temp + \tabu@rulearc +}% \tabu@rulecolor +\def\tabu@ruledrsc #1{\edef\tabu@temp{#1}\tabu@strtrim\tabu@temp + \ifx \tabu@temp\@empty \def\tabu@temp{\tabu@rule@drsc@ {}{}}% + \else \edef\tabu@temp{\noexpand\tabu@rule@drsc@ {}{\tabu@temp}}% + \fi + \tabu@temp +}% \tabu@ruledrsc@ +\def\tabu@ruledrsc@ #1#{\tabu@rule@drsc@ {#1}} +\def\tabu@rule@drsc@ #1#2{% + \iftabu@everyrow + \ifx \\#1#2\\\toks@{\let\CT@drsc@ \relax}% + \else \toks@{\def\CT@drsc@{\color #1{#2}}}% + \fi + \else + \ifx \\#1#2\\\global\let\CT@drsc@ \relax + \else \gdef\CT@drsc@{\color #1{#2}}% + \fi + \fi + \tabu@rulearc +}% \tabu@rule@drsc@ +\def\tabu@rulearc #1#{\tabu@rule@arc@ {#1}} +\def\tabu@rule@arc@ #1#2{% + \iftabu@everyrow + \ifx \\#1#2\\\toks@\expandafter{\the\toks@ \def\CT@arc@{}}% + \else \toks@\expandafter{\the\toks@ \def\CT@arc@{\color #1{#2}}}% + \fi + \toks@\expandafter{\the\toks@ + \let\tabu@arc@L \CT@arc@ + \let\tabu@drsc@L \CT@drsc@ + \ignorespaces}% + \else + \ifx \\#1#2\\\gdef\CT@arc@{}% + \else \gdef\CT@arc@{\color #1{#2}}% + \fi + \global\let\tabu@arc@G \CT@arc@ + \global\let\tabu@drsc@G \CT@drsc@ + \fi + \tabu@everyrow@egroup +}% \tabu@rule@arc@ +\def\taburowcolors {\tabu@everyrow@bgroup \@testopt \tabu@rowcolors 1} +\def\tabu@rowcolors [#1]#2#{\tabu@rowc@lors{#1}{#2}} +\def\tabu@rowc@lors #1#2#3{% + \toks@{}\@defaultunits \count@ =\number0#2\relax \@nnil + \@defaultunits \tabu@start =\number0#1\relax \@nnil + \ifnum \count@<\tw@ \count@=\tw@ \fi + \advance\tabu@start \m@ne + \ifnum \tabu@start<\z@ \tabu@start \z@ \fi + \tabu@rowcolorseries #3\in@..\in@ \@nnil +}% \tabu@rowcolors +\def\tabu@rowcolorseries #1..#2\in@ #3\@nnil {% + \ifx \in@#1\relax + \iftabu@everyrow \toks@{\def\tabu@rc@{}\let\tabu@rc@L \tabu@rc@}% + \else \gdef\tabu@rc@{}\global\let\tabu@rc@G \tabu@rc@ + \fi + \else + \ifx \\#2\\\tabu@rowcolorserieserror \fi + \tabu@sanitizearg{#1}\tabu@temp + \tabu@sanitizearg{#2}\@tempa + \advance\count@ \m@ne + \iftabu@everyrow + \def\tabu@rc@ ##1##2##3##4{\def\tabu@rc@{% + \ifnum ##2=\c@taburow + \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{##3}{##4}\fi + \ifnum \c@taburow<##2 \else + \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\z@ + \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \rowcolor{tabu@rc@\the\tabu@nested}\fi}% + }\edef\x{\noexpand\tabu@rc@ {\the\count@} + {\the\tabu@start} + {\tabu@temp} + {\@tempa}% + }\x + \toks@\expandafter{\expandafter\def\expandafter\tabu@rc@\expandafter{\tabu@rc@}}% + \toks@\expandafter{\the\toks@ \let\tabu@rc@L \tabu@rc@ \ignorespaces}% + \else % inside \noalign + \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{\tabu@temp}{\@tempa}% + \expandafter\resetcolorseries\expandafter[\the\count@]{tabu@rcseries@\the\tabu@nested}% + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \let\noalign \relax \rowcolor{tabu@rc@\the\tabu@nested}% + \def\tabu@rc@ ##1##2{\gdef\tabu@rc@{% + \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\@ne + \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \rowcolor{tabu@rc@\the\tabu@nested}}% + }\edef\x{\noexpand\tabu@rc@{\the\count@}{\the\c@taburow}}\x + \global\let\tabu@rc@G \tabu@rc@ + \fi + \fi + \tabu@everyrow@egroup +}% \tabu@rowcolorseries +\tabuDisableCommands {\let\tabu@rc@ \@empty } +\def\tabu@rowcolorserieserror {\PackageError{tabu} + {Invalid syntax for \string\taburowcolors + \MessageBreak Please look at the documentation!}\@ehd +}% \tabu@rowcolorserieserror +\newcommand*\tabureset {% + \tabulinesep=\z@ \extrarowsep=\z@ \extratabsurround=\z@ + \tabulinestyle{}\everyrow{}\taburulecolor||{}\taburowcolors{}% +}% \tabureset +%% Parsing the line styles ------------------------------------------ +\def\tabu@getline #1{\begingroup + \csname \ifcsname if@safe@actives\endcsname % <babel> + @safe@activestrue\else + relax\fi \endcsname + \edef\tabu@temp{#1}\tabu@sanitizearg{#1}\@tempa + \let\tabu@thestyle \relax + \ifcsname tabu@linestyle@\@tempa \endcsname + \edef\tabu@thestyle{\endgroup + \def\tabu@thestyle{\expandafter\noexpand + \csname tabu@linestyle@\@tempa\endcsname}% + }\tabu@thestyle + \else \expandafter\tabu@definestyle \tabu@temp \@nil + \fi +}% \tabu@getline +\def\tabu@definestyle #1#2\@nil {\endlinechar \m@ne \makeatletter + \tabu@thick \maxdimen \tabu@on \maxdimen \tabu@off \maxdimen + \let\tabu@c@lon \@undefined \let\tabu@c@loff \@undefined + \ifodd 1\ifcat .#1\else\ifcat\relax #1\else 0\fi\fi % catcode 12 or non expandable cs + \def\tabu@temp{\tabu@getparam{thick}}% + \else \def\tabu@temp{\tabu@getparam{thick}\maxdimen}% + \fi + {% + \let\tabu@ \relax + \def\:{\obeyspaces \tabu@oXIII \tabu@commaXIII \edef\:}% (space active \: happy ;-)) + \scantokens{\:{\tabu@temp #1#2 \tabu@\tabu@}}% + \expandafter}\expandafter + \def\expandafter\:\expandafter{\:}% line spec rewritten now ;-) + \def\;{\def\:}% + \scantokens\expandafter{\expandafter\;\expandafter{\:}}% space is now inactive (catcode 10) + \let\tabu@ \tabu@getcolor \:% all arguments are ready now ;-) + \ifdefined\tabu@c@lon \else \let\tabu@c@lon\@empty \fi + \ifx \tabu@c@lon\@empty \def\tabu@c@lon{\CT@arc@}\fi + \ifdefined\tabu@c@loff \else \let\tabu@c@loff \@empty \fi + \ifdim \tabu@on=\maxdimen \ifdim \tabu@off<\maxdimen + \tabu@on \tabulineon \fi\fi + \ifdim \tabu@off=\maxdimen \ifdim \tabu@on<\maxdimen + \tabu@off \tabulineoff \fi\fi + \ifodd 1\ifdim \tabu@off=\maxdimen \ifdim \tabu@on=\maxdimen 0 \fi\fi + \in@true % <leaders> + \else \in@false % <rule> + \fi + \ifdim\tabu@thick=\maxdimen \def\tabu@thick{\arrayrulewidth}% + \else \edef\tabu@thick{\the\tabu@thick}% + \fi + \edef \tabu@thestyle ##1##2{\endgroup + \def\tabu@thestyle{% + \ifin@ \noexpand\tabu@leadersstyle {\tabu@thick} + {\the\tabu@on}{##1} + {\the\tabu@off}{##2}% + \else \noexpand\tabu@rulesstyle + {##1\vrule width \tabu@thick}% + {##1\leaders \hrule height \tabu@thick \hfil}% + \fi}% + }\expandafter \expandafter + \expandafter \tabu@thestyle \expandafter + \expandafter \expandafter + {\expandafter\tabu@c@lon\expandafter}\expandafter{\tabu@c@loff}% +}% \tabu@definestyle +{\catcode`\O=\active \lccode`\O=`\o \catcode`\,=\active + \lowercase{\gdef\tabu@oXIII {\catcode`\o=\active \let O=\tabu@oxiii}} + \gdef\tabu@commaXIII {\catcode`\,=\active \let ,=\space} +}% \catcode +\def\tabu@oxiii #1{% + \ifcase \ifx n#1\z@ \else + \ifx f#1\@ne\else + \tw@ \fi\fi + \expandafter\tabu@onxiii + \or \expandafter\tabu@ofxiii + \else o% + \fi#1}% +\def\tabu@onxiii #1#2{% + \ifcase \ifx !#2\tw@ \else + \ifcat.\noexpand#2\z@ \else + \ifx \tabu@spxiii#2\@ne\else + \tw@ \fi\fi\fi + \tabu@getparam{on}#2\expandafter\@gobble + \or \expandafter\tabu@onxiii % (space is active) + \else o\expandafter\@firstofone + \fi{#1#2}}% +\def\tabu@ofxiii #1#2{% + \ifx #2f\expandafter\tabu@offxiii + \else o\expandafter\@firstofone + \fi{#1#2}} +\def\tabu@offxiii #1#2{% + \ifcase \ifx !#2\tw@ \else + \ifcat.\noexpand#2\z@ \else + \ifx\tabu@spxiii#2\@ne \else + \tw@ \fi\fi\fi + \tabu@getparam{off}#2\expandafter\@gobble + \or \expandafter\tabu@offxiii % (space is active) + \else o\expandafter\@firstofone + \fi{#1#2}} +\def\tabu@getparam #1{\tabu@ \csname tabu@#1\endcsname=} +\def\tabu@getcolor #1{% \tabu@ <- \tabu@getcolor after \edef + \ifx \tabu@#1\else % no more spec + \let\tabu@theparam=#1\afterassignment \tabu@getc@l@r #1\fi +}% \tabu@getcolor +\def\tabu@getc@l@r #1\tabu@ {% + \def\tabu@temp{#1}\tabu@strtrim \tabu@temp + \ifx \tabu@temp\@empty + \else%\ifcsname \string\color@\tabu@temp \endcsname % if the color exists + \ifx \tabu@theparam \tabu@off \let\tabu@c@loff \tabu@c@l@r + \else \let\tabu@c@lon \tabu@c@l@r + \fi + %\else \tabu@warncolour{\tabu@temp}% + \fi%\fi + \tabu@ % next spec +}% \tabu@getc@l@r +\def\tabu@warncolour #1{\PackageWarning{tabu} + {Color #1 is not defined. Default color used}% +}% \tabu@warncolour +\def\tabu@leadersstyle #1#2#3#4#5{\def\tabu@leaders{{#1}{#2}{#3}{#4}{#5}}% + \ifx \tabu@leaders\tabu@leaders@G \else + \tabu@LEADERS{#1}{#2}{#3}{#4}{#5}\fi +}% \tabu@leadersstyle +\def\tabu@rulesstyle #1#2{\let\tabu@leaders \@undefined + \gdef\tabu@thevrule{#1}\gdef\tabu@thehrule{#2}% +}% \tabu@rulesstyle +%% The leaders boxes ------------------------------------------------ +\def\tabu@LEADERS #1#2#3#4#5{%% width, dash, dash color, gap, gap color + {\let\color \tabu@color % => during trials -> \color = \tabu@nocolor + {% % but the leaders boxes should have colors ! + \def\@therule{\vrule}\def\@thick{height}\def\@length{width}% + \def\@box{\hbox}\def\@unbox{\unhbox}\def\@elt{\wd}% + \def\@skip{\hskip}\def\@ss{\hss}\def\tabu@leads{\tabu@hleads}% + \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}% + \global\let\tabu@thehleaders \tabu@theleaders + }% + {% + \def\@therule{\hrule}\def\@thick{width}\def\@length{height}% + \def\@box{\vbox}\def\@unbox{\unvbox}\def\@elt{\ht}% + \def\@skip{\vskip}\def\@ss{\vss}\def\tabu@leads{\tabu@vleads}% + \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}% + \global\let\tabu@thevleaders \tabu@theleaders + }% + \gdef\tabu@leaders@G{{#1}{#2}{#3}{#4}{#5}}% + }% +}% \tabu@LEADERS +\def\tabu@therule #1#2{\@therule \@thick#1\@length\dimexpr#2/2 \@depth\z@} +\def\tabu@l@@d@rs #1#2#3#4#5{%% width, dash, dash color, gap, gap color + \global\setbox \tabu@leads=\@box{% + {#3\tabu@therule{#1}{#2}}% + \ifx\\#5\\\@skip#4\else{#5\tabu@therule{#1}{#4*2}}\fi + {#3\tabu@therule{#1}{#2}}}% + \global\setbox\tabu@leads=\@box to\@elt\tabu@leads{\@ss + {#3\tabu@therule{#1}{#2}}\@unbox\tabu@leads}% + \edef\tabu@theleaders ##1{\def\noexpand\tabu@theleaders {% + {##1\tabu@therule{#1}{#2}}% + \xleaders \copy\tabu@leads \@ss + \tabu@therule{0pt}{-#2}{##1\tabu@therule{#1}{#2}}}% + }\tabu@theleaders{#3}% +}% \tabu@l@@d@rs +%% \tabu \endtabu \tabu* \longtabu \endlongtabu \longtabu* ---------- +\newcommand*\tabu {\tabu@longfalse + \ifmmode \def\tabu@ {\array}\def\endtabu {\endarray}% + \else \def\tabu@ {\tabu@tabular}\def\endtabu {\endtabular}\fi + \expandafter\let\csname tabu*\endcsname \tabu + \expandafter\def\csname endtabu*\endcsname{\endtabu}% + \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget +}% {tabu} +\let\tabu@tabular \tabular % <For LyX: some users redefine \tabular...> +\expandafter\def\csname tabu*\endcsname{\tabuscantokenstrue \tabu} +\newcommand*\longtabu {\tabu@longtrue + \ifmmode\PackageError{tabu}{longtabu not allowed in math mode}\fi + \def\tabu@{\longtable}\def\endlongtabu{\endlongtable}% + \LTchunksize=\@M + \expandafter\let\csname tabu*\endcsname \tabu + \expandafter\def\csname endlongtabu*\endcsname{\endlongtabu}% + \let\LT@startpbox \tabu@LT@startpbox % \everypar{ array struts } + \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget +}% {longtabu} +\expandafter\def\csname longtabu*\endcsname{\tabuscantokenstrue \longtabu} +\def\tabu@nolongtabu{\PackageError{tabu} + {longtabu requires the longtable package}\@ehd} +%% Read the target and then : \tabular or \@array ------------------ +\def\tabu@settarget {\futurelet\@let@token \tabu@sett@rget } +\def\tabu@sett@rget {\tabu@target \z@ + \ifcase \ifx \bgroup\@let@token \z@ \else + \ifx \@sptoken\@let@token \@ne \else + \if t\@let@token \tw@ \else + \if s\@let@token \thr@@\else + \z@\fi\fi\fi\fi + \expandafter\tabu@begin + \or \expandafter\tabu@gobblespace\expandafter\tabu@settarget + \or \expandafter\tabu@to + \or \expandafter\tabu@spread + \fi +}% \tabu@sett@rget +\def\tabu@to to{\def\tabu@halignto{to}\tabu@gettarget} +\def\tabu@spread spread{\tabu@spreadtrue\def\tabu@halignto{spread}\tabu@gettarget} +\def\tabu@gettarget {\afterassignment\tabu@linegoaltarget \tabu@target } +\def\tabu@linegoaltarget {\futurelet\tabu@temp \tabu@linegoalt@rget } +\def\tabu@linegoalt@rget {% + \ifx \tabu@temp\LNGL@setlinegoal + \LNGL@setlinegoal \expandafter \@firstoftwo \fi % @gobbles \LNGL@setlinegoal + \tabu@begin +}% \tabu@linegoalt@rget +\def\tabu@begin #1#{% + \iftabu@measuring \expandafter\tabu@nestedmeasure \fi + \ifdim \tabu@target=\z@ \let\tabu@halignto \@empty + \else \edef\tabu@halignto{\tabu@halignto\the\tabu@target}% + \fi + \@testopt \tabu@tabu@ \tabu@aligndefault #1\@nil +}% \tabu@begin +\long\def\tabu@tabu@ [#1]#2\@nil #3{\tabu@setup + \def\tabu@align {#1}\def\tabu@savedpream{\NC@find #3}% + \tabu@ [\tabu@align ]#2{#3\tabu@rewritefirst }% +}% \tabu@tabu@ +\def\tabu@nestedmeasure {% + \ifodd 1\iftabu@spread \else \ifdim\tabu@target=\z@ \else 0 \fi\fi\relax + \tabu@spreadtrue + \else \begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}% + \expandafter\tabu@collectbody\expandafter\tabu@quickrule + \expandafter\endgroup + \fi +}% \tabu@nestedmeasure +\def\tabu@quickrule {\indent\vrule height\z@ depth\z@ width\tabu@target} +%% \tabu@setup \tabu@init \tabu@indent +\def\tabu@setup{\tabu@alloc@ + \ifcase \tabu@nested + \ifmmode \else \iftabu@spread\else \ifdim\tabu@target=\z@ + \let\tabu@afterendpar \par + \fi\fi\fi + \def\tabu@aligndefault{c}\tabu@init \tabu@indent + \else % <nested tabu> + \def\tabu@aligndefault{t}\let\tabudefaulttarget \linewidth + \fi + \let\tabu@thetarget \tabudefaulttarget \let\tabu@restored \@undefined + \edef\tabu@NC@list{\the\NC@list}\NC@list{\NC@do \tabu@rewritefirst}% + \everycr{}\let\@startpbox \tabu@startpbox % for nested tabu inside longtabu... + \let\@endpbox \tabu@endpbox % idem " " " " " " + \let\@tabarray \tabu@tabarray % idem " " " " " " + \tabu@setcleanup \tabu@setreset +}% \tabu@setup +\def\tabu@init{\tabu@starttimer \tabu@measuringfalse + \edef\tabu@hfuzz {\the\dimexpr\hfuzz+1sp}\global\tabu@footnotes{}% + \let\firsthline \tabu@firsthline \let\lasthline \tabu@lasthline + \let\firstline \tabu@firstline \let\lastline \tabu@lastline + \let\hline \tabu@hline \let\@xhline \tabu@xhline + \let\color \tabu@color \let\@arstrutbox \tabu@arstrutbox + \iftabu@colortbl\else\let\LT@@hline \tabu@LT@@hline \fi + \tabu@trivlist %<restore \\=\@normalcr inside lists> + \let\@footnotetext \tabu@footnotetext \let\@xfootnotetext \tabu@xfootnotetext + \let\@xfootnote \tabu@xfootnote \let\centering \tabu@centering + \let\raggedright \tabu@raggedright \let\raggedleft \tabu@raggedleft + \let\tabudecimal \tabu@tabudecimal \let\Centering \tabu@Centering + \let\RaggedRight \tabu@RaggedRight \let\RaggedLeft \tabu@RaggedLeft + \let\justifying \tabu@justifying \let\rowfont \tabu@rowfont + \let\fbox \tabu@fbox \let\color@b@x \tabu@color@b@x + \let\tabu@@everycr \everycr \let\tabu@@everypar \everypar + \let\tabu@prepnext@tokORI \prepnext@tok\let\prepnext@tok \tabu@prepnext@tok + \let\tabu@multicolumnORI\multicolumn \let\multicolumn \tabu@multicolumn + \let\tabu@startpbox \@startpbox % for nested tabu inside longtabu pfff !!! + \let\tabu@endpbox \@endpbox % idem " " " " " " " + \let\tabu@tabarray \@tabarray % idem " " " " " " " + \tabu@adl@fix \let\endarray \tabu@endarray % <fix> colortbl & arydshln (delarray) + \iftabu@colortbl\CT@everycr\expandafter{\expandafter\iftabu@everyrow \the\CT@everycr \fi}\fi +}% \tabu@init +\def\tabu@indent{% correction for indentation + \ifdim \parindent>\z@\ifx \linewidth\tabudefaulttarget + \everypar\expandafter{% + \the\everypar\everypar\expandafter{\the\everypar}% + \setbox\z@=\lastbox + \ifdim\wd\z@>\z@ \edef\tabu@thetarget + {\the\dimexpr -\wd\z@+\tabudefaulttarget}\fi + \box\z@}% + \fi\fi +}% \tabu@indent +\def\tabu@setcleanup {% saves last global assignments + \ifodd 1\ifmmode \else \iftabu@long \else 0\fi\fi\relax + \def\tabu@aftergroupcleanup{% + \def\tabu@aftergroupcleanup{\aftergroup\tabu@cleanup}}% + \else + \def\tabu@aftergroupcleanup{% + \aftergroup\aftergroup\aftergroup\tabu@cleanup + \let\tabu@aftergroupcleanup \relax}% + \fi + \let\tabu@arc@Gsave \tabu@arc@G + \let\tabu@arc@G \tabu@arc@L % <init> + \let\tabu@drsc@Gsave \tabu@drsc@G + \let\tabu@drsc@G \tabu@drsc@L % <init> + \let\tabu@ls@Gsave \tabu@ls@G + \let\tabu@ls@G \tabu@ls@L % <init> + \let\tabu@rc@Gsave \tabu@rc@G + \let\tabu@rc@G \tabu@rc@L % <init> + \let\tabu@evr@Gsave \tabu@evr@G + \let\tabu@evr@G \tabu@evr@L % <init> + \let\tabu@celllalign@save \tabu@celllalign + \let\tabu@cellralign@save \tabu@cellralign + \let\tabu@cellleft@save \tabu@cellleft + \let\tabu@cellright@save \tabu@cellright + \let\tabu@@celllalign@save \tabu@@celllalign + \let\tabu@@cellralign@save \tabu@@cellralign + \let\tabu@@cellleft@save \tabu@@cellleft + \let\tabu@@cellright@save \tabu@@cellright + \let\tabu@rowfontreset@save \tabu@rowfontreset + \let\tabu@@rowfontreset@save\tabu@@rowfontreset + \let\tabu@rowfontreset \@empty + \edef\tabu@alloc@save {\the\tabu@alloc}% restore at \tabu@reset + \edef\c@taburow@save {\the\c@taburow}% + \edef\tabu@naturalX@save {\the\tabu@naturalX}% + \let\tabu@naturalXmin@save \tabu@naturalXmin + \let\tabu@naturalXmax@save \tabu@naturalXmax + \let\tabu@mkarstrut@save \tabu@mkarstrut + \edef\tabu@clarstrut{% + \extrarowheight \the\dimexpr \ht\@arstrutbox-\ht\strutbox \relax + \extrarowdepth \the\dimexpr \dp\@arstrutbox-\dp\strutbox \relax + \let\noexpand\@arraystretch \@ne \noexpand\tabu@rearstrut}% +}% \tabu@setcleanup +\def\tabu@cleanup {\begingroup + \globaldefs\@ne \tabu@everyrowtrue + \let\tabu@arc@G \tabu@arc@Gsave + \let\CT@arc@ \tabu@arc@G + \let\tabu@drsc@G \tabu@drsc@Gsave + \let\CT@drsc@ \tabu@drsc@G + \let\tabu@ls@G \tabu@ls@Gsave + \let\tabu@ls@ \tabu@ls@G + \let\tabu@rc@G \tabu@rc@Gsave + \let\tabu@rc@ \tabu@rc@G + \let\CT@do@color \relax + \let\tabu@evr@G \tabu@evr@Gsave + \let\tabu@celllalign \tabu@celllalign@save + \let\tabu@cellralign \tabu@cellralign@save + \let\tabu@cellleft \tabu@cellleft@save + \let\tabu@cellright \tabu@cellright@save + \let\tabu@@celllalign \tabu@@celllalign@save + \let\tabu@@cellralign \tabu@@cellralign@save + \let\tabu@@cellleft \tabu@@cellleft@save + \let\tabu@@cellright \tabu@@cellright@save + \let\tabu@rowfontreset \tabu@rowfontreset@save + \let\tabu@@rowfontreset \tabu@@rowfontreset@save + \tabu@naturalX =\tabu@naturalX@save + \let\tabu@naturalXmax \tabu@naturalXmax@save + \let\tabu@naturalXmin \tabu@naturalXmin@save + \let\tabu@mkarstrut \tabu@mkarstrut@save + \c@taburow =\c@taburow@save + \ifcase \tabu@nested \tabu@alloc \m@ne\fi + \endgroup % <end of \globaldefs> + \ifcase \tabu@nested + \the\tabu@footnotes \global\tabu@footnotes{}% + \tabu@afterendpar \tabu@elapsedtime + \fi + \tabu@clarstrut + \everyrow\expandafter {\tabu@evr@G}% +}% \tabu@cleanup +\let\tabu@afterendpar \relax +\def\tabu@setreset {% + \edef\tabu@savedparams {% \relax for \tabu@message@save + \ifmmode \col@sep \the\arraycolsep + \else \col@sep \the\tabcolsep \fi \relax + \arrayrulewidth \the\arrayrulewidth \relax + \doublerulesep \the\doublerulesep \relax + \extratabsurround \the\extratabsurround \relax + \extrarowheight \the\extrarowheight \relax + \extrarowdepth \the\extrarowdepth \relax + \abovetabulinesep \the\abovetabulinesep \relax + \belowtabulinesep \the\belowtabulinesep \relax + \def\noexpand\arraystretch{\arraystretch}% + \ifdefined\minrowclearance \minrowclearance\the\minrowclearance\relax\fi}% + \begingroup + \@temptokena\expandafter{\tabu@savedparams}% => only for \savetabu / \usetabu + \ifx \tabu@arc@L\relax \else \tabu@setsave \tabu@arc@L \fi + \ifx \tabu@drsc@L\relax \else \tabu@setsave \tabu@drsc@L \fi + \tabu@setsave \tabu@ls@L \tabu@setsave \tabu@evr@L + \expandafter \endgroup \expandafter + \def\expandafter\tabu@saved@ \expandafter{\the\@temptokena + \let\tabu@arc@G \tabu@arc@L + \let\tabu@drsc@G \tabu@drsc@L + \let\tabu@ls@G \tabu@ls@L + \let\tabu@rc@G \tabu@rc@L + \let\tabu@evr@G \tabu@evr@L}% + \def\tabu@reset{\tabu@savedparams + \tabu@everyrowtrue \c@taburow \z@ + \let\CT@arc@ \tabu@arc@L + \let\CT@drsc@ \tabu@drsc@L + \let\tabu@ls@ \tabu@ls@L + \let\tabu@rc@ \tabu@rc@L + \global\tabu@alloc \tabu@alloc@save + \everyrow\expandafter{\tabu@evr@L}}% +}% \tabu@reset +\def\tabu@setsave #1{\expandafter\tabu@sets@ve #1\@nil{#1}} +\long\def\tabu@sets@ve #1\@nil #2{\@temptokena\expandafter{\the\@temptokena \def#2{#1}}} +%% The Rewriting Process ------------------------------------------- +\def\tabu@newcolumntype #1{% + \expandafter\tabu@new@columntype + \csname NC@find@\string#1\expandafter\endcsname + \csname NC@rewrite@\string#1\endcsname + {#1}% +}% \tabu@newcolumntype +\def\tabu@new@columntype #1#2#3{% + \def#1##1#3{\NC@{##1}}% + \let#2\relax \newcommand*#2% +}% \tabu@new@columntype +\def\tabu@privatecolumntype #1{% + \expandafter\tabu@private@columntype + \csname NC@find@\string#1\expandafter\endcsname + \csname NC@rewrite@\string#1\expandafter\endcsname + \csname tabu@NC@find@\string#1\expandafter\endcsname + \csname tabu@NC@rewrite@\string#1\endcsname + {#1}% +}% \tabu@privatecolumntype +\def\tabu@private@columntype#1#2#3#4{% + \g@addto@macro\tabu@privatecolumns{\let#1#3\let#2#4}% + \tabu@new@columntype#3#4% +}% \tabu@private@columntype +\let\tabu@privatecolumns \@empty +\newcommand*\tabucolumn [1]{\expandafter \def \expandafter + \tabu@highprioritycolumns\expandafter{\tabu@highprioritycolumns + \NC@do #1}}% +\let\tabu@highprioritycolumns \@empty +%% The | ``column'' : rewriting process -------------------------- +\tabu@privatecolumntype |{\tabu@rewritevline} +\newcommand*\tabu@rewritevline[1][]{\tabu@vlinearg{#1}% + \expandafter \NC@find \tabu@rewritten} +\def\tabu@lines #1{% + \ifx|#1\else \tabu@privatecolumntype #1{\tabu@rewritevline}\fi + \NC@list\expandafter{\the\NC@list \NC@do #1}% +}% \tabu@lines@ +\def\tabu@vlinearg #1{% + \ifx\\#1\\\def\tabu@thestyle {\tabu@ls@}% + \else\tabu@getline {#1}% + \fi + \def\tabu@rewritten ##1{\def\tabu@rewritten{!{##1\tabu@thevline}}% + }\expandafter\tabu@rewritten\expandafter{\tabu@thestyle}% + \expandafter \tabu@keepls \tabu@thestyle \@nil +}% \tabu@vlinearg +\def\tabu@keepls #1\@nil{% + \ifcat $\@cdr #1\@nil $% + \ifx \relax#1\else + \ifx \tabu@ls@#1\else + \let#1\relax + \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer + \tabu@savels\noexpand#1}\fi\fi\fi +}% \tabu@keepls +\def\tabu@thevline {\begingroup + \ifdefined\tabu@leaders + \setbox\@tempboxa=\vtop to\dimexpr + \ht\@arstrutbox+\dp\@arstrutbox{{\tabu@thevleaders}}% + \ht\@tempboxa=\ht\@arstrutbox \dp\@tempboxa=\dp\@arstrutbox + \box\@tempboxa + \else + \tabu@thevrule + \fi \endgroup +}% \tabu@thevline +\def\tabu@savels #1{% + \expandafter\let\csname\string#1\endcsname #1% + \expandafter\def\expandafter\tabu@reset\expandafter{\tabu@reset + \tabu@resetls#1}}% +\def\tabu@resetls #1{\expandafter\let\expandafter#1\csname\string#1\endcsname}% +%% \multicolumn inside tabu environment ----------------------------- +\tabu@newcolumntype \tabu@rewritemulticolumn{% + \aftergroup \tabu@endrewritemulticolumn % after \@mkpream group + \NC@list{\NC@do *}\tabu@textbar \tabu@lines + \tabu@savedecl + \tabu@privatecolumns + \NC@list\expandafter{\the\expandafter\NC@list \tabu@NC@list}% + \let\tabu@savels \relax + \NC@find +}% \tabu@rewritemulticolumn +\def\tabu@endrewritemulticolumn{\gdef\tabu@mkpreambuffer{}\endgroup} +\def\tabu@multicolumn{\tabu@ifenvir \tabu@multic@lumn \tabu@multicolumnORI} +\long\def\tabu@multic@lumn #1#2#3{\multispan{#1}\begingroup + \tabu@everyrowtrue + \NC@list{\NC@do \tabu@rewritemulticolumn}% + \expandafter\@gobbletwo % gobbles \multispan{#1} + \tabu@multicolumnORI{#1}{\tabu@rewritemulticolumn #2}% + {\iftabuscantokens \tabu@rescan \else \expandafter\@firstofone \fi + {#3}}% +}% \tabu@multic@lumn +%% The X column(s): rewriting process ----------------------------- +\tabu@privatecolumntype X[1][]{\begingroup \tabu@siunitx{\endgroup \tabu@rewriteX {#1}}} +\def\tabu@nosiunitx #1{#1{}{}\expandafter \NC@find \tabu@rewritten } +\def\tabu@siunitx #1{\@ifnextchar \bgroup + {\tabu@rewriteX@Ss{#1}} + {\tabu@nosiunitx{#1}}} +\def\tabu@rewriteX@Ss #1#2{\@temptokena{}% + \@defaultunits \let\tabu@temp =#2\relax\@nnil + \ifodd 1\ifx S\tabu@temp \else \ifx s\tabu@temp \else 0 \fi\fi + \def\NC@find{\def\NC@find >####1####2<####3\relax{#1 {####1}{####3}% + }\expandafter\NC@find \the\@temptokena \relax + }\expandafter\NC@rewrite@S \@gobble #2\relax + \else \tabu@siunitxerror + \fi + \expandafter \NC@find \tabu@rewritten +}% \tabu@rewriteX@Ss +\def\tabu@siunitxerror {\PackageError{tabu}{Not a S nor s column ! + \MessageBreak X column can only embed siunitx S or s columns}\@ehd +}% \tabu@siunitxerror +\def\tabu@rewriteX #1#2#3{\tabu@Xarg {#1}{#2}{#3}% + \iftabu@measuring + \else \tabu@measuringtrue % first X column found in the preamble + \let\@halignto \relax \let\tabu@halignto \relax + \iftabu@spread \tabu@spreadtarget \tabu@target \tabu@target \z@ + \else \tabu@spreadtarget \z@ \fi + \ifdim \tabu@target=\z@ + \setlength\tabu@target \tabu@thetarget + \tabu@message{\tabu@message@defaulttarget}% + \else \tabu@message{\tabu@message@target}\fi + \fi +}% \tabu@rewriteX +\def\tabu@rewriteXrestore #1#2#3{\let\@halignto \relax + \def\tabu@rewritten{l}} +\def\tabu@Xarg #1#2#3{% + \advance\tabu@Xcol \@ne \let\tabu@Xlcr \@empty + \let\tabu@Xdisp \@empty \let\tabu@Xmath \@empty + \ifx\\#1\\% <shortcut when no option> + \def\tabu@rewritten{p}\tabucolX \p@ % <default coef = 1> + \else + \let\tabu@rewritten \@empty \let\tabu@temp \@empty \tabucolX \z@ + \tabu@Xparse {}#1\relax + \fi + \tabu@Xrewritten{#2}{#3}% +}% \tabu@Xarg +\def\tabu@Xparse #1{\futurelet\@let@token \tabu@Xtest} +\expandafter\def\expandafter\tabu@Xparsespace\space{\tabu@Xparse{}} +\def\tabu@Xtest{% + \ifcase \ifx \relax\@let@token \z@ \else + \if ,\@let@token \m@ne\else + \if p\@let@token 1\else + \if m\@let@token 2\else + \if b\@let@token 3\else + \if l\@let@token 4\else + \if c\@let@token 5\else + \if r\@let@token 6\else + \if j\@let@token 7\else + \if L\@let@token 8\else + \if C\@let@token 9\else + \if R\@let@token 10\else + \if J\@let@token 11\else + \ifx \@sptoken\@let@token 12\else + \if .\@let@token 13\else + \if -\@let@token 13\else + \ifcat $\@let@token 14\else + 15\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax + \or \tabu@Xtype {p}% + \or \tabu@Xtype {m}% + \or \tabu@Xtype {b}% + \or \tabu@Xalign \raggedright\relax + \or \tabu@Xalign \centering\relax + \or \tabu@Xalign \raggedleft\relax + \or \tabu@Xalign \tabu@justify\relax + \or \tabu@Xalign \RaggedRight\raggedright + \or \tabu@Xalign \Centering\centering + \or \tabu@Xalign \RaggedLeft\raggedleft + \or \tabu@Xalign \justifying\tabu@justify + \or \expandafter \tabu@Xparsespace + \or \expandafter \tabu@Xcoef + \or \expandafter \tabu@Xm@th + \or \tabu@Xcoef{}% + \else\expandafter \tabu@Xparse + \fi +}% \tabu@Xtest +\def\tabu@Xalign #1#2{% + \ifx \tabu@Xlcr\@empty \else \PackageWarning{tabu} + {Duplicate horizontal alignment specification}\fi + \ifdefined#1\def\tabu@Xlcr{#1}\let#1\relax + \else \def\tabu@Xlcr{#2}\let#2\relax\fi + \expandafter\tabu@Xparse +}% \tabu@Xalign +\def\tabu@Xtype #1{% + \ifx \tabu@rewritten\@empty \else \PackageWarning{tabu} + {Duplicate vertical alignment specification}\fi + \def\tabu@rewritten{#1}\expandafter\tabu@Xparse +}% \tabu@Xtype +\def\tabu@Xcoef#1{\edef\tabu@temp{\tabu@temp#1}% + \afterassignment\tabu@Xc@ef \tabu@cnt\number\if-#10\fi +}% \tabu@Xcoef +\def\tabu@Xc@ef{\advance\tabucolX \tabu@temp\the\tabu@cnt\p@ + \tabu@Xparse{}% +}% \tabu@Xc@ef +\def\tabu@Xm@th #1{\futurelet \@let@token \tabu@Xd@sp} +\def\tabu@Xd@sp{\let\tabu@Xmath=$% + \ifx $\@let@token \def\tabu@Xdisp{\displaystyle}% + \expandafter\tabu@Xparse + \else \expandafter\tabu@Xparse\expandafter{\expandafter}% + \fi +}% \tabu@Xd@sp +\def\tabu@Xrewritten {% + \ifx \tabu@rewritten\@empty \def\tabu@rewritten{p}\fi + \ifdim \tabucolX<\z@ \tabu@negcoeftrue + \else\ifdim \tabucolX=\z@ \tabucolX \p@ + \fi\fi + \edef\tabu@temp{{\the\tabu@Xcol}{\tabu@strippt\tabucolX}}% + \edef\tabu@Xcoefs{\tabu@Xcoefs \tabu@ \tabu@temp}% + \edef\tabu@rewritten ##1##2{\def\noexpand\tabu@rewritten{% + >{\tabu@Xlcr \ifx$\tabu@Xmath$\tabu@Xdisp\fi ##1}% + \tabu@rewritten {\tabu@hsize \tabu@temp}% + <{##2\ifx$\tabu@Xmath$\fi}}% + }\tabu@rewritten +}% \tabu@Xrewritten +\def\tabu@hsize #1#2{% + \ifdim #2\p@<\z@ + \ifdim \tabucolX=\maxdimen \tabu@wd{#1}\else + \ifdim \tabu@wd{#1}<-#2\tabucolX \tabu@wd{#1}\else -#2\tabucolX\fi + \fi + \else #2\tabucolX + \fi +}% \tabu@hsize +%% \usetabu and \preamble: rewriting process --------------------- +\tabu@privatecolumntype \usetabu [1]{% + \ifx\\#1\\\tabu@saveerr{}\else + \@ifundefined{tabu@saved@\string#1} + {\tabu@saveerr{#1}} + {\let\tabu@rewriteX \tabu@rewriteXrestore + \csname tabu@saved@\string#1\expandafter\endcsname\expandafter\@ne}% + \fi +}% \NC@rewrite@\usetabu +\tabu@privatecolumntype \preamble [1]{% + \ifx\\#1\\\tabu@saveerr{}\else + \@ifundefined{tabu@saved@\string#1} + {\tabu@saveerr{#1}} + {\csname tabu@saved@\string#1\expandafter\endcsname\expandafter\z@}% + \fi +}% \NC@rewrite@\preamble +%% Controlling the rewriting process ------------------------------- +\tabu@newcolumntype \tabu@rewritefirst{% + \iftabu@long \aftergroup \tabu@longpream % <the whole implementation is here !> + \else \aftergroup \tabu@pream + \fi + \let\tabu@ \relax \let\tabu@hsize \relax + \let\tabu@Xcoefs \@empty \let\tabu@savels \relax + \tabu@Xcol \z@ \tabu@cnt \tw@ + \gdef\tabu@mkpreambuffer{\tabu@{}}\tabu@measuringfalse + \global\setbox\@arstrutbox \box\@arstrutbox + \NC@list{\NC@do *}\tabu@textbar \tabu@lines + \NC@list\expandafter{\the\NC@list \NC@do X}% + \iftabu@siunitx % <siunitx S and s columns> + \NC@list\expandafter{\the\NC@list \NC@do S\NC@do s}\fi + \NC@list\expandafter{\the\expandafter\NC@list \tabu@highprioritycolumns}% + \expandafter\def\expandafter\tabu@NC@list\expandafter{% + \the\expandafter\NC@list \tabu@NC@list}% % * | X S <original> + \NC@list\expandafter{\expandafter \NC@do \expandafter\usetabu + \expandafter \NC@do \expandafter\preamble + \the\NC@list \NC@do \tabu@rewritemiddle + \NC@do \tabu@rewritelast}% + \tabu@savedecl + \tabu@privatecolumns + \edef\tabu@prev{\the\@temptokena}\NC@find \tabu@rewritemiddle +}% NC@rewrite@\tabu@rewritefirst +\tabu@newcolumntype \tabu@rewritemiddle{% + \edef\tabu@temp{\the\@temptokena}\NC@find \tabu@rewritelast +}% \NC@rewrite@\tabu@rewritemiddle +\tabu@newcolumntype \tabu@rewritelast{% + \ifx \tabu@temp\tabu@prev \advance\tabu@cnt \m@ne + \NC@list\expandafter{\tabu@NC@list \NC@do \tabu@rewritemiddle + \NC@do \tabu@rewritelast}% + \else \let\tabu@prev\tabu@temp + \fi + \ifcase \tabu@cnt \expandafter\tabu@endrewrite + \else \expandafter\NC@find \expandafter\tabu@rewritemiddle + \fi +}% \NC@rewrite@\tabu@rewritelast +%% Choosing the strategy -------------------------------------------- +\def\tabu@endrewrite {% + \let\tabu@temp \NC@find + \ifx \@arrayright\relax \let\@arrayright \@empty \fi + \count@=% + \ifx \@finalstrut\tabu@finalstrut \z@ % outer in mode 0 print + \iftabu@measuring + \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer + \tabu@target \csname tabu@\the\tabu@nested.T\endcsname + \tabucolX \csname tabu@\the\tabu@nested.X\endcsname + \edef\@halignto {\ifx\@arrayright\@empty to\tabu@target\fi}}% + \fi + \else\iftabu@measuring 4 % X columns + \xdef\tabu@mkpreambuffer{\tabu@{\tabu@mkpreambuffer + \tabu@target \the\tabu@target + \tabu@spreadtarget \the\tabu@spreadtarget}% + \def\noexpand\tabu@Xcoefs{\tabu@Xcoefs}% + \edef\tabu@halignto{\ifx \@arrayright\@empty to\tabu@target\fi}}% + \let\tabu@Xcoefs \relax + \else\ifcase\tabu@nested \thr@@ % outer, no X + \global\let\tabu@afterendpar \relax + \else \@ne % inner, no X, outer in mode 1 or 2 + \fi + \ifdefined\tabu@usetabu + \else \ifdim\tabu@target=\z@ + \else \let\tabu@temp \tabu@extracolsep + \fi\fi + \fi + \fi + \xdef\tabu@mkpreambuffer{\count@ \the\count@ \tabu@mkpreambuffer}% + \tabu@temp +}% \tabu@endrewrite +\def\tabu@extracolsep{\@defaultunits \expandafter\let + \expandafter\tabu@temp \expandafter=\the\@temptokena \relax\@nnil + \ifx \tabu@temp\@sptoken + \expandafter\tabu@gobblespace \expandafter\tabu@extracolsep + \else + \edef\tabu@temp{\noexpand\NC@find + \if |\noexpand\tabu@temp @% + \else\if !\noexpand\tabu@temp @% + \else !% + \fi\fi + {\noexpand\extracolsep\noexpand\@flushglue}}% + \fi + \tabu@temp +}% \tabu@extrac@lsep +%% Implementing the strategy ---------------------------------------- +\long\def\tabu@pream #1\@preamble {% + \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup + \NC@list\expandafter {\tabu@NC@list}% in case of nesting... + \ifdefined\tabu@usetabu \tabu@usetabu \tabu@target \z@ \fi + \let\tabu@savedpreamble \@preamble + \global\let\tabu@elapsedtime \relax + \tabu@thebody ={#1\tabu@aftergroupcleanup}% + \tabu@thebody =\expandafter{\the\expandafter\tabu@thebody + \@preamble}% + \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens ) + \tabu@select +}% \tabu@pream +\long\def\tabu@longpream #1\LT@bchunk #2\LT@bchunk{% + \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup + \NC@list\expandafter {\tabu@NC@list}% in case of nesting... + \let\tabu@savedpreamble \@preamble + \global\let\tabu@elapsedtime \relax + \tabu@thebody ={#1\LT@bchunk #2\tabu@aftergroupcleanup \LT@bchunk}% + \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens ) + \tabu@select +}% \tabu@longpream +\def\tabu@select {% + \ifnum\tabu@nested>\z@ \tabuscantokensfalse \fi + \ifnum \count@=\@ne \iftabu@measuring \count@=\tw@ \fi\fi + \ifcase \count@ + \global\let\tabu@elapsedtime \relax + \tabu@seteverycr + \expandafter \tabuthepreamble % vertical adjustment (inherited from outer) + \or % exit in vertical measure + struts per cell because no X and outer in mode 3 + \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \tabu@seteverycr + \expandafter \tabuthepreamble + \or % exit without measure because no X and outer in mode 4 + \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty + \tabu@seteverycr + \expandafter \tabuthepreamble + \else % needs trials + \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty + \tabu@savecounters + \expandafter \tabu@setstrategy + \fi +}% \tabu@select +\def\tabu@@ {\gdef\tabu@mkpreambuffer} +%% Protections to set up before trials ------------------------------ +\def\tabu@setstrategy {\begingroup % <trials group> + \tabu@trialh@@k \tabu@cnt \z@ % number of trials + \hbadness \@M \let\hbadness \@tempcnta + \hfuzz \maxdimen \let\hfuzz \@tempdima + \let\write \tabu@nowrite\let\GenericError \tabu@GenericError + \let\savetabu \@gobble \let\tabudefaulttarget \linewidth + \let\@footnotetext \@gobble \let\@xfootnote \tabu@xfootnote + \let\color \tabu@nocolor\let\rowcolor \tabu@norowcolor + \let\tabu@aftergroupcleanup \relax % only after the last trial + \tabu@mkpreambuffer + \ifnum \count@>\thr@@ \let\@halignto \@empty \tabucolX@init + \def\tabu@lasttry{\m@ne\p@}\fi + \begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}\iftabuscantokens \endlinechar=10 \obeyspaces \fi % + \tabu@collectbody \tabu@strategy % +}% \tabu@setstrategy +\def\tabu@savecounters{% + \def\@elt ##1{\csname c@##1\endcsname\the\csname c@##1\endcsname}% + \edef\tabu@clckpt {\begingroup \globaldefs=\@ne \cl@@ckpt \endgroup}\let\@elt \relax +}% \tabu@savecounters +\def\tabucolX@init {% \tabucolX <= \tabu@target / (sum coefs > 0) + \dimen@ \z@ \tabu@Xsum \z@ \tabucolX \z@ \let\tabu@ \tabu@Xinit \tabu@Xcoefs + \ifdim \dimen@>\z@ + \@tempdima \dimexpr \tabu@target *\p@/\dimen@ + \tabu@hfuzz\relax + \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi + \fi +}% \tabucolX@init +\def\tabu@Xinit #1#2{\tabu@Xcol #1 \advance \tabu@Xsum + \ifdim #2\p@>\z@ #2\p@ \advance\dimen@ #2\p@ + \else -#2\p@ \tabu@negcoeftrue + \@tempdima \dimexpr \tabu@target*\p@/\dimexpr-#2\p@\relax \relax + \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi + \tabu@wddef{#1}{0pt}% + \fi +}% \tabu@Xinit +%% Collecting the environment body ---------------------------------- +\long\def\tabu@collectbody #1#2\end #3{% + \edef\tabu@stack{\tabu@pushbegins #2\begin\end\expandafter\@gobble\tabu@stack}% + \ifx \tabu@stack\@empty + \toks@\expandafter{\expandafter\tabu@thebody\expandafter{\the\toks@ #2}% + \def\tabu@end@envir{\end{#3}}% + \iftabuscantokens + \iftabu@long \def\tabu@endenvir {\end{#3}\tabu@gobbleX}% + \else \def\tabu@endenvir {\let\endarray \@empty + \end{#3}\tabu@gobbleX}% + \fi + \else \def\tabu@endenvir {\end{#3}}\fi}% + \let\tabu@collectbody \tabu@endofcollect + \else\def\tabu@temp{#3}% + \ifx \tabu@temp\@empty \toks@\expandafter{\the\toks@ #2\end }% + \else \ifx\tabu@temp\tabu@@spxiii \toks@\expandafter{\the\toks@ #2\end #3}% + \else \ifx\tabu@temp\tabu@X \toks@\expandafter{\the\toks@ #2\end #3}% + \else \toks@\expandafter{\the\toks@ #2\end{#3}}% + \fi\fi\fi + \fi + \tabu@collectbody{#1}% +}% \tabu@collectbody +\long\def\tabu@pushbegins#1\begin#2{\ifx\end#2\else b\expandafter\tabu@pushbegins\fi}% +\def\tabu@endofcollect #1{\ifnum0=`{}\fi + \expandafter\endgroup \the\toks@ #1% +}% \tabu@endofcollect +%% The trials: switching between strategies ------------------------- +\def\tabu@strategy {\relax % stops \count@ assignment ! + \ifcase\count@ % case 0 = print with vertical adjustment (outer is finished) + \expandafter \tabu@endoftrials + \or % case 1 = exit in vertical measure (outer in mode 3) + \expandafter\xdef\csname tabu@\the\tabu@nested.T\endcsname{\the\tabu@target}% + \expandafter\xdef\csname tabu@\the\tabu@nested.X\endcsname{\the\tabucolX}% + \expandafter \tabu@endoftrials + \or % case 2 = exit with a rule replacing the table (outer in mode 4) + \expandafter \tabu@quickend + \or % case 3 = outer is in mode 3 because of no X + \begingroup + \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \expandafter \tabu@measuring + \else % case 4 = horizontal measure + \begingroup + \global\let\tabu@elapsedtime \tabu@message@etime + \long\def\multicolumn##1##2##3{\multispan{##1}}% + \let\tabu@startpboxORI \@startpbox + \iftabu@spread + \def\tabu@naturalXmax {\z@}% + \let\tabu@naturalXmin \tabu@naturalXmax + \tabu@evr{\global\tabu@naturalX \z@}% + \let\@startpbox \tabu@startpboxmeasure + \else\iftabu@negcoef + \let\@startpbox \tabu@startpboxmeasure + \else \let\@startpbox \tabu@startpboxquick + \fi\fi + \expandafter \tabu@measuring + \fi +}% \tabu@strategy +\def\tabu@measuring{\expandafter \tabu@trial \expandafter + \count@ \the\count@ \tabu@endtrial +}% \tabu@measuring +\def\tabu@trial{\iftabu@long \tabu@longtrial \else \tabu@shorttrial \fi} +\def\tabu@shorttrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr + \ifx \tabu@savecounters\relax \else + \let\tabu@savecounters \relax \tabu@clckpt \fi + $\iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi + \expandafter{\expandafter \tabuthepreamble + \the\tabu@thebody + \csname tabu@adl@endtrial\endcsname + \endarray}$\egroup % got \tabu@box +}% \tabu@shorttrial +\def\tabu@longtrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr + \ifx \tabu@savecounters\relax \else + \let\tabu@savecounters \relax \tabu@clckpt \fi + \iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi + \expandafter{\expandafter \tabuthepreamble + \the\tabu@thebody + \tabuendlongtrial}\egroup % got \tabu@box +}% \tabu@longtrial +\def\tabuendlongtrial{% no @ allowed for \scantokens + \LT@echunk \global\setbox\@ne \hbox{\unhbox\@ne}\kern\wd\@ne + \LT@get@widths +}% \tabuendlongtrial +\def\tabu@adl@endtrial{% <arydshln in nested trials - problem for global column counters!> + \crcr \noalign{\global\adl@ncol \tabu@nbcols}}% anything global is crap, junky and fails ! +\def\tabu@seteverycr {\tabu@reset + \everycr \expandafter{\the\everycr \tabu@everycr}% + \let\everycr \tabu@noeverycr % <for ialign> +}% \tabu@seteverycr +\def\tabu@noeverycr{{\aftergroup\tabu@restoreeverycr \afterassignment}\toks@} +\def\tabu@restoreeverycr {\let\everycr \tabu@@everycr} +\def\tabu@everycr {\iftabu@everyrow \noalign{\tabu@everyrow}\fi} +\def\tabu@endoftrials {% + \iftabuscantokens \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\expandafter \tabu@closetrialsgroup \expandafter + \tabu@rescan \expandafter{% + \expandafter\tabuthepreamble + \the\expandafter\tabu@thebody + \iftabu@long \else \endarray \fi}} + {\expandafter\tabu@closetrialsgroup \expandafter + \tabuthepreamble + \the\tabu@thebody}% + \tabu@endenvir % Finish ! +}% \tabu@endoftrials +\def\tabu@closetrialsgroup {% + \toks@\expandafter{\tabu@endenvir}% + \edef\tabu@bufferX{\endgroup + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target + \tabu@cnt \the\tabu@cnt + \def\noexpand\tabu@endenvir{\the\toks@}% + %Quid de \@halignto = \tabu@halignto ?? + }% \tabu@bufferX + \tabu@bufferX + \ifcase\tabu@nested % print out (outer in mode 0) + \global\tabu@cnt \tabu@cnt + \tabu@evr{\tabu@verticaldynamicadjustment}% + \tabu@celllalign@def{\everypar{}}\let\tabu@cellralign \@empty + \let\@finalstrut \tabu@finalstrut + \else % vertical measure of nested tabu + \tabu@evr{\tabu@verticalinit}% + \tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \fi + \tabu@clckpt \let\@halignto \tabu@halignto + \let\@halignto \@empty + \tabu@seteverycr + \ifdim \tabustrutrule>\z@ \ifnum\tabu@nested=\z@ + \setbox\@arstrutbox \box\voidb@x % force \@arstrutbox to be rebuilt (visible struts) + \fi\fi +}% \tabu@closetrialsgroup +\def\tabu@quickend {\expandafter \endgroup \expandafter + \tabu@target \the\tabu@target \tabu@quickrule + \let\endarray \relax \tabu@endenvir +}% \tabu@quickend +\def\tabu@endtrial {\relax % stops \count@ assignment ! + \ifcase \count@ \tabu@err % case 0 = impossible here + \or \tabu@err % case 1 = impossible here + \or \tabu@err % case 2 = impossible here + \or % case 3 = outer goes into mode 0 + \def\tabu@bufferX{\endgroup}\count@ \z@ + \else % case 4 = outer goes into mode 3 + \iftabu@spread \tabu@spreadarith % inner into mode 1 (outer in mode 3) + \else \tabu@arith % or 2 (outer in mode 4) + \fi + \count@=% + \ifcase\tabu@nested \thr@@ % outer goes into mode 3 + \else\iftabu@measuring \tw@ % outer is in mode 4 + \else \@ne % outer is in mode 3 + \fi\fi + \edef\tabu@bufferX{\endgroup + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target}% + \fi + \expandafter \tabu@bufferX \expandafter + \count@ \the\count@ \tabu@strategy +}% \tabu@endtrial +\def\tabu@err{\errmessage{(tabu) Internal impossible error! (\count@=\the\count@)}} +%% The algorithms: compute the widths / stop or go on --------------- +\def\tabu@arithnegcoef {% + \@tempdima \z@ \dimen@ \z@ \let\tabu@ \tabu@arith@negcoef \tabu@Xcoefs +}% \tabu@arithnegcoef +\def\tabu@arith@negcoef #1#2{% + \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ % saturated by definition + \advance\@tempdima #2\tabucolX + \else + \ifdim -#2\tabucolX <\tabu@wd{#1}% c_i X < natural width <= \tabu@target-> saturated + \advance\dimen@ -#2\p@ + \advance\@tempdima -#2\tabucolX + \else + \advance\@tempdima \tabu@wd{#1}% natural width <= c_i X => neutralised + \ifdim \tabu@wd{#1}<\tabu@target \else % neutralised + \advance\dimen@ -#2\p@ % saturated (natural width = tabu@target) + \fi + \fi + \fi +}% \tabu@arith@negcoef +\def\tabu@givespace #1#2{% here \tabu@DELTA < \z@ + \ifdim \@tempdima=\z@ + \tabu@wddef{#1}{\the\dimexpr -\tabu@DELTA*\p@/\tabu@Xsum}% + \else + \tabu@wddef{#1}{\the\dimexpr \tabu@hsize{#1}{#2} + *(\p@ -\tabu@DELTA*\p@/\@tempdima)/\p@\relax}% + \fi +}% \tabu@givespace +\def\tabu@arith {\advance\tabu@cnt \@ne + \ifnum \tabu@cnt=\@ne \tabu@message{\tabu@titles}\fi + \tabu@arithnegcoef + \@tempdimb \dimexpr \wd\tabu@box -\@tempdima \relax % <incompressible material> + \tabu@DELTA = \dimexpr \wd\tabu@box - \tabu@target \relax + \tabu@message{\tabu@message@arith}% + \ifdim \tabu@DELTA <\tabu@hfuzz + \ifdim \tabu@DELTA<\z@ % wd (tabu)<\tabu@target ? + \let\tabu@ \tabu@givespace \tabu@Xcoefs + \advance\@tempdima \@tempdimb \advance\@tempdima -\tabu@DELTA % for message + \else % already converged: nothing to do but nearly impossible... + \fi + \tabucolX \maxdimen + \tabu@measuringfalse + \else % need for narrower X columns + \tabucolX =\dimexpr (\@tempdima -\tabu@DELTA) *\p@/\tabu@Xsum \relax + \tabu@measuringtrue + \@whilesw \iftabu@measuring\fi {% + \advance\tabu@cnt \@ne + \tabu@arithnegcoef + \tabu@DELTA =\dimexpr \@tempdima+\@tempdimb -\tabu@target \relax % always < 0 here + \tabu@message{\tabu@header + \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@ + \tabu@msgalign \@tempdima+\@tempdimb { }{ }{ }{ }{ }\@@ + \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@ + \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@ + \ifdim -\tabu@DELTA<\tabu@hfuzz \tabu@spaces target ok\else + \tabu@msgalign \dimexpr -\tabu@DELTA *\p@/\dimen@ {}{}{}{}{}\@@ + \fi}% + \ifdim -\tabu@DELTA<\tabu@hfuzz + \advance\@tempdima \@tempdimb % for message + \tabu@measuringfalse + \else + \advance\tabucolX \dimexpr -\tabu@DELTA *\p@/\dimen@ \relax + \fi + }% + \fi + \tabu@message{\tabu@message@reached}% + \edef\tabu@bufferX{\endgroup \tabu@cnt \the\tabu@cnt + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target}% +}% \tabu@arith +\def\tabu@spreadarith {% + \dimen@ \z@ \@tempdima \tabu@naturalXmax \let\tabu@ \tabu@spread@arith \tabu@Xcoefs + \edef\tabu@naturalXmin {\the\dimexpr\tabu@naturalXmin*\dimen@/\p@}% + \@tempdimc =\dimexpr \wd\tabu@box -\tabu@naturalXmax+\tabu@naturalXmin \relax + \iftabu@measuring + \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax + \edef\tabu@bufferX{\endgroup \tabucolX \the\tabucolX \tabu@target\the\tabu@target}% + \else + \tabu@message{\tabu@message@spreadarith}% + \ifdim \dimexpr \@tempdimc+\tabu@spreadtarget >\tabu@target + \tabu@message{(tabu) spread + \ifdim \@tempdimc>\tabu@target useless here: default target used% + \else too large: reduced to fit default target\fi.}% + \else + \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax + \tabu@message{(tabu) spread: New target set to \the\tabu@target^^J}% + \fi + \begingroup \let\tabu@wddef \@gobbletwo + \@tempdimb \@tempdima + \tabucolX@init + \tabu@arithnegcoef + \wd\tabu@box =\dimexpr \wd\tabu@box +\@tempdima-\@tempdimb \relax + \expandafter\endgroup \expandafter\tabucolX \the\tabucolX + \tabu@arith + \fi +}% \tabu@spreadarith +\def\tabu@spread@arith #1#2{% + \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ + \else \advance\@tempdima \tabu@wd{#1}\relax + \fi +}% \tabu@spread@arith +%% Reporting in the .log file --------------------------------------- +\def\tabu@message@defaulttarget{% + \ifnum\tabu@nested=\z@^^J(tabu) Default target: + \ifx\tabudefaulttarget\linewidth \string\linewidth + \ifdim \tabu@thetarget=\linewidth \else + -\the\dimexpr\linewidth-\tabu@thetarget\fi = + \else\ifx\tabudefaulttarget\linegoal\string\linegoal= + \fi\fi + \else (tabu) Default target (nested): \fi + \the\tabu@target \on@line + \ifnum\tabu@nested=\z@ , page \the\c@page\fi} +\def\tabu@message@target {^^J(tabu) Target specified: + \the\tabu@target \on@line, page \the\c@page} +\def\tabu@message@arith {\tabu@header + \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@ + \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{ }\@@ + \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@ + \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@ + \ifdim \tabu@DELTA<\tabu@hfuzz giving space\else + \tabu@msgalign \dimexpr (\@tempdima-\tabu@DELTA) *\p@/\tabu@Xsum -\tabucolX {}{}{}{}{}\@@ + \fi +}% \tabu@message@arith +\def\tabu@message@spreadarith {\tabu@spreadheader + \tabu@msgalign \tabu@spreadtarget { }{ }{ }{ }{}\@@ + \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{}\@@ + \tabu@msgalign -\tabu@naturalXmax { }{}{}{}{}\@@ + \tabu@msgalign \tabu@naturalXmin { }{ }{ }{ }{}\@@ + \tabu@msgalign \ifdim \dimexpr\@tempdimc>\tabu@target \tabu@target + \else \@tempdimc+\tabu@spreadtarget \fi + {}{}{}{}{}\@@} +\def\tabu@message@negcoef #1#2{ + \tabu@spaces\tabu@spaces\space * #1. X[\rem@pt#2]: + \space width = \tabu@wd {#1} + \expandafter\string\csname tabu@\the\tabu@nested.W\number#1\endcsname + \ifdim -\tabu@pt#2\tabucolX<\tabu@target + < \number-\rem@pt#2 X + = \the\dimexpr -\tabu@pt#2\tabucolX \relax + \else + <= \the\tabu@target\space < \number-\rem@pt#2 X\fi} +\def\tabu@message@reached{\tabu@header + ******* Reached Target: + hfuzz = \tabu@hfuzz\on@line\space *******} +\def\tabu@message@etime{\edef\tabu@stoptime{\the\pdfelapsedtime}% + \tabu@message{(tabu)\tabu@spaces Time elapsed during measure: + \the\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax sec + \the\numexpr\numexpr(\tabu@stoptime-\tabu@starttime) + -\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax*65536\relax + *1000/65536\relax ms \tabu@spaces(\the\tabu@cnt\space + cycle\ifnum\tabu@cnt>\@ne s\fi)^^J^^J}} +\def\tabu@message@verticalsp {% + \ifdim \@tempdima>\tabu@ht + \ifdim \@tempdimb>\tabu@dp + \expandafter\expandafter\expandafter\string\tabu@ht = + \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@ + \expandafter\expandafter\expandafter\string\tabu@dp = + \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J% + \else + \expandafter\expandafter\expandafter\string\tabu@ht = + \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@^^J% + \fi + \else\ifdim \@tempdimb>\tabu@dp + \tabu@spaces\tabu@spaces\tabu@spaces + \expandafter\expandafter\expandafter\string\tabu@dp = + \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J\fi + \fi +}% \tabu@message@verticalsp +\edef\tabu@spaces{\@spaces} +\def\tabu@strippt{\expandafter\tabu@pt\the} +{\@makeother\P \@makeother\T\lowercase{\gdef\tabu@pt #1PT{#1}}} +\def\tabu@msgalign{\expandafter\tabu@msg@align\the\dimexpr} +\def\tabu@msgalign@PT{\expandafter\tabu@msg@align\romannumeral-`\0\tabu@strippt} +\def\do #1{% + \def\tabu@msg@align##1.##2##3##4##5##6##7##8##9\@@{% + \ifnum##1<10 #1 #1\else + \ifnum##1<100 #1 \else + \ifnum##1<\@m #1\fi\fi\fi + ##1.##2##3##4##5##6##7##8#1}% + \def\tabu@header{(tabu) \ifnum\tabu@cnt<10 #1\fi\the\tabu@cnt) }% + \def\tabu@titles{\ifnum \tabu@nested=\z@ + (tabu) Try#1 #1 tabu X #1 #1 #1tabu Width #1 #1 Target + #1 #1 #1 Coefs #1 #1 #1 Update^^J\fi}% + \def\tabu@spreadheader{% + (tabu) Try#1 #1 Spread #1 #1 tabu Width #1 #1 #1 Nat. X #1 #1 #1 #1Nat. Min. + #1 New Target^^J% + (tabu) sprd} + \def\tabu@message@save {\begingroup + \def\x ####1{\tabu@msg@align ####1{ }{ }{ }{ }{}\@@} + \def\z ####1{\expandafter\x\expandafter{\romannumeral-`\0\tabu@strippt + \dimexpr####1\p@{ }{ }}}% + \let\color \relax \def\tabu@rulesstyle ####1####2{\detokenize{####1}}% + \let\CT@arc@ \relax \let\@preamble \@gobble + \let\tabu@savedpream \@firstofone + \let\tabu@savedparams \@firstofone + \def\tabu@target ####1\relax {(tabu) target #1 #1 #1 #1 #1 = \x{####1}^^J}% + \def\tabucolX ####1\relax {(tabu) X columns width#1 = \x{####1}^^J}% + \def\tabu@nbcols ####1\relax {(tabu) Number of columns: \z{####1}^^J}% + \def\tabu@aligndefault ####1{(tabu) Default alignment: #1 #1 ####1^^J}% + \def\col@sep ####1\relax {(tabu) column sep #1 #1 #1 = \x{####1}^^J}% + \def\arrayrulewidth ####1\relax{(tabu) arrayrulewidth #1 = \x{####1}}% + \def\doublerulesep ####1\relax { doublerulesep = \x{####1}^^J}% + \def\extratabsurround####1\relax{(tabu) extratabsurround = \x{####1}^^J}% + \def\extrarowheight ####1\relax{(tabu) extrarowheight #1 = \x{####1}}% + \def\extrarowdepth ####1\relax {extrarowdepth = \x{####1}^^J}% + \def\abovetabulinesep####1\relax{(tabu) abovetabulinesep=\x{####1} }% + \def\belowtabulinesep####1\relax{ belowtabulinesep=\x{####1}^^J}% + \def\arraystretch ####1{(tabu) arraystretch #1 #1 = \z{####1}^^J}% + \def\minrowclearance####1\relax{(tabu) minrowclearance #1 = \x{####1}^^J}% + \def\tabu@arc@L ####1{(tabu) taburulecolor #1 #1 = ####1^^J}% + \def\tabu@drsc@L ####1{(tabu) tabudoublerulecolor= ####1^^J}% + \def\tabu@evr@L ####1{(tabu) everyrow #1 #1 #1 #1 = \detokenize{####1}^^J}% + \def\tabu@ls@L ####1{(tabu) line style = \detokenize{####1}^^J}% + \def\NC@find ####1\@nil{(tabu) tabu preamble#1 #1 = \detokenize{####1}^^J}% + \def\tabu@wddef####1####2{(tabu) Natural width ####1 = \x{####2}^^J}% + \let\edef \@gobbletwo \let\def \@empty \let\let \@gobbletwo + \tabu@message{% + (tabu) \string\savetabu{\tabu@temp}: \on@line^^J% + \tabu@usetabu \@nil^^J}% + \endgroup} +}\do{ } +%% Measuring the natural width (varwidth) - store the results ------- +\def\tabu@startpboxmeasure #1{\bgroup % entering \vtop + \edef\tabu@temp{\expandafter\@secondoftwo \ifx\tabu@hsize #1\else\relax\fi}% + \ifodd 1\ifx \tabu@temp\@empty 0 \else % starts with \tabu@hsize ? + \iftabu@spread \else % if spread -> measure + \ifdim \tabu@temp\p@>\z@ 0 \fi\fi\fi% if coef>0 -> do not measure + \let\@startpbox \tabu@startpboxORI % restore immediately (nesting) + \tabu@measuringtrue % for the quick option... + \tabu@Xcol =\expandafter\@firstoftwo\ifx\tabu@hsize #1\fi + \ifdim \tabu@temp\p@>\z@ \ifdim \tabu@temp\tabucolX<\tabu@target + \tabu@target=\tabu@temp\tabucolX \fi\fi + \setbox\tabu@box \hbox \bgroup + \begin{varwidth}\tabu@target + \let\FV@ListProcessLine \tabu@FV@ListProcessLine % \hbox to natural width... + \narrowragged \arraybackslash \parfillskip \@flushglue + \ifdefined\pdfadjustspacing \pdfadjustspacing\z@ \fi + \bgroup \aftergroup\tabu@endpboxmeasure + \ifdefined \cellspacetoplimit \tabu@cellspacepatch \fi + \else \expandafter\@gobble + \tabu@startpboxquick{#1}% \@gobble \bgroup + \fi +}% \tabu@startpboxmeasure +\def\tabu@cellspacepatch{\def\bcolumn##1\@nil{}\let\ecolumn\@empty + \bgroup\color@begingroup} +\def\tabu@endpboxmeasure {% + \@finalstrut \@arstrutbox + \end{varwidth}\egroup % <got my \tabu@box> + \ifdim \tabu@temp\p@ <\z@ % neg coef + \ifdim \tabu@wd\tabu@Xcol <\wd\tabu@box + \tabu@wddef\tabu@Xcol {\the\wd\tabu@box}% + \tabu@debug{\tabu@message@endpboxmeasure}% + \fi + \else % spread coef>0 + \global\advance \tabu@naturalX \wd\tabu@box + \@tempdima =\dimexpr \wd\tabu@box *\p@/\dimexpr \tabu@temp\p@\relax \relax + \ifdim \tabu@naturalXmax <\tabu@naturalX + \xdef\tabu@naturalXmax {\the\tabu@naturalX}\fi + \ifdim \tabu@naturalXmin <\@tempdima + \xdef\tabu@naturalXmin {\the\@tempdima}\fi + \fi + \box\tabu@box \egroup % end of \vtop (measure) restore \tabu@target +}% \tabu@endpboxmeasure +\def\tabu@wddef #1{\expandafter\xdef + \csname tabu@\the\tabu@nested.W\number#1\endcsname} +\def\tabu@wd #1{\csname tabu@\the\tabu@nested.W\number#1\endcsname} +\def\tabu@message@endpboxmeasure{\tabu@spaces\tabu@spaces<-> % <-> save natural wd + \the\tabu@Xcol. X[\tabu@temp]: + target = \the\tabucolX \space + \expandafter\expandafter\expandafter\string\tabu@wd\tabu@Xcol + =\tabu@wd\tabu@Xcol +}% \tabu@message@endpboxmeasure +\def\tabu@startpboxquick {\bgroup + \let\@startpbox \tabu@startpboxORI % restore immediately + \let\tabu \tabu@quick % \begin is expanded before... + \expandafter\@gobble \@startpbox % gobbles \bgroup +}% \tabu@startpboxquick +\def\tabu@quick {\begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}\tabu@collectbody \tabu@endquick +}% \tabu@quick +\def\tabu@endquick {% + \ifodd 1\ifx\tabu@end@envir\tabu@endtabu \else + \ifx\tabu@end@envir\tabu@endtabus \else 0\fi\fi\relax + \endgroup + \else \let\endtabu \relax + \tabu@end@envir + \fi +}% \tabu@quick +\def\tabu@endtabu {\end{tabu}} +\def\tabu@endtabus {\end{tabu*}} +%% Measuring the heights and depths - store the results ------------- +\def\tabu@verticalmeasure{\everypar{}% + \ifnum \currentgrouptype>12 % 14=semi-simple, 15=math shift group + \setbox\tabu@box =\hbox\bgroup + \let\tabu@verticalspacing \tabu@verticalsp@lcr + \d@llarbegin % after \hbox ... + \else + \edef\tabu@temp{\ifnum\currentgrouptype=5\vtop + \else\ifnum\currentgrouptype=12\vcenter + \else\vbox\fi\fi}% + \setbox\tabu@box \hbox\bgroup$\tabu@temp \bgroup + \let\tabu@verticalspacing \tabu@verticalsp@pmb + \fi +}% \tabu@verticalmeasure +\def\tabu@verticalsp@lcr{% + \d@llarend \egroup % <got my \tabu@box> + \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep + \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax + \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi + \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi + \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi + \noindent\vrule height\@tempdima depth\@tempdimb +}% \tabu@verticalsp@lcr +\def\tabu@verticalsp@pmb{% inserts struts as needed + \par \expandafter\egroup + \expandafter$\expandafter + \egroup \expandafter + \@tempdimc \the\prevdepth + \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep + \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax + \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi + \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi + \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi + \let\@finalstrut \@gobble + \hrule height\@tempdima depth\@tempdimb width\hsize +%% \box\tabu@box +}% \tabu@verticalsp@pmb + +\def\tabu@verticalinit{% + \ifnum \c@taburow=\z@ \tabu@rearstrut \fi % after \tabu@reset ! + \advance\c@taburow \@ne + \tabu@htdef{\the\ht\@arstrutbox}\tabu@dpdef{\the\dp\@arstrutbox}% + \advance\c@taburow \m@ne +}% \tabu@verticalinit +\def\tabu@htdef {\expandafter\xdef \csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname} +\def\tabu@ht {\csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname} +\def\tabu@dpdef {\expandafter\xdef \csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname} +\def\tabu@dp {\csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname} +\def\tabu@verticaldynamicadjustment {% + \advance\c@taburow \@ne + \extrarowheight \dimexpr\tabu@ht - \ht\strutbox + \extrarowdepth \dimexpr\tabu@dp - \dp\strutbox + \let\arraystretch \@empty + \advance\c@taburow \m@ne +}% \tabu@verticaldynamicadjustment +\def\tabuphantomline{\crcr \noalign{% + {\globaldefs \@ne + \setbox\@arstrutbox \box\voidb@x + \let\tabu@@celllalign \tabu@celllalign + \let\tabu@@cellralign \tabu@cellralign + \let\tabu@@cellleft \tabu@cellleft + \let\tabu@@cellright \tabu@cellright + \let\tabu@@thevline \tabu@thevline + \let\tabu@celllalign \@empty + \let\tabu@cellralign \@empty + \let\tabu@cellright \@empty + \let\tabu@cellleft \@empty + \let\tabu@thevline \relax}% + \edef\tabu@temp{\tabu@multispan \tabu@nbcols{\noindent &}}% + \toks@\expandafter{\tabu@temp \noindent\tabu@everyrowfalse \cr + \noalign{\tabu@rearstrut + {\globaldefs\@ne + \let\tabu@celllalign \tabu@@celllalign + \let\tabu@cellralign \tabu@@cellralign + \let\tabu@cellleft \tabu@@cellleft + \let\tabu@cellright \tabu@@cellright + \let\tabu@thevline \tabu@@thevline}}}% + \expandafter}\the\toks@ +}% \tabuphantomline +%% \firsthline and \lasthline corrections --------------------------- +\def\tabu@firstline {\tabu@hlineAZ \tabu@firsthlinecorrection {}} +\def\tabu@firsthline{\tabu@hlineAZ \tabu@firsthlinecorrection \hline} +\def\tabu@lastline {\tabu@hlineAZ \tabu@lasthlinecorrection {}} +\def\tabu@lasthline {\tabu@hlineAZ \tabu@lasthlinecorrection \hline} +\def\tabu@hline {% replaces \hline if no colortbl (see \AtBeginDocument) + \noalign{\ifnum0=`}\fi + {\CT@arc@\hrule height\arrayrulewidth}% + \futurelet \tabu@temp \tabu@xhline +}% \tabu@hline +\def\tabu@xhline{% + \ifx \tabu@temp \hline + {\ifx \CT@drsc@\relax \vskip + \else\ifx \CT@drsc@\@empty \vskip + \else \CT@drsc@\hrule height + \fi\fi + \doublerulesep}% + \fi + \ifnum0=`{\fi}% +}% \tabu@xhline +\def\tabu@hlineAZ #1#2{\noalign{\ifnum0=`}\fi \dimen@ \z@ \count@ \z@ + \toks@{}\def\tabu@hlinecorrection{#1}\def\tabu@temp{#2}% + \tabu@hlineAZsurround +}% \tabu@hlineAZ +\newcommand*\tabu@hlineAZsurround[1][\extratabsurround]{% + \extratabsurround #1\let\tabucline \tabucline@scan + \let\hline \tabu@hlinescan \let\firsthline \hline + \let\cline \tabu@clinescan \let\lasthline \hline + \expandafter \futurelet \expandafter \tabu@temp + \expandafter \tabu@nexthlineAZ \tabu@temp +}% \tabu@hlineAZsurround +\def\tabu@hlinescan {\tabu@thick \arrayrulewidth \tabu@xhlineAZ \hline} +\def\tabu@clinescan #1{\tabu@thick \arrayrulewidth \tabu@xhlineAZ {\cline{#1}}} +\def\tabucline@scan{\@testopt \tabucline@sc@n {}} +\def\tabucline@sc@n #1[#2]{\tabu@xhlineAZ {\tabucline[{#1}]{#2}}} +\def\tabu@nexthlineAZ{% + \ifx \tabu@temp\hline \else + \ifx \tabu@temp\cline \else + \ifx \tabu@temp\tabucline \else + \tabu@hlinecorrection + \fi\fi\fi +}% \tabu@nexthlineAZ +\def\tabu@xhlineAZ #1{% + \toks@\expandafter{\the\toks@ #1}% + \@tempdimc \tabu@thick % The last line width + \ifcase\count@ \@tempdimb \tabu@thick % The first line width + \else \advance\dimen@ \dimexpr \tabu@thick+\doublerulesep \relax + \fi + \advance\count@ \@ne \futurelet \tabu@temp \tabu@nexthlineAZ +}% \tabu@xhlineAZ +\def\tabu@firsthlinecorrection{% \count@ = number of \hline -1 + \@tempdima \dimexpr \ht\@arstrutbox+\dimen@ + \edef\firsthline{% <local in \noalign> + \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule + height \the\dimexpr\@tempdima+\extratabsurround + depth \dp\@arstrutbox + width \tabustrutrule}\hss}\cr + \noalign{\vskip -\the\dimexpr \@tempdima+\@tempdimb + +\dp\@arstrutbox \relax}% + \the\toks@ + }\ifnum0=`{\fi + \expandafter}\firsthline % we are then ! +}% \tabu@firsthlinecorrection +\def\tabu@lasthlinecorrection{% + \@tempdima \dimexpr \dp\@arstrutbox+\dimen@+\@tempdimb+\@tempdimc + \edef\lasthline{% <local in \noalign> + \the\toks@ + \noalign{\vskip -\the\dimexpr\dimen@+\@tempdimb+\dp\@arstrutbox}% + \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule + depth \the\dimexpr \dp\@arstrutbox+\@tempdimb+\dimen@ + +\extratabsurround-\@tempdimc + height \z@ + width \tabustrutrule}\hss}\cr + }\ifnum0=`{\fi + \expandafter}\lasthline % we are then ! +}% \tabu@lasthlinecorrection +\def\tabu@LT@@hline{% + \ifx\LT@next\hline + \global\let\LT@next \@gobble + \ifx \CT@drsc@\relax + \gdef\CT@LT@sep{% + \noalign{\penalty-\@medpenalty\vskip\doublerulesep}}% + \else + \gdef\CT@LT@sep{% + \multispan\LT@cols{% + \CT@drsc@\leaders\hrule\@height\doublerulesep\hfill}\cr}% + \fi + \else + \global\let\LT@next\empty + \gdef\CT@LT@sep{% + \noalign{\penalty-\@lowpenalty\vskip-\arrayrulewidth}}% + \fi + \ifnum0=`{\fi}% + \multispan\LT@cols + {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr + \CT@LT@sep + \multispan\LT@cols + {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr + \noalign{\penalty\@M}% + \LT@next +}% \tabu@LT@@hline +%% Horizontal lines : \tabucline ------------------------------------ +\let\tabu@start \@tempcnta +\let\tabu@stop \@tempcntb +\newcommand*\tabucline{\noalign{\ifnum0=`}\fi \tabu@cline} +\newcommand*\tabu@cline[2][]{\tabu@startstop{#2}% + \ifnum \tabu@stop<\z@ \toks@{}% + \else \tabu@clinearg{#1}\tabu@thestyle + \edef\tabucline{\toks@{% + \ifnum \tabu@start>\z@ \omit + \tabu@multispan\tabu@start {\span\omit}&\fi + \omit \tabu@multispan\tabu@stop {\span\omit}% + \tabu@thehline\cr + }}\tabucline + \tabu@tracinglines{(tabu:tabucline) Style: #1^^J\the\toks@^^J^^J}% + \fi + \futurelet \tabu@temp \tabu@xcline +}% \tabu@cline +\def\tabu@clinearg #1{% + \ifx\\#1\\\let\tabu@thestyle \tabu@ls@ + \else \@defaultunits \expandafter\let\expandafter\@tempa + \romannumeral-`\0#1\relax \@nnil + \ifx \hbox\@tempa \tabu@clinebox{#1}% + \else\ifx \box\@tempa \tabu@clinebox{#1}% + \else\ifx \vbox\@tempa \tabu@clinebox{#1}% + \else\ifx \vtop\@tempa \tabu@clinebox{#1}% + \else\ifx \copy\@tempa \tabu@clinebox{#1}% + \else\ifx \leaders\@tempa \tabu@clineleads{#1}% + \else\ifx \cleaders\@tempa \tabu@clineleads{#1}% + \else\ifx \xleaders\@tempa \tabu@clineleads{#1}% + \else\tabu@getline {#1}% + \fi\fi\fi\fi\fi\fi\fi\fi + \fi +}% \tabu@clinearg +\def\tabu@clinebox #1{\tabu@clineleads{\xleaders#1\hss}} +\def\tabu@clineleads #1{% + \let\tabu@thestyle \relax \let\tabu@leaders \@undefined + \gdef\tabu@thehrule{#1}} +\def\tabu@thehline{\begingroup + \ifdefined\tabu@leaders + \noexpand\tabu@thehleaders + \else \noexpand\tabu@thehrule + \fi \endgroup +}% \tabu@thehline +\def\tabu@xcline{% + \ifx \tabu@temp\tabucline + \toks@\expandafter{\the\toks@ \noalign + {\ifx\CT@drsc@\relax \vskip + \else \CT@drsc@\hrule height + \fi + \doublerulesep}}% + \fi + \tabu@docline +}% \tabu@xcline +\def\tabu@docline {\ifnum0=`{\fi \expandafter}\the\toks@} +\def\tabu@docline@evr {\xdef\tabu@doclineafter{\the\toks@}% + \ifnum0=`{\fi}\aftergroup\tabu@doclineafter} +\def\tabu@multispan #1#2{% + \ifnum\numexpr#1>\@ne #2\expandafter\tabu@multispan + \else \expandafter\@gobbletwo + \fi {#1-1}{#2}% +}% \tabu@multispan +\def\tabu@startstop #1{\tabu@start@stop #1\relax 1-\tabu@nbcols \@nnil} +\def\tabu@start@stop #1-#2\@nnil{% + \@defaultunits \tabu@start\number 0#1\relax \@nnil + \@defaultunits \tabu@stop \number 0#2\relax \@nnil + \tabu@stop \ifnum \tabu@start>\tabu@nbcols \m@ne + \else\ifnum \tabu@stop=\z@ \tabu@nbcols + \else\ifnum \tabu@stop>\tabu@nbcols \tabu@nbcols + \else \tabu@stop + \fi\fi\fi + \advance\tabu@start \m@ne + \ifnum \tabu@start>\z@ \advance\tabu@stop -\tabu@start \fi +}% \tabu@start@stop +%% Numbers: siunitx S columns (and \tabudecimal) ------------------- +\def\tabu@tabudecimal #1{% + \def\tabu@decimal{#1}\@temptokena{}% + \let\tabu@getdecimal@ \tabu@getdecimal@ignorespaces + \tabu@scandecimal +}% \tabu@tabudecimal +\def\tabu@scandecimal{\futurelet \tabu@temp \tabu@getdecimal@} +\def\tabu@skipdecimal#1{#1\tabu@scandecimal} +\def\tabu@getdecimal@ignorespaces{% + \ifcase 0\ifx\tabu@temp\ignorespaces\else + \ifx\tabu@temp\@sptoken1\else + 2\fi\fi\relax + \let\tabu@getdecimal@ \tabu@getdecimal + \expandafter\tabu@skipdecimal + \or \expandafter\tabu@gobblespace\expandafter\tabu@scandecimal + \else \expandafter\tabu@skipdecimal + \fi +}% \tabu@getdecimal@ignorespaces +\def\tabu@get@decimal#1{\@temptokena\expandafter{\the\@temptokena #1}% + \tabu@scandecimal} +\def\do#1{% + \def\tabu@get@decimalspace#1{% + \@temptokena\expandafter{\the\@temptokena #1}\tabu@scandecimal}% +}\do{ } +\let\tabu@@tabudecimal \tabu@tabudecimal +\def\tabu@getdecimal{% + \ifcase 0\ifx 0\tabu@temp\else + \ifx 1\tabu@temp\else + \ifx 2\tabu@temp\else + \ifx 3\tabu@temp\else + \ifx 4\tabu@temp\else + \ifx 5\tabu@temp\else + \ifx 6\tabu@temp\else + \ifx 7\tabu@temp\else + \ifx 8\tabu@temp\else + \ifx 9\tabu@temp\else + \ifx .\tabu@temp\else + \ifx ,\tabu@temp\else + \ifx -\tabu@temp\else + \ifx +\tabu@temp\else + \ifx e\tabu@temp\else + \ifx E\tabu@temp\else + \ifx\tabu@cellleft\tabu@temp1\else + \ifx\ignorespaces\tabu@temp1\else + \ifx\@sptoken\tabu@temp2\else + 3\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax + \expandafter\tabu@get@decimal + \or \expandafter\tabu@skipdecimal + \or \expandafter\tabu@get@decimalspace + \else\expandafter\tabu@printdecimal + \fi +}% \tabu@getdecimal +\def\tabu@printdecimal{% + \edef\tabu@temp{\the\@temptokena}% + \ifx\tabu@temp\@empty\else + \ifx\tabu@temp\space\else + \expandafter\tabu@decimal\expandafter{\the\@temptokena}% + \fi\fi +}% \tabu@printdecimal +%% Verbatim inside X columns ---------------------------------------- +\def\tabu@verbatim{% + \let\verb \tabu@verb + \let\FV@DefineCheckEnd \tabu@FV@DefineCheckEnd +}% \tabu@verbatim +\let\tabu@ltx@verb \verb +\def\tabu@verb{\@ifstar {\tabu@ltx@verb*} \tabu@ltx@verb} +\def\tabu@fancyvrb {% + \def\tabu@FV@DefineCheckEnd ##1{% + \def\tabu@FV@DefineCheckEnd{% + ##1% <original definition (if fancyvrb is loaded)> + \let\FV@CheckEnd \tabu@FV@CheckEnd + \let\FV@@CheckEnd \tabu@FV@@CheckEnd + \let\FV@@@CheckEnd \tabu@FV@@@CheckEnd + \edef\FV@EndScanning{% + \def\noexpand\next{\noexpand\end{\FV@EnvironName}}% + \global\let\noexpand\FV@EnvironName\relax + \noexpand\next}% + \xdef\FV@EnvironName{\detokenize\expandafter{\FV@EnvironName}}}% + }\expandafter\tabu@FV@DefineCheckEnd\expandafter{\FV@DefineCheckEnd} +}% \tabu@fancyvrb +\def\tabu@FV@CheckEnd #1{\expandafter\FV@@CheckEnd \detokenize{#1\end{}}\@nil} +\edef\tabu@FV@@@CheckEnd {\detokenize{\end{}}} +\begingroup +\catcode`\[1 \catcode`\]2 +\@makeother\{ \@makeother\} + \edef\x[\endgroup + \def\noexpand\tabu@FV@@CheckEnd ##1\detokenize[\end{]##2\detokenize[}]##3% + ]\x \@nil{\def\@tempa{#2}\def\@tempb{#3}} +\def\tabu@FV@ListProcessLine #1{% + \hbox {%to \hsize{% + \kern\leftmargin + \hbox {%to \linewidth{% + \FV@LeftListNumber + \FV@LeftListFrame + \FancyVerbFormatLine{#1}\hss +%% DG/SR modification begin - Jan. 28, 1998 (for numbers=right add-on) +%% \FV@RightListFrame}% + \FV@RightListFrame + \FV@RightListNumber}% +%% DG/SR modification end + \hss}} +%% \savetabu -------------------------------------------------------- +\newcommand*\savetabu[1]{\noalign{% + \tabu@sanitizearg{#1}\tabu@temp + \ifx \tabu@temp\@empty \tabu@savewarn{}{The tabu will not be saved}\else + \@ifundefined{tabu@saved@\tabu@temp}{}{\tabu@savewarn{#1}{Overwriting}}% + \ifdefined\tabu@restored \expandafter\let + \csname tabu@saved@\tabu@temp \endcsname \tabu@restored + \else {\tabu@save}% + \fi + \fi}% +}% \savetabu +\def\tabu@save {% + \toks0\expandafter{\tabu@saved@}% + \iftabu@negcoef + \let\tabu@wddef \relax \let\tabu@ \tabu@savewd \edef\tabu@savewd{\tabu@Xcoefs}% + \toks0\expandafter{\the\toks\expandafter0\tabu@savewd}\fi + \toks1\expandafter{\tabu@savedpream}% + \toks2\expandafter{\tabu@savedpreamble}% + \let\@preamble \relax + \let\tabu@savedpream \relax \let\tabu@savedparams \relax + \edef\tabu@preamble{% + \def\noexpand\tabu@aligndefault{\tabu@align}% + \def\tabu@savedparams {\noexpand\the\toks0}% + \def\tabu@savedpream {\noexpand\the\toks1}}% + \edef\tabu@usetabu{% + \def\@preamble {\noexpand\the\toks2}% + \tabu@target \the\tabu@target \relax + \tabucolX \the\tabucolX \relax + \tabu@nbcols \the\tabu@nbcols \relax + \def\noexpand\tabu@aligndefault{\tabu@align}% + \def\tabu@savedparams {\noexpand\the\toks0}% + \def\tabu@savedpream {\noexpand\the\toks1}}% + \let\tabu@aligndefault \relax \let\@sharp \relax + \edef\@tempa{\noexpand\tabu@s@ved + {\tabu@usetabu} + {\tabu@preamble} + {\the\toks1}}\@tempa + \tabu@message@save +}% \tabu@save +\long\def\tabu@s@ved #1#2#3{% + \def\tabu@usetabu{#1}% <for \tabu@message@save> + \expandafter\gdef\csname tabu@saved@\tabu@temp\endcsname ##1{% + \ifodd ##1% \usetabu + \tabu@measuringfalse \tabu@spreadfalse % Just in case... + \gdef\tabu@usetabu {% + \ifdim \tabu@target>\z@ \tabu@warn@usetabu \fi + \global\let\tabu@usetabu \@undefined + \def\@halignto {to\tabu@target}% + #1% + \ifx \tabu@align\tabu@aligndefault@text + \ifnum \tabu@nested=\z@ + \let\tabu@align \tabu@aligndefault \fi\fi}% + \else % \preamble + \gdef\tabu@preamble {% + \global\let\tabu@preamble \@undefined + #2% + \ifx \tabu@align\tabu@aligndefault@text + \ifnum \tabu@nested=\z@ + \let\tabu@align \tabu@aligndefault \fi\fi}% + \fi + #3}% +}% \tabu@s@ved +\def\tabu@aligndefault@text {\tabu@aligndefault}% +\def\tabu@warn@usetabu {\PackageWarning{tabu} + {Specifying a target with \string\usetabu\space is useless + \MessageBreak The target cannot be changed!}} +\def\tabu@savewd #1#2{\ifdim #2\p@<\z@ \tabu@wddef{#1}{\tabu@wd{#1}}\fi} +\def\tabu@savewarn#1#2{\PackageInfo{tabu} + {User-name `#1' already used for \string\savetabu + \MessageBreak #2}}% +\def\tabu@saveerr#1{\PackageError{tabu} + {User-name `#1' is unknown for \string\usetabu + \MessageBreak I cannot restore an unknown preamble!}\@ehd} +%% \rowfont --------------------------------------------------------- +\newskip \tabu@cellskip +\def\tabu@rowfont{\ifdim \baselineskip=\z@\noalign\fi + {\ifnum0=`}\fi \tabu@row@font} +\newcommand*\tabu@row@font[2][]{% + \ifnum7=\currentgrouptype + \global\let\tabu@@cellleft \tabu@cellleft + \global\let\tabu@@cellright \tabu@cellright + \global\let\tabu@@celllalign \tabu@celllalign + \global\let\tabu@@cellralign \tabu@cellralign + \global\let\tabu@@rowfontreset\tabu@rowfontreset + \fi + \global\let\tabu@rowfontreset \tabu@rowfont@reset + \expandafter\gdef\expandafter\tabu@cellleft\expandafter{\tabu@cellleft #2}% + \ifcsname tabu@cell@#1\endcsname % row alignment + \csname tabu@cell@#1\endcsname \fi + \ifnum0=`{\fi}% end of group / noalign group +}% \rowfont +\def\tabu@ifcolorleavevmode #1{\let\color \tabu@leavevmodecolor #1\let\color\tabu@color}% +\def\tabu@rowfont@reset{% + \global\let\tabu@rowfontreset \tabu@@rowfontreset + \global\let\tabu@cellleft \tabu@@cellleft + \global\let\tabu@cellright \tabu@@cellright + \global\let\tabu@cellfont \@empty + \global\let\tabu@celllalign \tabu@@celllalign + \global\let\tabu@cellralign \tabu@@cellralign +}% \tabu@@rowfontreset +\let\tabu@rowfontreset \@empty % overwritten \AtBeginDocument if colortbl +%% \tabu@prepnext@tok ----------------------------------------------- +\newif \iftabu@cellright +\def\tabu@prepnext@tok{% + \ifnum \count@<\z@ % <first initialisation> + \@tempcnta \@M % <not initialized by array.sty> + \tabu@nbcols\z@ + \let\tabu@fornoopORI \@fornoop + \tabu@cellrightfalse + \else + \ifcase \numexpr \count@-\@tempcnta \relax % (case 0): prev. token is left + \advance \tabu@nbcols \@ne + \iftabu@cellright % before-previous token is right and is finished + \tabu@cellrightfalse % <only once> + \tabu@righttok + \fi + \tabu@lefttok + \or % (case 1) previous token is right + \tabu@cellrighttrue \let\@fornoop \tabu@lastnoop + \else % special column: do not change the token + \iftabu@cellright % before-previous token is right + \tabu@cellrightfalse + \tabu@righttok + \fi + \fi % \ifcase + \fi + \tabu@prepnext@tokORI +}% \tabu@prepnext@tok +\long\def\tabu@lastnoop#1\@@#2#3{\tabu@lastn@@p #2\@nextchar \in@\in@@} +\def\tabu@lastn@@p #1\@nextchar #2#3\in@@{% + \ifx \in@#2\else + \let\@fornoop \tabu@fornoopORI + \xdef\tabu@mkpreambuffer{\tabu@nbcols\the\tabu@nbcols \tabu@mkpreambuffer}% + \toks0\expandafter{\expandafter\tabu@everyrowtrue \the\toks0}% + \expandafter\prepnext@tok + \fi +}% \tabu@lastnoop +\def\tabu@righttok{% + \advance \count@ \m@ne + \toks\count@\expandafter {\the\toks\count@ \tabu@cellright \tabu@cellralign}% + \advance \count@ \@ne +}% \tabu@righttok +\def\tabu@lefttok{\toks\count@\expandafter{\expandafter\tabu@celllalign + \the\toks\count@ \tabu@cellleft}% after because of $ +}% \tabu@lefttok +%% Neutralisation of glues ------------------------------------------ +\let\tabu@cellleft \@empty +\let\tabu@cellright \@empty +\tabu@celllalign@def{\tabu@cellleft}% +\let\tabu@cellralign \@empty +\def\tabu@cell@align #1#2#3{% + \let\tabu@maybesiunitx \toks@ \tabu@celllalign + \global \expandafter \tabu@celllalign@def \expandafter {\the\toks@ #1}% + \toks@\expandafter{\tabu@cellralign #2}% + \xdef\tabu@cellralign{\the\toks@}% + \toks@\expandafter{\tabu@cellleft #3}% + \xdef\tabu@cellleft{\the\toks@}% +}% \tabu@cell@align +\def\tabu@cell@l{% force alignment to left + \tabu@cell@align + {\tabu@removehfil \raggedright \tabu@cellleft}% left + {\tabu@flush1\tabu@ignorehfil}% right + \raggedright +}% \tabu@cell@l +\def\tabu@cell@c{% force alignment to center + \tabu@cell@align + {\tabu@removehfil \centering \tabu@flush{.5}\tabu@cellleft} + {\tabu@flush{.5}\tabu@ignorehfil} + \centering +}% \tabu@cell@c +\def\tabu@cell@r{% force alignment to right + \tabu@cell@align + {\tabu@removehfil \raggedleft \tabu@flush1\tabu@cellleft} + \tabu@ignorehfil + \raggedleft +}% \tabu@cell@r +\def\tabu@cell@j{% force justification (for p, m, b columns) + \tabu@cell@align + {\tabu@justify\tabu@cellleft} + {} + \tabu@justify +}% \tabu@cell@j +\def\tabu@justify{% + \leftskip\z@skip \@rightskip\leftskip \rightskip\@rightskip + \parfillskip\@flushglue +}% \tabu@justify +%% ragged2e settings +\def\tabu@cell@L{% force alignment to left (ragged2e) + \tabu@cell@align + {\tabu@removehfil \RaggedRight \tabu@cellleft} + {\tabu@flush 1\tabu@ignorehfil} + \RaggedRight +}% \tabu@cell@L +\def\tabu@cell@C{% force alignment to center (ragged2e) + \tabu@cell@align + {\tabu@removehfil \Centering \tabu@flush{.5}\tabu@cellleft} + {\tabu@flush{.5}\tabu@ignorehfil} + \Centering +}% \tabu@cell@C +\def\tabu@cell@R{% force alignment to right (ragged2e) + \tabu@cell@align + {\tabu@removehfil \RaggedLeft \tabu@flush 1\tabu@cellleft} + \tabu@ignorehfil + \RaggedLeft +}% \tabu@cell@R +\def\tabu@cell@J{% force justification (ragged2e) + \tabu@cell@align + {\justifying \tabu@cellleft} + {} + \justifying +}% \tabu@cell@J +\def\tabu@flush#1{% + \iftabu@colortbl % colortbl uses \hfill rather than \hfil + \hskip \ifnum13<\currentgrouptype \stretch{#1}% + \else \ifdim#1pt<\p@ \tabu@cellskip + \else \stretch{#1} + \fi\fi \relax + \else % array.sty + \ifnum 13<\currentgrouptype + \hfil \hskip1sp \relax \fi + \fi +}% \tabu@flush +\let\tabu@hfil \hfil +\let\tabu@hfill \hfill +\let\tabu@hskip \hskip +\def\tabu@removehfil{% + \iftabu@colortbl + \unkern \tabu@cellskip =\lastskip + \ifnum\gluestretchorder\tabu@cellskip =\tw@ \hskip-\tabu@cellskip + \else \tabu@cellskip \z@skip + \fi + \else + \ifdim\lastskip=1sp\unskip\fi + \ifnum\gluestretchorder\lastskip =\@ne + \hfilneg % \hfilneg for array.sty but not for colortbl... + \fi + \fi +}% \tabu@removehfil +\def\tabu@ignorehfil{\aftergroup \tabu@nohfil} +\def\tabu@nohfil{% \hfil -> do nothing + restore original \hfil + \def\hfil{\let\hfil \tabu@hfil}% local to (alignment template) group +}% \tabu@nohfil +\def\tabu@colortblalignments {% if colortbl + \def\tabu@nohfil{% + \def\hfil {\let\hfil \tabu@hfil}% local to (alignment template) group + \def\hfill {\let\hfill \tabu@hfill}% (colortbl uses \hfill) pfff... + \def\hskip ####1\relax{\let\hskip \tabu@hskip}}% local +}% \tabu@colortblalignments +%% Taking care of footnotes and hyperfootnotes ---------------------- +\long\def\tabu@footnotetext #1{% + \edef\@tempa{\the\tabu@footnotes + \noexpand\footnotetext [\the\csname c@\@mpfn\endcsname]}% + \global\tabu@footnotes\expandafter{\@tempa {#1}}}% +\long\def\tabu@xfootnotetext [#1]#2{% + \global\tabu@footnotes\expandafter{\the\tabu@footnotes + \footnotetext [{#1}]{#2}}} +\let\tabu@xfootnote \@xfootnote +\long\def\tabu@Hy@ftntext{\tabu@Hy@ftntxt {\the \c@footnote }} +\long\def\tabu@Hy@xfootnote [#1]{% + \begingroup + \value\@mpfn #1\relax + \protected@xdef \@thefnmark {\thempfn}% + \endgroup + \@footnotemark \tabu@Hy@ftntxt {#1}% +}% \tabu@Hy@xfootnote +\long\def\tabu@Hy@ftntxt #1#2{% + \edef\@tempa{% + \the\tabu@footnotes + \begingroup + \value\@mpfn #1\relax + \noexpand\protected@xdef\noexpand\@thefnmark {\noexpand\thempfn}% + \expandafter \noexpand \expandafter + \tabu@Hy@footnotetext \expandafter{\Hy@footnote@currentHref}% + }% + \global\tabu@footnotes\expandafter{\@tempa {#2}% + \endgroup}% +}% \tabu@Hy@ftntxt +\long\def\tabu@Hy@footnotetext #1#2{% + \H@@footnotetext{% + \ifHy@nesting + \hyper@@anchor {#1}{#2}% + \else + \Hy@raisedlink{% + \hyper@@anchor {#1}{\relax}% + }% + \def\@currentHref {#1}% + \let\@currentlabelname \@empty + #2% + \fi + }% +}% \tabu@Hy@footnotetext +%% No need for \arraybackslash ! ------------------------------------ +\def\tabu@latextwoe {% +\def\tabu@temp##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}} +\tabu@temp \tabu@centering \centering \arraybackslash +\tabu@temp \tabu@raggedleft \raggedleft \arraybackslash +\tabu@temp \tabu@raggedright \raggedright \arraybackslash +}% \tabu@latextwoe +\def\tabu@raggedtwoe {% +\def\tabu@temp ##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}} +\tabu@temp \tabu@Centering \Centering \arraybackslash +\tabu@temp \tabu@RaggedLeft \RaggedLeft \arraybackslash +\tabu@temp \tabu@RaggedRight \RaggedRight \arraybackslash +\tabu@temp \tabu@justifying \justifying \arraybackslash +}% \tabu@raggedtwoe +\def\tabu@normalcrbackslash{\let\\\@normalcr} +\def\tabu@trivlist{\expandafter\def\expandafter\@trivlist\expandafter{% + \expandafter\tabu@normalcrbackslash \@trivlist}} +%% Utilities: \fbox \fcolorbox and \tabudecimal ------------------- +\def\tabu@fbox {\leavevmode\afterassignment\tabu@beginfbox \setbox\@tempboxa\hbox} +\def\tabu@beginfbox {\bgroup \kern\fboxsep + \bgroup\aftergroup\tabu@endfbox} +\def\tabu@endfbox {\kern\fboxsep\egroup\egroup + \@frameb@x\relax} +\def\tabu@color@b@x #1#2{\leavevmode \bgroup + \def\tabu@docolor@b@x{#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}% + \afterassignment\tabu@begincolor@b@x \setbox\z@ \hbox +}% \tabu@color@b@x +\def\tabu@begincolor@b@x {\kern\fboxsep \bgroup + \aftergroup\tabu@endcolor@b@x \set@color} +\def\tabu@endcolor@b@x {\kern\fboxsep \egroup + \dimen@\ht\z@ \advance\dimen@ \fboxsep \ht\z@ \dimen@ + \dimen@\dp\z@ \advance\dimen@ \fboxsep \dp\z@ \dimen@ + \tabu@docolor@b@x \egroup +}% \tabu@endcolor@b@x +%% Corrections (arydshln, delarray, colortbl) ----------------------- +\def\tabu@fix@arrayright {%% \@arrayright is missing from \endarray + \iftabu@colortbl + \ifdefined\adl@array % <colortbl + arydshln> + \def\tabu@endarray{% + \adl@endarray \egroup \adl@arrayrestore \CT@end \egroup %<original> + \@arrayright % <FC> + \gdef\@preamble{}}% <FC> + \else % <colortbl / no arydshln> + \def\tabu@endarray{% + \crcr \egroup \egroup %<original> + \@arrayright % <FC> + \gdef\@preamble{}\CT@end}% + \fi + \else + \ifdefined\adl@array % <arydshln / no colortbl> + \def\tabu@endarray{% + \adl@endarray \egroup \adl@arrayrestore \egroup %<original> + \@arrayright % <FC> + \gdef\@preamble{}}% <FC> + \else % <no arydshln / no colotbl + \@arrayright missing> + \PackageWarning{tabu} + {\string\@arrayright\space is missing from the + \MessageBreak definition of \string\endarray. + \MessageBreak Compatibility with delarray.sty is broken.}% + \fi\fi +}% \tabu@fix@arrayright +\def\tabu@adl@xarraydashrule #1#2#3{% + \ifnum\@lastchclass=\adl@class@start\else + \ifnum\@lastchclass=\@ne\else + \ifnum\@lastchclass=5 \else % <FC> @-arg (class 5) and !-arg (class 1) + \adl@leftrulefalse \fi\fi % must be treated the same + \fi + \ifadl@zwvrule\else \ifadl@inactive\else + \@addtopreamble{\vrule\@width\arrayrulewidth + \@height\z@ \@depth\z@}\fi \fi + \ifadl@leftrule + \@addtopreamble{\adl@vlineL{\CT@arc@}{\adl@dashgapcolor}% + {\number#1}#3}% + \else \@addtopreamble{\adl@vlineR{\CT@arc@}{\adl@dashgapcolor}% + {\number#2}#3} + \fi +}% \tabu@adl@xarraydashrule +\def\tabu@adl@act@endpbox {% + \unskip \ifhmode \nobreak \fi \@finalstrut \@arstrutbox + \egroup \egroup + \adl@colhtdp \box\adl@box \hfil +}% \tabu@adl@act@endpbox +\def\tabu@adl@fix {% + \let\adl@xarraydashrule \tabu@adl@xarraydashrule % <fix> arydshln + \let\adl@act@endpbox \tabu@adl@act@endpbox % <fix> arydshln + \let\adl@act@@endpbox \tabu@adl@act@endpbox % <fix> arydshln + \let\@preamerror \@preamerr % <fix> arydshln +}% \tabu@adl@fix +%% Correction for longtable' \@startbox definition ------------------ +%% => \everypar is ``missing'' : TeX should be in vertical mode +\def\tabu@LT@startpbox #1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \everypar{% + \vrule \@height \ht\@arstrutbox \@width \z@ + \everypar{}}% +}% \tabu@LT@startpbox +%% \tracingtabu and the package options ------------------ +\DeclareOption{delarray}{\AtEndOfPackage{\RequirePackage{delarray}}} +\DeclareOption{linegoal}{% + \AtEndOfPackage{% + \RequirePackage{linegoal}[2010/12/07]% + \let\tabudefaulttarget \linegoal% \linegoal is \linewidth if not pdfTeX +}} +\DeclareOption{scantokens}{\tabuscantokenstrue} +\DeclareOption{debugshow}{\AtEndOfPackage{\tracingtabu=\tw@}} +\def\tracingtabu {\begingroup\@ifnextchar=% + {\afterassignment\tabu@tracing\count@} + {\afterassignment\tabu@tracing\count@1\relax}} +\def\tabu@tracing{\expandafter\endgroup + \expandafter\tabu@tr@cing \the\count@ \relax +}% \tabu@tracing +\def\tabu@tr@cing #1\relax {% + \ifnum#1>\thr@@ \let\tabu@tracinglines\message + \else \let\tabu@tracinglines\@gobble + \fi + \ifnum#1>\tw@ \let\tabu@DBG \tabu@@DBG + \def\tabu@mkarstrut {\tabu@DBG@arstrut}% + \tabustrutrule 1.5\p@ + \else \let\tabu@DBG \@gobble + \def\tabu@mkarstrut {\tabu@arstrut}% + \tabustrutrule \z@ + \fi + \ifnum#1>\@ne \let\tabu@debug \message + \else \let\tabu@debug \@gobble + \fi + \ifnum#1>\z@ + \let\tabu@message \message + \let\tabu@tracing@save \tabu@message@save + \let\tabu@starttimer \tabu@pdftimer + \else + \let\tabu@message \@gobble + \let\tabu@tracing@save \@gobble + \let\tabu@starttimer \relax + \fi +}% \tabu@tr@cing +%% Setup \AtBeginDocument +\AtBeginDocument{\tabu@AtBeginDocument} +\def\tabu@AtBeginDocument{\let\tabu@AtBeginDocument \@undefined + \ifdefined\arrayrulecolor \tabu@colortbltrue % <colortbl> + \tabu@colortblalignments % different glues are used + \else \tabu@colortblfalse \fi + \ifdefined\CT@arc@ \else \let\CT@arc@ \relax \fi + \ifdefined\CT@drsc@\else \let\CT@drsc@ \relax \fi + \let\tabu@arc@L \CT@arc@ \let\tabu@drsc@L \CT@drsc@ + \ifodd 1\ifcsname siunitx_table_collect_begin:Nn\endcsname % <siunitx: ok> + \expandafter\ifx + \csname siunitx_table_collect_begin:Nn\endcsname\relax 0\fi\fi\relax + \tabu@siunitxtrue + \else \let\tabu@maybesiunitx \@firstofone % <not siunitx: setup> + \let\tabu@siunitx \tabu@nosiunitx + \tabu@siunitxfalse + \fi + \ifdefined\adl@array % <arydshln> + \else \let\tabu@adl@fix \relax + \let\tabu@adl@endtrial \@empty \fi + \ifdefined\longtable % <longtable> + \else \let\longtabu \tabu@nolongtabu \fi + \ifdefined\cellspacetoplimit \tabu@warn@cellspace\fi + \csname\ifcsname ifHy@hyperfootnotes\endcsname % <hyperfootnotes> + ifHy@hyperfootnotes\else iffalse\fi\endcsname + \let\tabu@footnotetext \tabu@Hy@ftntext + \let\tabu@xfootnote \tabu@Hy@xfootnote \fi + \ifdefined\FV@DefineCheckEnd% <fancyvrb> + \tabu@fancyvrb \fi + \ifdefined\color % <color / xcolor> + \let\tabu@color \color + \def\tabu@leavevmodecolor ##1{% + \def\tabu@leavevmodecolor {\leavevmode ##1}% + }\expandafter\tabu@leavevmodecolor\expandafter{\color}% + \else + \let\tabu@color \tabu@nocolor + \let\tabu@leavevmodecolor \@firstofone \fi + \tabu@latextwoe + \ifdefined\@raggedtwoe@everyselectfont % <ragged2e> + \tabu@raggedtwoe + \else + \let\tabu@cell@L \tabu@cell@l + \let\tabu@cell@R \tabu@cell@r + \let\tabu@cell@C \tabu@cell@c + \let\tabu@cell@J \tabu@cell@j \fi + \expandafter\in@ \expandafter\@arrayright \expandafter{\endarray}% + \ifin@ \let\tabu@endarray \endarray + \else \tabu@fix@arrayright \fi% <fix for colortbl & arydshln (delarray)> + \everyrow{}% +}% \tabu@AtBeginDocument +\def\tabu@warn@cellspace{% + \PackageWarning{tabu}{% + Package cellspace has some limitations + \MessageBreak And redefines some macros of array.sty. + \MessageBreak Please use \string\tabulinesep\space to control + \MessageBreak vertical spacing of lines inside tabu environment}% +}% \tabu@warn@cellspace +%% tabu Package initialisation +\tabuscantokensfalse +\let\tabu@arc@G \relax +\let\tabu@drsc@G \relax +\let\tabu@evr@G \@empty +\let\tabu@rc@G \@empty +\def\tabu@ls@G {\tabu@linestyle@}% +\let\tabu@@rowfontreset \@empty % <init> +\let\tabu@@celllalign \@empty +\let\tabu@@cellralign \@empty +\let\tabu@@cellleft \@empty +\let\tabu@@cellright \@empty +\def\tabu@naturalXmin {\z@} +\def\tabu@naturalXmax {\z@} +\let\tabu@rowfontreset \@empty +\def\tabulineon {4pt}\let\tabulineoff \tabulineon +\tabu@everyrowtrue +\ifdefined\pdfelapsedtime % <pdfTeX> + \def\tabu@pdftimer {\xdef\tabu@starttime{\the\pdfelapsedtime}}% +\else \let\tabu@pdftimer \relax \let\tabu@message@etime \relax +\fi +\tracingtabu=\z@ +\newtabulinestyle {=\maxdimen}% creates the 'factory' settings \tabu@linestyle@ +\tabulinestyle{} +\taburowcolors{} +\let\tabudefaulttarget \linewidth +\ProcessOptions* % \ProcessOptions* is quicker ! +\endinput +%% +%% End of file `tabu.sty'. |
