\ProvidesClass{myStyle}
\LoadClass[a4paper, 12pt]{report}
\usepackage{subfigure,sectsty,anysize,natbib,amssymb,graphicx,fancyhdr,lastpage,setspace,chemarr,listings,url}	
\usepackage{hyperref}
\usepackage[compact]{titlesec} 
\sloppy

 
\def\@title{}
\def\@author{}
\def\degree#1{\gdef\@degree{#1}}
\def\supervisor#1{\gdef\@supervisor{#1}}
\def\intexaminer#1{\gdef\@intexaminer{#1}}
\def\extexaminer#1{\gdef\@extexaminer{#1}}
\def\submissionDate#1{\gdef\@submissionDate{#1}}

\renewcommand\floatpagefraction{.85}
\renewcommand\topfraction{.85}
\renewcommand\bottomfraction{.85}
\renewcommand\textfraction{.15}   
\setcounter{totalnumber}{50}
\setcounter{topnumber}{50}
\setcounter{bottomnumber}{50}

\newcommand{\includeListing}[2]{
  \begin{flushleft}
  \framebox[\textwidth][l]{
  	\includegraphics[scale=0.8]{floppy.eps}
  	\normalsize\scshape File \textit{#1}
  }
  \end{flushleft}
  \lstset{language=C++,
 					firstnumber=auto,
 					numbers=left, 
  				numberstyle=\scriptsize, 
  				stepnumber=1, 
  				numbersep=5pt,
  				tabsize=3,
  				xleftmargin=18pt,
  				basicstyle=\scriptsize,
  				breaklines}  
  \lstinputlisting{#2}  
}

\newcommand{\MCS}{\sffamily \expandafter{MCS.bl}\normalfont} 


\newcommand{\printListingNewPage}[2]{
	\newpage
  \includeListing{#1}{#2}
} 

\providecommand{\e}[1]{\ensuremath{\times 10^{#1}}}


\newcommand{\printListing}[2]{
  \includeListing{#1}{#2}
}

\marginsize{3cm}{3cm}{2cm}{2cm}

\def\titlep{%
	\doublespacing
	\thispagestyle{empty}%	
	\begin{center}
	\textbf{\Large\expandafter{\@title}}
	\\[20pt]
	\Large by
	\\[20pt]
	\singlespacing
	\textbf{\large\expandafter{\@author}}
	\\[7pt] 
	\textbf{\large\expandafter{\@degree}}
	\\[20pt] 	
	\begin{figure}[h]
		\centering
			\includegraphics[scale=0.4]{logo}
		\label{fig:dcu}
	\end{figure}
	\vspace{20pt}
	\normalfont\large \textbf{Supervisor:} \expandafter{\@supervisor}
	\\[20pt] 
	\normalfont\large \textbf{Internal examiner:} \expandafter{\@intexaminer}
	\\[10pt] 
	\normalfont\large \textbf{External examiner:} \expandafter{\@extexaminer}
	\\[50pt] 
	\normalfont\ A thesis submitted to the School of Electronic Engineering
	\\[10pt] 
	Dublin City University for the degree of
	\\[30pt] 
	\textbf{Doctor of Philosophy}
	\\[30pt] 
	\normalfont\large\expandafter{\@submissionDate}
	\end{center}	

\doublespacing
\newpage\normalsize


\lhead{}
\chead{}
\lfoot{}
\rfoot{}
\cfoot{Page: \thepage }




\chapternumberfont{\sffamily\mdseries\upshape\LARGE} 
\chaptertitlefont{\sffamily\mdseries\upshape\LARGE} 
\sectionfont{\sffamily\mdseries\upshape\Large} 
\subsectionfont{\sffamily\mdseries\upshape\large}
\subsubsectionfont{\sffamily\mdseries\upshape\normalsize} 


}


\setlength{\headheight}{15pt}

