Skip to content

Commit

Permalink
odb: in dbGDSPath fix the path_type name
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Liberty <[email protected]>
  • Loading branch information
maliberty committed Jan 2, 2025
1 parent dc393fd commit 90c47d3
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/odb/include/odb/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -7543,9 +7543,9 @@ class dbGDSPath : public dbObject

int getWidth() const;

void set_pathType(int16_t pathType);
void setPathType(int16_t path_type);

int16_t get_pathType() const;
int16_t getPathType() const;

// User Code Begin dbGDSPath
const std::vector<Point>& getXY();
Expand Down
2 changes: 1 addition & 1 deletion src/odb/src/codeGenerator/schema/gds/dbGDSPath.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"flags":[]
},
{
"name":"_pathType",
"name":"_path_type",
"type":"int16_t",
"default":"0",
"flags":[]
Expand Down
22 changes: 11 additions & 11 deletions src/odb/src/db/dbGDSPath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ bool _dbGDSPath::operator==(const _dbGDSPath& rhs) const
if (_width != rhs._width) {
return false;
}
if (_pathType != rhs._pathType) {
if (_path_type != rhs._path_type) {
return false;
}

Expand All @@ -74,7 +74,7 @@ void _dbGDSPath::differences(dbDiff& diff,
DIFF_FIELD(_layer);
DIFF_FIELD(_datatype);
DIFF_FIELD(_width);
DIFF_FIELD(_pathType);
DIFF_FIELD(_path_type);
DIFF_END
}

Expand All @@ -84,7 +84,7 @@ void _dbGDSPath::out(dbDiff& diff, char side, const char* field) const
DIFF_OUT_FIELD(_layer);
DIFF_OUT_FIELD(_datatype);
DIFF_OUT_FIELD(_width);
DIFF_OUT_FIELD(_pathType);
DIFF_OUT_FIELD(_path_type);

DIFF_END
}
Expand All @@ -94,15 +94,15 @@ _dbGDSPath::_dbGDSPath(_dbDatabase* db)
_layer = 0;
_datatype = 0;
_width = 0;
_pathType = 0;
_path_type = 0;
}

_dbGDSPath::_dbGDSPath(_dbDatabase* db, const _dbGDSPath& r)
{
_layer = r._layer;
_datatype = r._datatype;
_width = r._width;
_pathType = r._pathType;
_path_type = r._path_type;
}

dbIStream& operator>>(dbIStream& stream, _dbGDSPath& obj)
Expand All @@ -112,7 +112,7 @@ dbIStream& operator>>(dbIStream& stream, _dbGDSPath& obj)
stream >> obj._xy;
stream >> obj._propattr;
stream >> obj._width;
stream >> obj._pathType;
stream >> obj._path_type;
return stream;
}

Expand All @@ -123,7 +123,7 @@ dbOStream& operator<<(dbOStream& stream, const _dbGDSPath& obj)
stream << obj._xy;
stream << obj._propattr;
stream << obj._width;
stream << obj._pathType;
stream << obj._path_type;
return stream;
}

Expand Down Expand Up @@ -185,17 +185,17 @@ int dbGDSPath::getWidth() const
return obj->_width;
}

void dbGDSPath::set_pathType(int16_t pathType)
void dbGDSPath::setPathType(int16_t path_type)
{
_dbGDSPath* obj = (_dbGDSPath*) this;

obj->_pathType = pathType;
obj->_path_type = path_type;
}

int16_t dbGDSPath::get_pathType() const
int16_t dbGDSPath::getPathType() const
{
_dbGDSPath* obj = (_dbGDSPath*) this;
return obj->_pathType;
return obj->_path_type;
}

// User Code Begin dbGDSPathPublicMethods
Expand Down
2 changes: 1 addition & 1 deletion src/odb/src/db/dbGDSPath.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class _dbGDSPath : public _dbObject
std::vector<Point> _xy;
std::vector<std::pair<std::int16_t, std::string>> _propattr;
int _width;
int16_t _pathType;
int16_t _path_type;
};
dbIStream& operator>>(dbIStream& stream, _dbGDSPath& obj);
dbOStream& operator<<(dbOStream& stream, const _dbGDSPath& obj);
Expand Down
6 changes: 1 addition & 5 deletions src/odb/src/gdsin/gdsin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,17 +316,13 @@ dbGDSPath* GDSReader::processPath(dbGDSStructure* structure)

readRecord();
if (_r.type == RecordType::PATHTYPE) {
path->set_pathType(_r.data16[0]);
path->setPathType(_r.data16[0]);
readRecord();
} else {
path->set_pathType(0);
}

if (_r.type == RecordType::WIDTH) {
path->setWidth(_r.data32[0]);
readRecord();
} else {
path->setWidth(0);
}

path->setXy(processXY());
Expand Down
4 changes: 2 additions & 2 deletions src/odb/src/gdsout/gdsout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,11 @@ void GDSWriter::writePath(dbGDSPath* path)
writeLayer(path->getLayer());
writeDataType(path->getDatatype());

if (path->get_pathType() != 0) {
if (path->getPathType() != 0) {
record_t r2;
r2.type = RecordType::PATHTYPE;
r2.dataType = DataType::INT_2;
r2.data16 = {path->get_pathType()};
r2.data16 = {path->getPathType()};
writeRecord(r2);
}

Expand Down

0 comments on commit 90c47d3

Please sign in to comment.