2008-05-05 06:07:14 -05:00
|
|
|
#ifndef ATECHNOLOGY_H_
|
|
|
|
#define ATECHNOLOGY_H_
|
|
|
|
|
2008-05-22 06:45:09 -05:00
|
|
|
#include "hurricane/Property.h"
|
2008-05-06 11:23:45 -05:00
|
|
|
using namespace Hurricane;
|
|
|
|
|
|
|
|
namespace Hurricane {
|
|
|
|
class Technology;
|
2008-05-19 14:32:21 -05:00
|
|
|
class Layer;
|
2008-05-06 11:23:45 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
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-19 14:32:21 -05:00
|
|
|
PhysicalRule(const Name& 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) {}
|
2008-05-19 14:32:21 -05:00
|
|
|
const Name _name;
|
2008-05-19 06:34:13 -05:00
|
|
|
const double _value;
|
|
|
|
const string _reference;
|
|
|
|
double getValue() const { return _value; }
|
2008-05-06 08:34:26 -05:00
|
|
|
};
|
2008-05-26 11:37:14 -05:00
|
|
|
|
|
|
|
struct PhysicalRuleNameCompare:
|
|
|
|
public std::binary_function<const PhysicalRule*, const PhysicalRule*, bool> {
|
|
|
|
bool operator()(const PhysicalRule* pr1, const PhysicalRule* pr2) const {
|
|
|
|
return pr1->_name < pr2->_name;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef set<ATechnology::PhysicalRule*, PhysicalRuleNameCompare> PhysicalRules;
|
2008-05-19 14:32:21 -05:00
|
|
|
typedef map<Layer*, PhysicalRules> OneLayerPhysicalRules;
|
|
|
|
typedef pair<Layer*, Layer*> LayerPair;
|
|
|
|
typedef map<LayerPair, PhysicalRules> TwoLayersPhysicalRules;
|
2008-05-26 11:37:14 -05:00
|
|
|
|
2008-05-06 11:23:45 -05:00
|
|
|
static ATechnology* create(Hurricane::Technology* technology);
|
|
|
|
static ATechnology* getATechnology(Hurricane::Technology* technology);
|
2008-05-19 14:32:21 -05:00
|
|
|
const PhysicalRule* getPhysicalRule(const Name& name);
|
|
|
|
void addPhysicalRule(const Name& name, double value, const string& reference);
|
|
|
|
void addPhysicalRule(const Name& name, const Name& layerName, double value, const string& reference);
|
|
|
|
void addPhysicalRule(const Name& name, const Name& layer1Name,
|
|
|
|
const Name& layer2Name, double value, const string& reference);
|
|
|
|
Layer* getLayer(const Name& layerName);
|
2008-05-06 11:23:45 -05:00
|
|
|
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 14:32:21 -05:00
|
|
|
_noLayerPhysicalRules(),
|
|
|
|
_oneLayerPhysicalRules(),
|
|
|
|
_twoLayersPhysicalRules() {}
|
2008-05-06 11:23:45 -05:00
|
|
|
|
|
|
|
private:
|
2008-05-19 14:32:21 -05:00
|
|
|
PhysicalRules _noLayerPhysicalRules;
|
|
|
|
OneLayerPhysicalRules _oneLayerPhysicalRules;
|
|
|
|
TwoLayersPhysicalRules _twoLayersPhysicalRules;
|
2008-05-05 06:07:14 -05:00
|
|
|
};
|
|
|
|
|
2008-05-06 08:34:26 -05:00
|
|
|
#endif /* ATECHNOLOGY_H_*/
|