#ifndef INCLUDED_TYPES_H_
#define INCLUDED_TYPES_H_

#include <string>
#include <vector>
#include <map>

struct Types
{
    enum Reply
    {
        NO_MAIL,        // don't send mail, only log the message
        REPLY,          // send a reply to d_from (and d_cc)
        REPLY_FROM,     // send a reply to d_from
        PANIC,          // send a mail to Frank, and to d_from if available
    };

    enum Type
    {
        ERR,
        HDR,
        IH,
        INL,
        SRC,
        TXT,            // txt file in the .pdf
        SKIP,           // not shown in the .pdf
        CODE,           // used for, e.g., grammar and scanner files
    };

    struct Element
    {
        Type type;
        size_t idx;         // line idx in order.txt
        std::string name;   // name of the file 
    };

    using ElementVect = std::vector<Element>;
                                        // the first field is used so
                                        // the exercises are shown in order
                                        // or their numbers in the pdf
    using VectConstIter = ElementVect::const_iterator;

                                            // iterators of all elements 
                                            // having the same prefix
    using ConstIterVect = std::vector<VectConstIter>;
    using ConstIterVectIter = ConstIterVect::const_iterator;

    using VectConstIterPair = std::pair<ConstIterVectIter, 
                                        ConstIterVectIter>;

    using Map = std::map<size_t, ElementVect>;
    using MapValue = Map::value_type;
    using MapConstIter = Map::const_iterator;
};

#endif
