coriolis/chamsin/src/technology/ATechnology.h

52 lines
1.6 KiB
C
Raw Normal View History

#ifndef ATECHNOLOGY_H_
#define ATECHNOLOGY_H_
#include "Property.h"
using namespace Hurricane;
namespace Hurricane {
class Technology;
}
class ATechnology : public PrivateProperty {
2008-05-06 08:34:26 -05:00
public:
typedef PrivateProperty Inherit;
2008-05-06 08:34:26 -05:00
class PhysicalRule {
public:
PhysicalRule(const string& name,
2008-05-06 08:34:26 -05:00
double value,
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
};
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);
void addPhysicalRule(const string& name, double value, const string& reference);
void print();
2008-05-19 06:34:13 -05:00
virtual Name getName() const;
2008-05-19 06:34:13 -05:00
virtual string _getTypeName() const;
ATechnology():
Inherit(),
2008-05-19 06:34:13 -05:00
_physicalRules() {}
private:
2008-05-19 06:34:13 -05:00
PhysicalRules _physicalRules;
};
2008-05-06 08:34:26 -05:00
#endif /* ATECHNOLOGY_H_*/