#pragma once

#include "Point.h"

#include <memory>
#include <vector>
#include <unordered_map>
#include <string>

class Edge;

class AbstractFace
{
public:

    enum class Orientation
    {
        CW,
        CCW
    };

    AbstractFace(std::size_t id=0);

    virtual ~AbstractFace();

    virtual std::vector<std::size_t> getNodeIds() const = 0;

    void addVectorAttribute(const std::string& tag, const std::vector<double>& values);

    std::vector<double> getVectorAttribute(const std::string& tag) const;

    virtual std::size_t getNumNodes() const = 0;

    virtual void associateWidthEdges() = 0;

    virtual std::vector<std::size_t> getEdgeIds() const = 0;

    virtual std::vector<Point> getNodeLocations(Orientation orientation = Orientation::CCW) const = 0;

    virtual void replaceEdge(Edge* original, Edge* replacement) = 0;

    void setIndex(std::size_t idx);

protected:
    std::size_t mId{0};
    std::unordered_map<std::string, std::vector<double> > mVectorAttributes;
};
