#ifndef _BIP_Engine_PriorityItf_HPP_
#define _BIP_Engine_PriorityItf_HPP_

#include <bip-engineiface-config.hpp>
using namespace bipbasetypes;
using namespace biptypes;

// referenced classes
class Compound;
class Interaction;


class PriorityItf {
 public:
  // destructor
  virtual ~PriorityItf();

  // operations
  virtual bool guard() const = 0;

  // getters for references
  Interaction &low() const { return *mLow; }
  bool hasLow() const { return mLow != NULL; }
  Interaction &high() const { return *mHigh; }
  bool hasHigh() const { return mHigh != NULL; }

  // opposites accessors
  Compound &holder() const { return *mHolder; }
  bool hasHolder() const { return mHolder != NULL; }
  void setHolder(Compound &compound) { mHolder = &compound; }

 protected:
  // protected constructors
  PriorityItf(Interaction *low, Interaction *high);

  // references
  Interaction *const mLow;
  Interaction *const mHigh;

  // opposites
  Compound *mHolder;
};

#endif // _BIP_Engine_PriorityItf_HPP_
