%% Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
%%
%% This file is part of Olena.
%%
%% Olena is free software: you can redistribute it and/or modify it under
%% the terms of the GNU General Public License as published by the Free
%% Software Foundation, version 2 of the License.
%%
%% Olena is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
%% General Public License for more details.
%%
%% You should have received a copy of the GNU General Public License
%% along with Olena.  If not, see <http://www.gnu.org/licenses/>.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Common set of commands related to Milena. %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%
%------------------------------------------
% Doxygen color theme for listings.
%------------------------------------------
%
\usepackage{listings}

%%%LISTINGS SETTINGS
%\begin{latexonly}
\definecolor{ccomment}{rgb}{0.5,0,0}
\definecolor{cstring}{rgb}{0,0.32,0.5}
\definecolor{cidentifier}{rgb}{0,0.5,0}
\definecolor{cbg}{rgb}{0.95,0.95,0.95}

\lstset{frameround=fttt}
\lstloadlanguages{[ISO]C++}
\lstset{language=[ISO]C++,
  captionpos=b,
  basicstyle={\small\sffamily}, % normal small footnotesize scriptsize tiny
  commentstyle=\itshape,
  showstringspaces=false,
  numberstyle=\tiny,
  morekeywords={where, auto, concept, concept_map, axiom, late_check, final, abstract},
  morecomment=[s]{/*}{*/},
  backgroundcolor=\color{cbg},
  identifierstyle=\color{black},
  stringstyle=\color{cstring}
}
%\end{latexonly}



%
%------------------------------------------
% Set of Tikz drawings.
%------------------------------------------
%

\usepackage{tikz}

\usetikzlibrary{er}

\newcommand{\neighcfour}{%
\begin{latexonly}
\begin{tikzpicture}%
  \tikzstyle{every entity}=[draw=blue!50,fill=blue!20,thick]%
  %center
  \draw (0,0) node[fill=orange!20,draw=orange] {} ;
  %left
  \draw (-0.25,0) node[entity,draw] {};
  %right
  \draw (0.26,0) node[entity,draw] {};%
  %top
  \draw (0,0.25) node[entity,draw] {};%
  %bottom
  \draw (0,-0.25) node[entity,draw] {};%
\end{tikzpicture}%
\end{latexonly}
}

\newcommand{\neighceight}{%
\begin{latexonly}
\begin{tikzpicture}%
  \tikzstyle{every entity}=[draw=blue!50,fill=blue!20,thick]%
  %center
  \draw (0,0) node[fill=orange!20,draw=orange] {} ;
  %left
  \draw (-0.25,0) node[entity,draw] {};
  %right
  \draw (0.26,0) node[entity,draw] {};%
  %top
  \draw (0,0.25) node[entity,draw] {};%
  %bottom
  \draw (0,-0.25) node[entity,draw] {};%
  %Top left
  \draw (-0.25,0.25) node[entity,draw] {};
  %Top right
  \draw (0.26,0.25) node[entity,draw] {};%
  %Bottom left
  \draw (-0.25,-0.25) node[entity,draw] {};%
  %Bottom Right
  \draw (0.26,-0.25) node[entity,draw] {};%
\end{tikzpicture}%
\end{latexonly}
}

\newcommand{\wincfour}{%
\begin{latexonly}
\begin{tikzpicture}%
  \tikzstyle{every entity}=[draw=blue!50,fill=blue!20,thick]%
  %center
  \draw (0,0) node[entity,draw] {} ;
  %left
  \draw (-0.25,0) node[entity,draw] {};
  %right
  \draw (0.26,0) node[entity,draw] {};%
  %top
  \draw (0,0.25) node[entity,draw] {};%
  %bottom
  \draw (0,-0.25) node[entity,draw] {};%

\end{tikzpicture}%
\end{latexonly}
}

\newcommand{\winceight}{%
\begin{latexonly}
\begin{tikzpicture}%
  \tikzstyle{every entity}=[draw=blue!50,fill=blue!20,thick]%
  %center
  \draw (0,0) node[entity,draw] {} ;
  %left
  \draw (-0.25,0) node[entity,draw] {};
  %right
  \draw (0.26,0) node[entity,draw] {};%
  %top
  \draw (0,0.25) node[entity,draw] {};%
  %bottom
  \draw (0,-0.25) node[entity,draw] {};%
  %Top left
  \draw (-0.25,0.25) node[entity,draw] {};
  %Top right
  \draw (0.26,0.25) node[entity,draw] {};%
  %Bottom left
  \draw (-0.25,-0.25) node[entity,draw] {};%
  %Bottom Right
  \draw (0.26,-0.25) node[entity,draw] {};%
\end{tikzpicture}%
\end{latexonly}
}

