#ifndef INCLUDE_PRIORITIES__XIN__XATOM_ATOMIPORT____PRIORITIES__XIN__XATOM____PORT_HPP_
#define INCLUDE_PRIORITIES__XIN__XATOM_ATOMIPORT____PRIORITIES__XIN__XATOM____PORT_HPP_

#include <AtomInternalPort.hpp>

#include <priorities_xin_xatom/PT__priorities_xin_xatom__Port.hpp>
#include <priorities_xin_xatom/PV__priorities_xin_xatom__Port.hpp>

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

    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__priorities_xin_xatom__Port *mPortValue;

private:
    bool mIsEnabled;
    bool mIsDisabledByPriorities;
}; 

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

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

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

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

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

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

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

#endif // INCLUDE_PRIORITIES__XIN__XATOM_ATOMIPORT____PRIORITIES__XIN__XATOM____PORT_HPP_
