ROOM » Core » C++ Classes » Property
Property Class
String key/value metadata attached to libraries, cells, shapes, and instances. Moreā¦
| Header: | #include "property.h" |
|---|---|
| CMake: | target_link_libraries(mytarget PRIVATE ROOM::room) |
Public Types
None.
Public Functions
| Property() | Default constructor. Empty name and value. |
| Property(std::string n, std::string v) | Constructs a property pair. |
Public Variables
std::string name | Property key (for example "gds.prop.128" or "author"). |
std::string value | Property value. GDS typed values use prefixes i2:, i4:, s:, rhex:. |
Detailed Description
room::Property is a simple POD type used throughout the database for tool-specific and interchange metadata. GDS user attributes imported by GdsImporter are stored with names gds.prop.<attr> and typed value strings. Custom tools may use arbitrary string keys.
Member Function Documentation
Property()
Default constructor. Creates an empty property.
Property(std::string n, std::string v)
Constructs a property with the given name and value.
| Parameter | Description |
|---|---|
n | Property name. |
v | Property value. |
Example
room::Shape::RectData rect{{0, 0, 100, 100}, 0};
room::Shape shape(rect);
shape.properties().push_back({"author", "team"});
shape.properties().push_back({"gds.prop.1", "s:metal1"});
room::Lib & lib = db.lib();
lib.properties().push_back({"source", "gds_import"});