#ifndef INCLUDE_LEARN_ATOMEPORT____LEARN____SILENT_HPP_
#define INCLUDE_LEARN_ATOMEPORT____LEARN____SILENT_HPP_

#include <AtomExportPort.hpp>
#include <learn/AtomIPort__learn__silent.hpp>

#include <learn/PT__learn__silent.hpp>

class AtomEPort__learn__silent :
    public virtual Port,
    public AtomExportPort,
    public PT__learn__silent {
public:
    AtomEPort__learn__silent(const string &name, bool hasEarlyUpdate);
    virtual ~AtomEPort__learn__silent();
    virtual void addInternalPort(AtomIPort__learn__silent &p);

    virtual vector<PortValue *> &portValues();
    virtual const vector<PortValue *> &portValues() const;
    virtual bool hasPortValues() const;
    virtual void addPortValue(PortValue &port);
    virtual void clearPortValues();

    virtual bool isReset() const;
    void setIsReset(bool b);

protected:
// Getting messy to store actual type and return more abstract one (thanks to vector template...)
//    vector<PV__learn__silent *> mPortValues;
    vector<PortValue *> mPortValues;
    bool mIsReset;
}; 


inline
void AtomEPort__learn__silent::addInternalPort(AtomIPort__learn__silent &p) {
    AtomExportPort::addInternalPort(p);
}

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

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

inline
bool AtomEPort__learn__silent::hasPortValues() const {
    return !mPortValues.empty();
}

inline
void AtomEPort__learn__silent::addPortValue(PortValue &port) {
    mPortValues.push_back(&port);
}

inline
void AtomEPort__learn__silent::clearPortValues() {
    mPortValues.clear();
}

inline
bool AtomEPort__learn__silent::isReset() const {
    return mIsReset;
}

inline
void AtomEPort__learn__silent::setIsReset(bool b) {
    mIsReset = b;
}
#endif // INCLUDE_LEARN_ATOMEPORT____LEARN____SILENT_HPP_
