#ifndef INCLUDE_LEARN_INTERV____LEARN____SINGLETON_HPP_
#define INCLUDE_LEARN_INTERV____LEARN____SINGLETON_HPP_


#include <learn/Inter__learn__singleton.hpp>

class Port;
class PortValue;
class ConnT__learn__singleton;

class InterV__learn__singleton : public InteractionValue {
public:
    virtual ~InterV__learn__singleton();

    // getters for references (declared pure virtual in interface)
    virtual const Interaction &interaction() const { return mInteraction; }
    virtual const vector<PortValue *> &portValues() const;
    virtual bool hasPortValues() const;

    // specific operations
    const vector<Port *> &ports() const { return mInteraction.ports(); }

    // Only allow the connector to call the ctor here (see createInteractionValue() method)
    friend class ConnT__learn__singleton;

protected:
    InterV__learn__singleton(const ConnT__learn__singleton &connector, const Interaction& interaction, const vector<PortValue *> &values);
    Inter__learn__singleton mInteraction;
    vector<PortValue *> &portValues();
    vector<PortValue *> mPortValues;

    void commonRecycle(const Interaction& interaction, const vector<PortValue *> &values);


}; 

inline
const vector<PortValue *> &InterV__learn__singleton::portValues() const {
    return this->mPortValues;
}

inline
bool InterV__learn__singleton::hasPortValues() const {
    return (!this->mPortValues.empty());
}

inline
vector<PortValue *> &InterV__learn__singleton::portValues() {
    return mPortValues;
}

#endif // INCLUDE_LEARN_INTERV____LEARN____SINGLETON_HPP_
