#ifndef PLA_H
#define PLA_H
#include "behavioral.h"
#include <list>
namespace hub {

// ---------------------------------------------------------------------
class PlaDescr: public BehavDescr {
private:
  int inputNo_;
  int outputNo_;
  std::list<std::string> inputMatrix;
  std::list<std::string> outputMatrix;
  bool f_;
  bool d_;
  bool r_;
public:
  std::string getDescrName();
  void type(std::string type);
  std::string type(void) const;
  void setMatrices(std::list<std::string> &m);
  int inputNo(void) const { return inputNo_; }
  int outputNo(void) const { return outputNo_; }
  void inputNo(int n) { inputNo_ = n; }
  void outputNo(int n) { outputNo_ = n; }
  PlaDescr():f_(false), d_(false), r_(false) {}
  PlaDescr(int inpN, int outpN, std::string tp, std::list<std::string>& m):
    inputNo_(inpN), outputNo_(outpN)
  {
    type(tp);
    setMatrices(m);
  }

  typedef std::list<std::string>::const_iterator MatrixIter;
  MatrixIter inpBeg (void) const { return inputMatrix.begin (); }
  MatrixIter inpEnd (void) const { return inputMatrix.end (); }
  MatrixIter outpBeg (void) const { return outputMatrix.begin(); }
  MatrixIter outpEnd (void) const { return outputMatrix.end(); }
};
// ---------------------------------------------------------------------
class PlaAgent: public BehavAgent {
private:
  PlaDescr repr_;

public:
  virtual bool Eq (const BehavDescr*) const;		// compare func equivalence
  virtual BehavDescr* CreateDescr (void) const;	// create log representation

  PlaAgent(int inpN, int outpN, std::string tp, std::list<std::string>& m):
    repr_(inpN, outpN, tp, m) { }

};
}
#endif
