2008-05-05 06:07:14 -05:00
|
|
|
#ifndef ATECHNOLOGY_H_
|
|
|
|
#define ATECHNOLOGY_H_
|
|
|
|
|
2008-05-06 11:23:45 -05:00
|
|
|
#include "Property.h"
|
|
|
|
using namespace Hurricane;
|
|
|
|
|
|
|
|
namespace Hurricane {
|
|
|
|
class Technology;
|
|
|
|
}
|
|
|
|
|
|
|
|
class ATechnology : public PrivateProperty {
|
2008-05-06 08:34:26 -05:00
|
|
|
public:
|
2008-05-06 11:23:45 -05:00
|
|
|
typedef PrivateProperty Inherit;
|
|
|
|
|
2008-05-06 08:34:26 -05:00
|
|
|
class PhysicalRule {
|
|
|
|
public:
|
2008-05-06 11:23:45 -05:00
|
|
|
PhysicalRule(const string& name,
|
2008-05-06 08:34:26 -05:00
|
|
|
double value,
|
2008-05-06 11:23:45 -05:00
|
|
|
const string& reference):
|
2008-05-19 06:34:13 -05:00
|
|
|
_name(name),
|
|
|
|
_value(value),
|
|
|
|
_reference(reference) {}
|
2008-05-06 08:34:26 -05:00
|
|
|
PhysicalRule(const PhysicalRule& physicalRule):
|
2008-05-19 06:34:13 -05:00
|
|
|
_name(physicalRule._name),
|
|
|
|
_value(physicalRule._value),
|
|
|
|
_reference(physicalRule._reference) {}
|
|
|
|
const string _name;
|
|
|
|
const double _value;
|
|
|
|
const string _reference;
|
|
|
|
double getValue() const { return _value; }
|
2008-05-06 08:34:26 -05:00
|
|
|
};
|
2008-05-06 11:23:45 -05:00
|
|
|
typedef map<string, ATechnology::PhysicalRule*> PhysicalRules;
|
|
|
|
static ATechnology* create(Hurricane::Technology* technology);
|
|
|
|
static ATechnology* getATechnology(Hurricane::Technology* technology);
|
2008-05-19 06:34:13 -05:00
|
|
|
const PhysicalRule* getPhysicalRule(const string& name);
|
2008-05-06 11:23:45 -05:00
|
|
|
void addPhysicalRule(const string& name, double value, const string& reference);
|
|
|
|
void print();
|
2008-05-19 06:34:13 -05:00
|
|
|
|
2008-05-06 11:23:45 -05:00
|
|
|
virtual Name getName() const;
|
2008-05-19 06:34:13 -05:00
|
|
|
|
2008-05-06 11:23:45 -05:00
|
|
|
virtual string _getTypeName() const;
|
|
|
|
|
|
|
|
ATechnology():
|
|
|
|
Inherit(),
|
2008-05-19 06:34:13 -05:00
|
|
|
_physicalRules() {}
|
2008-05-06 11:23:45 -05:00
|
|
|
|
|
|
|
private:
|
2008-05-19 06:34:13 -05:00
|
|
|
PhysicalRules _physicalRules;
|
2008-05-05 06:07:14 -05:00
|
|
|
};
|
|
|
|
|
2008-05-06 08:34:26 -05:00
|
|
|
#endif /* ATECHNOLOGY_H_*/
|