ROOM » Core » C++ Classes » TextDumper
TextDumper Class
Reference for room::TextDumper. Moreā¦
| Header: | #include "text_dump.h" |
|---|---|
| CMake: | target_link_libraries(mytarget PRIVATE ROOM::room_utils) |
Public Functions
| void dump(const Database & db, std::ostream & out) const | Writes a human-readable summary of the database to an output stream. |
Detailed Description
Member Function Documentation
void dump(const Database & db, std::ostream & out) const
Writes a human-readable summary of the database to an output stream.
| Parameter | Description |
|---|---|
db | Database to dump (typically loaded from a .room file or built in memory). |
out | Destination stream (for example std::cout or a std::stringstream). |
void dumpToFile(const Database & db, const std::string & path) const
Writes the same text dump as dump() to a file.
| Parameter | Description |
|---|---|
db | Database to dump. |
path | Output text file path. The file is created or overwritten. |
Throws: std::runtime_error if the file cannot be opened for writing.
Output format
=== ROOM text dump ===
version: 1.0
generator: ROOM GdsImporter
lib: gds_import
layers: 3
cells: 2
cell "TOP"
type layout dbuPerMicron=1000.000 dbuPerEditorUnit=0.000
bbox=(0,0)-(5000,5000)
shapes=2 instances=1 nets=0
shape polygon layer=L1/D0 points=4
instance -> "INV" at (2000,2000)
Example
room::Database db = room::Database::loadFromFile("design.room");
room::TextDumper dumper;
dumper.dump(db, std::cout);
dumper.dumpToFile(db, "design.txt");