#ifndef BEHAVIORAL_H
#define BEHAVIORAL_H
#include <string>
#include "arch.h"
namespace hub {

class BehavDescr;
// =====================================================================
//	BehavArch
// ---------------------------------------------------------------------
class BehavArch: public ArchImpl {
private:
    BehavDescr* description_;
public:
    BehavArch (void) { flags_.set(is); }

    template <class Descr>
	Descr* createDescription(void);
    template <class Descr>
	Descr* description(void) { return dynamic_cast <Descr*> (description_); }
	void description (BehavDescr* d) { description_ = d; }

    static const AttrUnique <Architecture> is;
};
// ---------------------------------------------------------------------
template <class Descr>
Descr* BehavArch::createDescription (void) {
    if( description_ ) return NULL;
    Descr* newDescription = new Descr();
    description_ = newDescription;
    return newDescription;
}
// ---------------------------------------------------------------------
class BehavDescr {
private:
public:
  virtual std::string getDescrName() = 0;
  virtual ~BehavDescr() {}
};
// --------------------------------------------------------------------------
class BehavAgent {
public:
	virtual bool Eq (const BehavDescr*) const =0;		// compare func equivalence
	virtual BehavDescr* CreateDescr (void) const =0;	// create log representation
	virtual ~BehavAgent() {}
};
}
#endif
