#ifndef INCLUDE_LEARN_ATOMIPORT____LEARN____SILENT_HPP_
#define INCLUDE_LEARN_ATOMIPORT____LEARN____SILENT_HPP_

#include <AtomInternalPort.hpp>

#include <learn/PT__learn__silent.hpp>
#include <learn/PV__learn__silent.hpp>

class AtomIPort__learn__silent : public AtomInternalPort {
public:
    AtomIPort__learn__silent(const string &name);
    virtual ~AtomIPort__learn__silent();

    PortValue &portValue() const;
    bool hasPortValue() const;
    void setPortValue(PortValue &portValue);
    void clearPortValue();

    bool isEnabled() const;
    void setIsEnabled(bool b);
    bool isDisabledByPriorities() const;
    void setIsDisabledByPriorities(bool b);

protected:
    PV__learn__silent *mPortValue;

private:
    bool mIsEnabled;
    bool mIsDisabledByPriorities;
}; 

inline
PortValue &AtomIPort__learn__silent::portValue() const {
    return *mPortValue;
}

inline
bool AtomIPort__learn__silent::hasPortValue() const {
    return mPortValue != NULL;
}

inline
void AtomIPort__learn__silent::setPortValue(PortValue &portValue) {
    assert(dynamic_cast<PV__learn__silent *>(&portValue) != NULL);
    mPortValue = static_cast<PV__learn__silent *> (&portValue);
}
inline
void AtomIPort__learn__silent::clearPortValue() {
    mPortValue = NULL;
}

inline
bool AtomIPort__learn__silent::isEnabled() const {
    return mIsEnabled;
}

inline
void AtomIPort__learn__silent::setIsEnabled(bool b) {
    mIsEnabled = b;
}

inline
bool AtomIPort__learn__silent::isDisabledByPriorities() const {
    return mIsDisabledByPriorities;
}

inline
void AtomIPort__learn__silent::setIsDisabledByPriorities(bool b) {
    mIsDisabledByPriorities = b;
}

#endif // INCLUDE_LEARN_ATOMIPORT____LEARN____SILENT_HPP_
