Skip to content

Commit

Permalink
Modified db json files to use schema tag: Signed-off-by: Andy Fox and…
Browse files Browse the repository at this point in the history
…y<rushc.com>

Signed-off-by: andyfox-rushc <[email protected]>
  • Loading branch information
andyfox-rushc committed Apr 2, 2024
2 parents f8a303a + d712784 commit c356437
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 67 deletions.
1 change: 1 addition & 0 deletions src/odb/include/odb/geom_boost.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

#pragma once

#include <boost/geometry.hpp>
#include <boost/geometry/geometries/register/point.hpp>
#include <boost/polygon/polygon.hpp>

Expand Down
24 changes: 16 additions & 8 deletions src/odb/src/codeGenerator/schema/chip/dbModBterm.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,55 @@
{
"name":"_name",
"type":"char *",
"flags":["no-set","no-serial"]
"flags":["no-set"],
"schema":"db_schema_update_hierarchy"
},
{
"name":"_flags",
"type":"uint",
"flags":["private","no-serial"]
"flags":["private"],
"schema":"db_schema_update_hierarchy"
},
{
"name":"_parent_moditerm",
"type":"dbId<_dbModITerm>",
"parent":"dbBlock",
"flags":["private","no-serial"]
"flags":["private"],
"schema":"db_schema_update_hierarchy"
},
{
"name":"_parent",
"type":"dbId<_dbModule>",
"flags":["no-set","no-serial"],
"flags":["no-set"],
"schema":"db_schema_update_hierarchy",
"parent":"dbBlock"
},
{
"name":"_modnet",
"type":"dbId<_dbModNet>",
"flags":["private","no-serial"],
"flags":["private"],
"schema":"db_schema_update_hierarchy",
"parent":"dbBlock"
},
{
"name":"_next_net_modbterm",
"type":"dbId<_dbModBTerm>",
"flags":["private","no-serial"],
"flags":["private"],
"schema":"db_schema_update_hierarchy",
"parent":"dbBlock"
},
{
"name":"_prev_net_modbterm",
"type":"dbId<_dbModBTerm>",
"flags":["private","no-serial"],
"flags":["private"],
"schema":"db_schema_update_hierarchy",
"parent":"dbBlock"
},
{
"name":"_next_entry",
"type":"dbId<_dbModBTerm>",
"flags":["private","no-serial"],
"flags":["private"],
"schema":"db_schema_update_hierarchy",
"parent":"dbBlock"
}
],
Expand Down
23 changes: 15 additions & 8 deletions src/odb/src/codeGenerator/schema/chip/dbModIterm.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,49 @@
{
"name":"_name",
"type":"char *",
"flags":["no-set","no-serial"]
"flags":["no-set"],
"schema":"db_schema_update_hierarchy"
},
{
"name":"_parent",
"type":"dbId<_dbModInst>",
"flags":["no-set","no-serial"],
"flags":["no-set"],
"schema":"db_schema_update_hierarchy",
"parent":"dbBlock"
},
{
"name":"_child_modbterm",
"type":"dbId<_dbModBTerm>",
"parent":"dbBlock",
"flags":["private","no-serial"]
"flags":["private"],
"schema":"db_schema_update_hierarchy"
},
{
"name":"_mod_net",
"type":"dbId<_dbModNet>",
"flags":["private","no-serial"],
"flags":["private"],
"schema":"db_schema_update_hierarchy",
"parent":"dbBlock"
},
{
"name":"_next_net_moditerm",
"type":"dbId<_dbModITerm>",
"flags":["private","no-serial"],
"parent":"dbBlock"
"flags":["private"],
"parent":"dbBlock",
"schema":"db_schema_update_hierarchy"
},
{
"name":"_prev_net_moditerm",
"type":"dbId<_dbModITerm>",
"flags":["private","no-serial"],
"flags":["private"],
"schema":"db_schema_update_hierarchy",
"parent":"dbBlock"
},
{
"name":"_next_entry",
"type":"dbId<_dbModITerm>",
"flags":["private","no-serial"],
"flags":["private"],
"schema":"db_schema_update_hierarchy",
"parent":"dbBlock"
}

Expand Down
25 changes: 16 additions & 9 deletions src/odb/src/codeGenerator/schema/chip/dbModNet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,45 @@
{
"name":"_name",
"type":"char *",
"flags":["no-set","no-get","no-serial"]
"flags":["no-set","no-get"],
"schema":"db_schema_update_hierarchy"
},
{
"name":"_parent",
"type":"dbId<_dbModule>",
"flags":["no-set","no-serial"],
"flags":["no-set"],
"schema":"db_schema_update_hierarchy",
"parent":"dbBlock"
},
{
"name":"_next_entry",
"type":"dbId<_dbModNet>",
"flags":["no-set","no-get","no-serial"]
"flags":["no-set","no-get"],
"schema":"db_schema_update_hierarchy"
},
{
"name": "_moditerms",
"type": "dbId<_dbModITerm>",
"flags":["no-set","no-get","no-serial"]
"name": "_moditerms",
"type": "dbId<_dbModITerm>",
"flags":["no-set","no-get"],
"schema":"db_schema_update_hierarchy"
},
{
"name": "_modbterms",
"type": "dbId<_dbModBTerm>",
"flags":["no-set","no-get","no-serial"]
"flags":["no-set","no-get"],
"schema":"db_schema_update_hierarchy"
},
{
"name": "_iterms",
"type": "dbId<_dbITerm>",
"flags":["no-set","no-get","no-serial"]
"flags":["no-set","no-get"],
"schema":"db_schema_update_hierarchy"
},
{
"name": "_bterms",
"type": "dbId<_dbBTerm>",
"flags":["no-set","no-get","no-serial"]
"flags":["no-set","no-get"],
"schema":"db_schema_update_hierarchy"
}

],
Expand Down
6 changes: 4 additions & 2 deletions src/odb/src/codeGenerator/schema/chip/dbModule.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@
{
"name":"_modnets",
"type":"dbId<_dbModNet>",
"flags":["no-set","no-get","no-serial"],
"flags":["no-set","no-get"],
"schema":"db_schema_update_hierarchy",
"parent":"dbBlock"
},
{
"name":"_modbterms",
"type":"dbId<_dbModBTerm>",
"flags":["no-set","no-get","no-serial"]
"flags":["no-set","no-get"],
"schema":"db_schema_update_hierarchy"
}
],
"cpp_includes":["dbBlock.h","dbHashTable.hpp", "dbModBTerm.h", "dbModInst.h", "dbInst.h"],
Expand Down
40 changes: 30 additions & 10 deletions src/odb/src/db/dbModBTerm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,39 +130,59 @@ _dbModBTerm::_dbModBTerm(_dbDatabase* db, const _dbModBTerm& r)

dbIStream& operator>>(dbIStream& stream, _dbModBTerm& obj)
{
// User Code Begin >>
dbBlock* block = (dbBlock*) (obj.getOwner());
_dbDatabase* db = (_dbDatabase*) (block->getDataBase());
if (db->isSchema(db_schema_update_hierarchy)) {
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._name;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._flags;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._parent_moditerm;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._parent;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._modnet;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._next_net_modbterm;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._prev_net_modbterm;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._next_entry;
}
// User Code End >>
return stream;
}

dbOStream& operator<<(dbOStream& stream, const _dbModBTerm& obj)
{
// User Code Begin <<
dbBlock* block = (dbBlock*) (obj.getOwner());
_dbDatabase* db = (_dbDatabase*) (block->getDataBase());
if (db->isSchema(db_schema_update_hierarchy)) {
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._name;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._flags;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._parent_moditerm;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._parent;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._modnet;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._next_net_modbterm;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._prev_net_modbterm;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._next_entry;
}
// User Code End <<
return stream;
}

Expand Down
36 changes: 26 additions & 10 deletions src/odb/src/db/dbModITerm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,37 +124,53 @@ _dbModITerm::_dbModITerm(_dbDatabase* db, const _dbModITerm& r)

dbIStream& operator>>(dbIStream& stream, _dbModITerm& obj)
{
// User Code Begin >>
dbBlock* block = (dbBlock*) (obj.getOwner());
_dbDatabase* db = (_dbDatabase*) (block->getDataBase());
if (db->isSchema(db_schema_update_hierarchy)) {
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._name;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._parent;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._child_modbterm;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._mod_net;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._next_net_moditerm;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._prev_net_moditerm;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream >> obj._next_entry;
}
// User Code End >>
return stream;
}

dbOStream& operator<<(dbOStream& stream, const _dbModITerm& obj)
{
// User Code Begin <<
dbBlock* block = (dbBlock*) (obj.getOwner());
_dbDatabase* db = (_dbDatabase*) (block->getDataBase());
if (db->isSchema(db_schema_update_hierarchy)) {
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._name;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._parent;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._child_modbterm;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._mod_net;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._next_net_moditerm;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._prev_net_moditerm;
}
if (obj.getDatabase()->isSchema(db_schema_update_hierarchy)) {
stream << obj._next_entry;
}
// User Code End <<
return stream;
}

Expand Down
Loading

0 comments on commit c356437

Please sign in to comment.