diff --git a/.clang-format b/.clang-format index ccc7a7ae..afd64921 100644 --- a/.clang-format +++ b/.clang-format @@ -13,7 +13,7 @@ AllowShortFunctionsOnASingleLine: None BraceWrapping: AfterNamespace: true BeforeWhile: true -# BreakAfterAttributes: Always # clang-format-16 +BreakAfterAttributes: Always BreakBeforeBraces: Allman ColumnLimit: 120 FixNamespaceComments: true diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000..d9abe7ca --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,5 @@ +--- +Checks: '*,-fuchsia-*,-google-*,-zircon-*,-abseil-*,-modernize-use-trailing-return-type,-llvm*' +WarningsAsErrors: '' +HeaderFilterRegex: '' +FormatStyle: none \ No newline at end of file diff --git a/cfb_utils/Cargo.lock b/cfb_utils/Cargo.lock new file mode 100644 index 00000000..d29f08af --- /dev/null +++ b/cfb_utils/Cargo.lock @@ -0,0 +1,156 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cfb" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a4f8e55be323b378facfcf1f06aa97f6ec17cf4ac84fb17325093aaf62da41" +dependencies = [ + "byteorder", + "fnv", + "uuid", +] + +[[package]] +name = "cfb_utils" +version = "0.0.1" +dependencies = [ + "byteorder", + "cfb", + "path-slash", + "pathdiff", + "walkdir", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + +[[package]] +name = "pathdiff" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3bf70094d203e07844da868b634207e71bfab254fe713171fae9a6e751ccf31" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "uuid" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/src/CfbfStreamLocation.hpp b/src/CfbfStreamLocation.hpp index b5c87d3e..433618c8 100644 --- a/src/CfbfStreamLocation.hpp +++ b/src/CfbfStreamLocation.hpp @@ -95,7 +95,8 @@ class CfbfStreamLocation std::vector mStreamLocation{}; }; -[[maybe_unused]] static std::string to_string(const CfbfStreamLocation& aLocation) +[[maybe_unused]] +static std::string to_string(const CfbfStreamLocation& aLocation) { std::string locStr{}; for(const auto& locPart : aLocation.get_vector()) @@ -106,17 +107,20 @@ class CfbfStreamLocation return locStr; } -[[maybe_unused]] static bool operator==(const CfbfStreamLocation& aLhs, const std::vector& aRhs) +[[maybe_unused]] +static bool operator==(const CfbfStreamLocation& aLhs, const std::vector& aRhs) { return aLhs.get_vector() == aRhs; } -[[maybe_unused]] static bool operator==(const std::vector& aLhs, const CfbfStreamLocation& aRhs) +[[maybe_unused]] +static bool operator==(const std::vector& aLhs, const CfbfStreamLocation& aRhs) { return aRhs == aLhs; } -[[maybe_unused]] static bool operator==(const CfbfStreamLocation& aLhs, const CfbfStreamLocation& aRhs) +[[maybe_unused]] +static bool operator==(const CfbfStreamLocation& aLhs, const CfbfStreamLocation& aRhs) { return aLhs.get_vector() == aRhs.get_vector(); } diff --git a/src/ContainerContext.cpp b/src/ContainerContext.cpp index 3bd84d75..656abc6e 100644 --- a/src/ContainerContext.cpp +++ b/src/ContainerContext.cpp @@ -21,14 +21,13 @@ namespace fs = std::filesystem; OOCP::ContainerContext::ContainerContext( const fs::path& aInputCfbfFile, const fs::path& aExtractedCfbfPath, ParserConfig aCfg, Database& aDb) : mDb{aDb}, + mInputCfbfFile{aInputCfbfFile}, + mExtractedCfbfPath{aExtractedCfbfPath}, + mCfg{aCfg}, + mFileFormatVersion{FileFormatVersion::C}, + mLogLevel{spdlog::level::trace}, mLogger{"tmp"} { - mInputCfbfFile = aInputCfbfFile; - mExtractedCfbfPath = aExtractedCfbfPath; - mCfg = aCfg; - mFileFormatVersion = FileFormatVersion::C; - mLogLevel = spdlog::level::trace; - const fs::path logPath = mExtractedCfbfPath / "logs" / "OpenOrCadParser.log"; configureLogger(logPath); } diff --git a/src/ContainerContext.hpp b/src/ContainerContext.hpp index 359987c4..ea245ebf 100644 --- a/src/ContainerContext.hpp +++ b/src/ContainerContext.hpp @@ -35,7 +35,8 @@ struct ParserConfig bool mKeepTmpFiles{true}; //!< Do not delete temporary files after parser completed }; -[[maybe_unused]] static std::string to_string(const ParserConfig& aCfg) +[[maybe_unused]] +static std::string to_string(const ParserConfig& aCfg) { std::string str; str += fmt::format("mSkipUnknownPrim = {}\n", aCfg.mSkipUnknownPrim); diff --git a/src/ContainerExtractor.cpp b/src/ContainerExtractor.cpp index 23fa6bdd..b840719e 100644 --- a/src/ContainerExtractor.cpp +++ b/src/ContainerExtractor.cpp @@ -18,8 +18,6 @@ namespace fs = std::filesystem; -using namespace OOCP; - OOCP::ContainerExtractor::ContainerExtractor(const fs::path& aContainer) { mContainer = aContainer; @@ -62,7 +60,7 @@ void OOCP::ContainerExtractor::outputFileInfo() const << "mini fat sector: " << hdr->numMiniFATSector << std::endl; } -void ContainerExtractor::outputEntryInfo(const CFB::COMPOUND_FILE_ENTRY* aEntry) const +void OOCP::ContainerExtractor::outputEntryInfo(const CFB::COMPOUND_FILE_ENTRY* aEntry) const { std::clog << "entry type: " << (mReader->IsPropertyStream(aEntry) ? "property" : (mReader->IsStream(aEntry) ? "stream" : "directory")) diff --git a/src/DataStream.cpp b/src/DataStream.cpp index af0540ad..91e24595 100644 --- a/src/DataStream.cpp +++ b/src/DataStream.cpp @@ -1,7 +1,9 @@ #include +#include #include #include #include +#include #include #include @@ -213,7 +215,7 @@ std::string OOCP::DataStream::dataToStr(const std::vector& aData) preamble = fmt::format("0x{:08x}: ", getCurrentOffset()); } - char c = static_cast(aData[i]); + const char c = static_cast(aData[i]); line_hex += fmt::format("{:02x}", aData[i]); line_str += std::isprint(c) ? c : '.'; diff --git a/src/Database.hpp b/src/Database.hpp index 96c16ec4..a633c46a 100644 --- a/src/Database.hpp +++ b/src/Database.hpp @@ -38,7 +38,8 @@ class Database std::vector> mStreams; }; -[[maybe_unused]] static std::string to_string(const Database& aObj) +[[maybe_unused]] +static std::string to_string(const Database& aObj) { std::string str; @@ -52,7 +53,8 @@ class Database return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const Database& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const Database& aVal) { aOs << to_string(aVal); diff --git a/src/Enums/Color.hpp b/src/Enums/Color.hpp index 400b714e..86603eb3 100644 --- a/src/Enums/Color.hpp +++ b/src/Enums/Color.hpp @@ -65,17 +65,20 @@ enum class Color Default = 48 }; -[[maybe_unused]] static constexpr Color ToColor(uint32_t aVal) +[[maybe_unused]] +static constexpr Color ToColor(uint32_t aVal) { return ToEnum(aVal); } -[[maybe_unused]] static std::string to_string(const Color& aVal) +[[maybe_unused]] +static std::string to_string(const Color& aVal) { return std::string{magic_enum::enum_name(aVal)}; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const Color& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const Color& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Enums/ComponentType.hpp b/src/Enums/ComponentType.hpp index 88bab7b6..bbf94593 100644 --- a/src/Enums/ComponentType.hpp +++ b/src/Enums/ComponentType.hpp @@ -59,7 +59,8 @@ enum class ComponentType // too often to be a realistic corruption issue but I need to confirm this. }; -[[maybe_unused]] static constexpr ComponentType ToComponentType(uint16_t aVal) +[[maybe_unused]] +static constexpr ComponentType ToComponentType(uint16_t aVal) { // See the explanation at HACKY_VALUE for this hack if(aVal > 100U) @@ -70,12 +71,14 @@ enum class ComponentType return ToEnum(aVal); } -[[maybe_unused]] static std::string to_string(const ComponentType& aVal) +[[maybe_unused]] +static std::string to_string(const ComponentType& aVal) { return std::string{magic_enum::enum_name(aVal)}; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const ComponentType& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const ComponentType& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Enums/DirectoryType.hpp b/src/Enums/DirectoryType.hpp index 8db476d5..c8388b38 100644 --- a/src/Enums/DirectoryType.hpp +++ b/src/Enums/DirectoryType.hpp @@ -22,7 +22,8 @@ enum class DirectoryType ViewsDirectory }; -[[maybe_unused]] static std::string to_string(const DirectoryType& aVal) +[[maybe_unused]] +static std::string to_string(const DirectoryType& aVal) { switch(aVal) { @@ -52,7 +53,8 @@ enum class DirectoryType } } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const DirectoryType& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const DirectoryType& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Enums/FillStyle.hpp b/src/Enums/FillStyle.hpp index 5ffcdc3e..07598d11 100644 --- a/src/Enums/FillStyle.hpp +++ b/src/Enums/FillStyle.hpp @@ -21,17 +21,20 @@ enum class FillStyle HatchPattern = 2 // Refer to HatchStyle }; -[[maybe_unused]] static constexpr FillStyle ToFillStyle(uint32_t aVal) +[[maybe_unused]] +static constexpr FillStyle ToFillStyle(uint32_t aVal) { return ToEnum(aVal); } -[[maybe_unused]] static std::string to_string(const FillStyle& aVal) +[[maybe_unused]] +static std::string to_string(const FillStyle& aVal) { return std::string{magic_enum::enum_name(aVal)}; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const FillStyle& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const FillStyle& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Enums/HatchStyle.hpp b/src/Enums/HatchStyle.hpp index d8e3c502..89deeb67 100644 --- a/src/Enums/HatchStyle.hpp +++ b/src/Enums/HatchStyle.hpp @@ -24,17 +24,20 @@ enum class HatchStyle Mesh = 5 // x }; -[[maybe_unused]] static constexpr HatchStyle ToHatchStyle(int32_t aVal) +[[maybe_unused]] +static constexpr HatchStyle ToHatchStyle(int32_t aVal) { return ToEnum(aVal); } -[[maybe_unused]] static std::string to_string(const HatchStyle& aVal) +[[maybe_unused]] +static std::string to_string(const HatchStyle& aVal) { return std::string{magic_enum::enum_name(aVal)}; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const HatchStyle& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const HatchStyle& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Enums/ImplementationType.hpp b/src/Enums/ImplementationType.hpp index 4ee654bb..9a9f0180 100644 --- a/src/Enums/ImplementationType.hpp +++ b/src/Enums/ImplementationType.hpp @@ -23,17 +23,20 @@ enum class ImplementationType Verilog = 7 }; -[[maybe_unused]] static constexpr ImplementationType ToImplementationType(uint8_t aVal) +[[maybe_unused]] +static constexpr ImplementationType ToImplementationType(uint8_t aVal) { return ToEnum(aVal); } -[[maybe_unused]] static std::string to_string(const ImplementationType& aVal) +[[maybe_unused]] +static std::string to_string(const ImplementationType& aVal) { return std::string{magic_enum::enum_name(aVal)}; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const ImplementationType& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const ImplementationType& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Enums/LineStyle.hpp b/src/Enums/LineStyle.hpp index 32bccce2..6d1f7f6b 100644 --- a/src/Enums/LineStyle.hpp +++ b/src/Enums/LineStyle.hpp @@ -21,17 +21,20 @@ enum class LineStyle Default = 5 }; -[[maybe_unused]] static constexpr LineStyle ToLineStyle(uint32_t aVal) +[[maybe_unused]] +static constexpr LineStyle ToLineStyle(uint32_t aVal) { return ToEnum(aVal); } -[[maybe_unused]] static std::string to_string(const LineStyle& aVal) +[[maybe_unused]] +static std::string to_string(const LineStyle& aVal) { return std::string{magic_enum::enum_name(aVal)}; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const LineStyle& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const LineStyle& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Enums/LineWidth.hpp b/src/Enums/LineWidth.hpp index 1507231f..928b1c40 100644 --- a/src/Enums/LineWidth.hpp +++ b/src/Enums/LineWidth.hpp @@ -20,17 +20,20 @@ enum class LineWidth // Thin and Medium }; -[[maybe_unused]] static constexpr LineWidth ToLineWidth(uint32_t aVal) +[[maybe_unused]] +static constexpr LineWidth ToLineWidth(uint32_t aVal) { return ToEnum(aVal); } -[[maybe_unused]] static std::string to_string(const LineWidth& aVal) +[[maybe_unused]] +static std::string to_string(const LineWidth& aVal) { return std::string{magic_enum::enum_name(aVal)}; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const LineWidth& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const LineWidth& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Enums/PortType.hpp b/src/Enums/PortType.hpp index 9cff52fb..f898d381 100644 --- a/src/Enums/PortType.hpp +++ b/src/Enums/PortType.hpp @@ -23,17 +23,20 @@ enum class PortType Power = 7 }; -[[maybe_unused]] static constexpr PortType ToPortType(uint32_t aVal) +[[maybe_unused]] +static constexpr PortType ToPortType(uint32_t aVal) { return ToEnum(aVal); } -[[maybe_unused]] static std::string to_string(const PortType& aVal) +[[maybe_unused]] +static std::string to_string(const PortType& aVal) { return std::string{magic_enum::enum_name(aVal)}; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const PortType& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const PortType& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Enums/Primitive.hpp b/src/Enums/Primitive.hpp index a12c25bf..0d51c411 100644 --- a/src/Enums/Primitive.hpp +++ b/src/Enums/Primitive.hpp @@ -25,17 +25,20 @@ enum class Primitive Bezier = 87 }; -[[maybe_unused]] static constexpr Primitive ToPrimitive(uint8_t aVal) +[[maybe_unused]] +static constexpr Primitive ToPrimitive(uint8_t aVal) { return ToEnum(aVal); } -[[maybe_unused]] static std::string to_string(const Primitive& aVal) +[[maybe_unused]] +static std::string to_string(const Primitive& aVal) { return std::string{magic_enum::enum_name(aVal)}; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const Primitive& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const Primitive& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Enums/Rotation.hpp b/src/Enums/Rotation.hpp index 0ab9fdc8..1e39f4a2 100644 --- a/src/Enums/Rotation.hpp +++ b/src/Enums/Rotation.hpp @@ -19,17 +19,20 @@ enum class Rotation Deg_270 = 3 }; -[[maybe_unused]] static constexpr Rotation ToRotation(uint8_t aVal) +[[maybe_unused]] +static constexpr Rotation ToRotation(uint8_t aVal) { return ToEnum(aVal); } -[[maybe_unused]] static std::string to_string(const Rotation& aVal) +[[maybe_unused]] +static std::string to_string(const Rotation& aVal) { return std::string{magic_enum::enum_name(aVal)}; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const Rotation& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const Rotation& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Enums/StreamType.hpp b/src/Enums/StreamType.hpp index 3db847fd..2a83c9f4 100644 --- a/src/Enums/StreamType.hpp +++ b/src/Enums/StreamType.hpp @@ -41,12 +41,14 @@ enum class StreamType ViewsDirectory }; -[[maybe_unused]] static std::string to_string(const StreamType& aVal) +[[maybe_unused]] +static std::string to_string(const StreamType& aVal) { return std::string{magic_enum::enum_name(aVal)}; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamType& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamType& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Enums/Structure.hpp b/src/Enums/Structure.hpp index 77321ff3..d6d7a4ff 100644 --- a/src/Enums/Structure.hpp +++ b/src/Enums/Structure.hpp @@ -95,17 +95,20 @@ enum class Structure NetGroup = 103 //!< Specifies which wires/busses belong to a given net group }; -[[maybe_unused]] static constexpr Structure ToStructure(uint8_t aVal) +[[maybe_unused]] +static constexpr Structure ToStructure(uint8_t aVal) { return ToEnum(aVal); } -[[maybe_unused]] static std::string to_string(const Structure& aVal) +[[maybe_unused]] +static std::string to_string(const Structure& aVal) { return std::string{magic_enum::enum_name(aVal)}; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const Structure& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const Structure& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/General.hpp b/src/General.hpp index 9a76d521..e3aa46f3 100644 --- a/src/General.hpp +++ b/src/General.hpp @@ -82,17 +82,20 @@ template static std::string getMethodName(const T* aClass, const ch return fmt::format("{}::{}", NAMEOF_TYPE_RTTI(*aClass), aFuncName); } -[[maybe_unused]] static std::string getOpeningMsg(const std::string& aClassFuncName, size_t aCurrOffset) +[[maybe_unused]] +static std::string getOpeningMsg(const std::string& aClassFuncName, size_t aCurrOffset) { return fmt::format("0x{:08x}: Beginning {}", aCurrOffset, aClassFuncName); } -[[maybe_unused]] static std::string getClosingMsg(const std::string& aClassFuncName, size_t aCurrOffset) +[[maybe_unused]] +static std::string getClosingMsg(const std::string& aClassFuncName, size_t aCurrOffset) { return fmt::format("0x{:08x}: Ending {}", aCurrOffset, aClassFuncName); } -[[maybe_unused]] static std::string indent(std::string str, size_t level) +[[maybe_unused]] +static std::string indent(std::string str, size_t level) { const std::string indent = " "; const std::string delimiter = fmt::format("\n"); @@ -123,12 +126,14 @@ template static std::string getMethodName(const T* aClass, const ch return indentedStr; } -[[maybe_unused]] static std::string indent(size_t level) +[[maybe_unused]] +static std::string indent(size_t level) { return indent("", level); } -[[maybe_unused]] static uint8_t GetBit(size_t bitPos, uint32_t val) +[[maybe_unused]] +static uint8_t GetBit(size_t bitPos, uint32_t val) { if(bitPos >= sizeof(val) * 8u) { @@ -138,13 +143,15 @@ template static std::string getMethodName(const T* aClass, const ch return (val >> bitPos) & 0x01; } -[[maybe_unused]] static std::string DateTimeToStr(const time_t& unixts) +[[maybe_unused]] +static std::string DateTimeToStr(const time_t& unixts) { return std::string(std::ctime(&unixts)); } // @todo not implemented yet -[[maybe_unused]] static std::string TimezoneToStr(int16_t timezone) +[[maybe_unused]] +static std::string TimezoneToStr(int16_t timezone) { // std::time_t rawtime; // std::tm* timeInfo; @@ -168,7 +175,8 @@ template static std::string getMethodName(const T* aClass, const ch * @param point Fix point coordiante. * @return double Floating point coordinate. */ -[[maybe_unused]] static double ToFP(int16_t point) +[[maybe_unused]] +static double ToFP(int16_t point) { return static_cast(point) / 100.0; } diff --git a/src/GenericParser.cpp b/src/GenericParser.cpp index 5ee39a1e..2f509839 100644 --- a/src/GenericParser.cpp +++ b/src/GenericParser.cpp @@ -281,8 +281,8 @@ std::pair OOCP::GenericParser::read_single_prefix_sho for(int i = 0; i < size; ++i) { - uint32_t strLstIdxName = mCtx.mDs.readUint32(); - uint32_t strLstIdxValue = mCtx.mDs.readUint32(); + const uint32_t strLstIdxName = mCtx.mDs.readUint32(); + const uint32_t strLstIdxValue = mCtx.mDs.readUint32(); nameValueMapping.push_back(std::make_pair(strLstIdxName, strLstIdxValue)); } @@ -360,8 +360,8 @@ void OOCP::GenericParser::readPreamble() OOCP::Primitive OOCP::GenericParser::readPrefixPrimitive() { - Primitive primitive1 = ToPrimitive(mCtx.mDs.readUint8()); - Primitive primitive2 = ToPrimitive(mCtx.mDs.readUint8()); + const Primitive primitive1 = ToPrimitive(mCtx.mDs.readUint8()); + const Primitive primitive2 = ToPrimitive(mCtx.mDs.readUint8()); if(primitive1 != primitive2) { diff --git a/src/GetStreamHelper.hpp b/src/GetStreamHelper.hpp index aa83102f..6ba97013 100644 --- a/src/GetStreamHelper.hpp +++ b/src/GetStreamHelper.hpp @@ -22,7 +22,8 @@ static const std::map DirectoryType2StreamType = { {DirectoryType::ViewsDirectory, StreamType::ViewsDirectory } }; -[[maybe_unused]] static std::shared_ptr getLibraryStreamFromDb(Database& aDb) +[[maybe_unused]] +static std::shared_ptr getLibraryStreamFromDb(Database& aDb) { for(auto& stream : aDb.mStreams) { @@ -37,7 +38,8 @@ static const std::map DirectoryType2StreamType = { // T is of type `DirectoryStream` template -[[maybe_unused]] static std::shared_ptr getDirectoryStreamFromDb(Database& aDb, DirectoryType aDirType) +[[maybe_unused]] +static std::shared_ptr getDirectoryStreamFromDb(Database& aDb, DirectoryType aDirType) { for(auto& stream : aDb.mStreams) { diff --git a/src/Misc.cpp b/src/Misc.cpp deleted file mode 100644 index ccd24b82..00000000 --- a/src/Misc.cpp +++ /dev/null @@ -1,153 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "Enums/Primitive.hpp" -#include "Primitives/PrimCommentText.hpp" -#include "Streams/StreamPackage.hpp" -#include "Streams/StreamSymbol.hpp" - -struct SymbolUserProp -{ - uint32_t nameIdx; - uint32_t valIdx; - - SymbolUserProp() - { - } - - std::string getName() const; - std::string getVal() const; -}; - -std::string SymbolUserProp::getName() const -{ - std::string name; - - if(nameIdx >= 0) - { - // Retrieve string from the library. - // name = gLibrary->library->strLst.at(nameIdx); - // @todo provide try catch block for better exception messages - } - else if(nameIdx == -1U) - { - // Special case that is treated as an empty string. - name = ""; - } - else // nameIdx < -1 - { - // This should never happen. - throw std::runtime_error(getMethodName(this, __func__) + ": Unexpected index " + std::to_string(nameIdx)); - } - - return name; -} - -std::string SymbolUserProp::getVal() const -{ - std::string val; - - if(valIdx >= 0) - { - // Retrieve string from the library. - // val = gLibrary->library->strLst.at(valIdx); - // @todo provide try catch block for better exception messages - } - else if(valIdx == -1U) - { - // Special case that is treated as an empty string. - val = ""; - } - else // valIdx < -1 - { - // This should never happen. - throw std::runtime_error(getMethodName(this, __func__) + ": Unexpected index " + std::to_string(valIdx)); - } - - return val; -} - -// @todo this is a whole file parser. Split it up into the title block structure and move the rest to the symbol parser? -void Container::readTitleBlockSymbol() -{ - auto& ds = mCtx.mDs; - - spdlog::debug(getOpeningMsg(getMethodName(this, __func__), ds.getCurrentOffset())); - - ds.printUnknownData(36, getMethodName(this, __func__) + ": 0"); - - std::vector symbolUserProps; // @todo store in symbol - - const uint16_t propertyLen = ds.readUint16(); - - for(size_t i = 0u; i < propertyLen; ++i) - { - SymbolUserProp symbolUserProp{}; - - symbolUserProp.nameIdx = - ds.readUint32(); // @todo move to Kaitai OrCAD: 'Symbol Properties' (Fixed value on the left) - symbolUserProp.valIdx = - ds.readUint32(); // @todo move to Kaitai OrCAD: 'Symbol Properties' (Adjustable value on the right) - - symbolUserProps.push_back(symbolUserProp); - } - - for(size_t i = 0u; i < symbolUserProps.size(); ++i) - { - std::string name = symbolUserProps[i].getName(); - std::string val = symbolUserProps[i].getVal(); - - spdlog::debug("{}: {} <- {}", i, name, val); - } - - // The following should be its own structure - ds.readPreamble(); - std::string str0 = ds.readStringLenZeroTerm(); - - ds.printUnknownData(7, getMethodName(this, __func__) + ": 1"); - - const uint16_t someLen = ds.readUint16(); - - spdlog::trace("someLen = {}", someLen); - - for(size_t i = 0u; i < someLen; ++i) - { - const Primitive primitive = readPrefixPrimitive(); - ds.readPrimitive(primitive); - } - - ds.assumeData({0x00, 0x00, 0x00, 0x00}, getMethodName(this, __func__) + ": 2"); - ds.printUnknownData(6, getMethodName(this, __func__) + ": 3"); - - const uint16_t followingLen = ds.readUint16(); - - spdlog::trace("followingLen = {}", followingLen); - - for(size_t i = 0u; i < followingLen; ++i) - { - // @todo push structure - const auto s = ds.readStructure(); - if(s) - { - spdlog::debug("VERIFYING Misc Structure0 is {}", NAMEOF_TYPE_RTTI(*s)); - } - } - - ds.sanitizeEoF(); - - spdlog::debug(getClosingMsg(getMethodName(this, __func__), ds.getCurrentOffset())); -} \ No newline at end of file diff --git a/src/PageSettings.hpp b/src/PageSettings.hpp index 1fea9517..a5f6538f 100644 --- a/src/PageSettings.hpp +++ b/src/PageSettings.hpp @@ -96,7 +96,8 @@ class PageSettings : public Other uint32_t ansiGridRefs; }; -[[maybe_unused]] static std::string to_string(const PageSettings& aObj) +[[maybe_unused]] +static std::string to_string(const PageSettings& aObj) { std::string str; @@ -131,7 +132,8 @@ inline std::string PageSettings::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const PageSettings& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const PageSettings& aObj) { aOs << to_string(aObj); diff --git a/src/PinShape.hpp b/src/PinShape.hpp index 65d5aac7..eb81d766 100644 --- a/src/PinShape.hpp +++ b/src/PinShape.hpp @@ -43,12 +43,14 @@ enum class ShapeType ZeroLength }; -[[maybe_unused]] static std::string to_string(const ShapeType& aVal) +[[maybe_unused]] +static std::string to_string(const ShapeType& aVal) { return std::string{magic_enum::enum_name(aVal)}; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const ShapeType& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const ShapeType& aVal) { aOs << to_string(aVal); return aOs; @@ -65,7 +67,8 @@ enum class ShapeType // 'Short Dot' <- !isLong && !isClock && isDot // 'Short Dot Clock' <- !isLong && isClock && isDot // 'Zero Length' // Not sure how this is generated -[[maybe_unused]] static ShapeType ToShapeType(const PinShape& pinShape) +[[maybe_unused]] +static ShapeType ToShapeType(const PinShape& pinShape) { const auto& pin = pinShape; @@ -115,7 +118,8 @@ enum class ShapeType return shapeType; } -[[maybe_unused]] static PinShape ToPinShape(uint16_t val, std::optional aLogger = std::nullopt) +[[maybe_unused]] +static PinShape ToPinShape(uint16_t val, std::optional aLogger = std::nullopt) { PinShape pinShape; @@ -160,7 +164,8 @@ enum class ShapeType return pinShape; } -[[maybe_unused]] static std::string to_string(const PinShape& aObj) +[[maybe_unused]] +static std::string to_string(const PinShape& aObj) { std::string str; @@ -181,7 +186,8 @@ enum class ShapeType return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const PinShape& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const PinShape& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Primitives/Point.cpp b/src/Primitives/Point.cpp index 81d33edc..cb5e4aaf 100644 --- a/src/Primitives/Point.cpp +++ b/src/Primitives/Point.cpp @@ -7,8 +7,6 @@ #include "General.hpp" #include "Primitives/Point.hpp" -using namespace OOCP; - void OOCP::Point::read(FileFormatVersion /* aVersion */) { auto& ds = mCtx.mDs; diff --git a/src/Primitives/Point.hpp b/src/Primitives/Point.hpp index 069df6a1..6f0e78d6 100644 --- a/src/Primitives/Point.hpp +++ b/src/Primitives/Point.hpp @@ -39,7 +39,8 @@ class Point : public Other uint16_t y; }; -[[maybe_unused]] static std::string to_string(const Point& aObj) +[[maybe_unused]] +static std::string to_string(const Point& aObj) { std::string str; @@ -54,7 +55,8 @@ inline std::string Point::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const Point& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const Point& aVal) { aOs << to_string(aVal); diff --git a/src/Primitives/PrimArc.cpp b/src/Primitives/PrimArc.cpp index 5803d7ed..6de55e12 100644 --- a/src/Primitives/PrimArc.cpp +++ b/src/Primitives/PrimArc.cpp @@ -10,8 +10,6 @@ #include "GenericParser.hpp" #include "Primitives/PrimArc.hpp" -using namespace OOCP; - size_t OOCP::PrimArc::getExpectedStructSize(FileFormatVersion aVersion) { size_t expectedByteLength; diff --git a/src/Primitives/PrimArc.hpp b/src/Primitives/PrimArc.hpp index 7a1d0ae9..36512a3b 100644 --- a/src/Primitives/PrimArc.hpp +++ b/src/Primitives/PrimArc.hpp @@ -102,7 +102,8 @@ class PrimArc : public PrimBase std::optional mLineWidth; }; -[[maybe_unused]] static std::string to_string(const PrimArc& aObj) +[[maybe_unused]] +static std::string to_string(const PrimArc& aObj) { std::string str; @@ -126,7 +127,8 @@ inline std::string PrimArc::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const PrimArc& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const PrimArc& aVal) { aOs << to_string(aVal); diff --git a/src/Primitives/PrimBezier.cpp b/src/Primitives/PrimBezier.cpp index f70346e6..03c9be6d 100644 --- a/src/Primitives/PrimBezier.cpp +++ b/src/Primitives/PrimBezier.cpp @@ -11,7 +11,6 @@ #include "General.hpp" #include "GenericParser.hpp" #include "Primitives/PrimBezier.hpp" -using namespace OOCP; size_t OOCP::PrimBezier::getExpectedStructSize(FileFormatVersion aVersion, size_t aPointCount) { diff --git a/src/Primitives/PrimBezier.hpp b/src/Primitives/PrimBezier.hpp index fb4b5f65..baf692e0 100644 --- a/src/Primitives/PrimBezier.hpp +++ b/src/Primitives/PrimBezier.hpp @@ -73,7 +73,8 @@ class PrimBezier : public PrimBase std::vector points; }; -[[maybe_unused]] static std::string to_string(const PrimBezier& aObj) +[[maybe_unused]] +static std::string to_string(const PrimBezier& aObj) { std::string str; @@ -95,7 +96,8 @@ inline std::string PrimBezier::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const PrimBezier& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const PrimBezier& aVal) { aOs << to_string(aVal); diff --git a/src/Primitives/PrimBitmap.cpp b/src/Primitives/PrimBitmap.cpp index 10d7c6b3..459db884 100644 --- a/src/Primitives/PrimBitmap.cpp +++ b/src/Primitives/PrimBitmap.cpp @@ -19,8 +19,6 @@ namespace fs = std::filesystem; -using namespace OOCP; - void OOCP::PrimBitmap::read(FileFormatVersion /* aVersion */) { auto& ds = mCtx.mDs; @@ -147,7 +145,7 @@ fs::path OOCP::PrimBitmap::writeBmpFile(fs::path aFilePath, const std::vector& aRawImgData) const +fs::path OOCP::PrimBitmap::writeDifferentImageFile(fs::path aFilePath, const std::vector& aRawImgData) const { // Discard the header for non BMP images. After that, they start // with a complete image, e.g. PNG or JPG @@ -224,7 +222,7 @@ fs::path PrimBitmap::writeDifferentImageFile(fs::path aFilePath, const std::vect // The images are not always bitmaps where we need to prepend its header // but its also possible that they are PNG, JPG and probably other formats // that have some header that needs to be trimmed away. -bool PrimBitmap::isBmpImage(const std::vector& aRawImgData) const +bool OOCP::PrimBitmap::isBmpImage(const std::vector& aRawImgData) const { bool hasMagicId = false; @@ -243,7 +241,7 @@ bool PrimBitmap::isBmpImage(const std::vector& aRawImgData) const return !hasMagicId; } -fs::path PrimBitmap::writeImgToFile(fs::path aFilePath) const +fs::path OOCP::PrimBitmap::writeImgToFile(fs::path aFilePath) const { // @todo Probably its file format version dependent if it supports // only bitmaps where we need to prepend its header or supports diff --git a/src/Primitives/PrimBitmap.hpp b/src/Primitives/PrimBitmap.hpp index c1c0e446..4ecd8e46 100644 --- a/src/Primitives/PrimBitmap.hpp +++ b/src/Primitives/PrimBitmap.hpp @@ -69,7 +69,8 @@ class PrimBitmap : public PrimBase std::vector rawImgData; // @todo called val in the XSD file }; -[[maybe_unused]] static std::string to_string(const PrimBitmap& aObj) +[[maybe_unused]] +static std::string to_string(const PrimBitmap& aObj) { std::string str; @@ -93,7 +94,8 @@ inline std::string PrimBitmap::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const PrimBitmap& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const PrimBitmap& aVal) { aOs << to_string(aVal); diff --git a/src/Primitives/PrimCommentText.cpp b/src/Primitives/PrimCommentText.cpp index b27646a8..89a18bc6 100644 --- a/src/Primitives/PrimCommentText.cpp +++ b/src/Primitives/PrimCommentText.cpp @@ -11,9 +11,8 @@ #include "GetStreamHelper.hpp" #include "Primitives/PrimCommentText.hpp" #include "Win32/LOGFONTA.hpp" -using namespace OOCP; -void PrimCommentText::read(FileFormatVersion /* aVersion */) +void OOCP::PrimCommentText::read(FileFormatVersion /* aVersion */) { auto& ds = mCtx.mDs; GenericParser parser{mCtx}; @@ -88,7 +87,7 @@ void PrimCommentText::read(FileFormatVersion /* aVersion */) mCtx.mLogger.trace(to_string()); } -LOGFONTA PrimCommentText::getTextFont() const +OOCP::LOGFONTA OOCP::PrimCommentText::getTextFont() const { const auto lib = getLibraryStreamFromDb(mCtx.mDb); diff --git a/src/Primitives/PrimCommentText.hpp b/src/Primitives/PrimCommentText.hpp index 1739e3d7..72155adc 100644 --- a/src/Primitives/PrimCommentText.hpp +++ b/src/Primitives/PrimCommentText.hpp @@ -65,7 +65,8 @@ class PrimCommentText : public PrimBase uint16_t textFontIdx; }; -[[maybe_unused]] static std::string to_string(const PrimCommentText& aObj) +[[maybe_unused]] +static std::string to_string(const PrimCommentText& aObj) { std::string str; @@ -88,7 +89,8 @@ inline std::string PrimCommentText::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const PrimCommentText& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const PrimCommentText& aVal) { aOs << to_string(aVal); diff --git a/src/Primitives/PrimEllipse.cpp b/src/Primitives/PrimEllipse.cpp index b51ab9de..32801633 100644 --- a/src/Primitives/PrimEllipse.cpp +++ b/src/Primitives/PrimEllipse.cpp @@ -9,9 +9,8 @@ #include "General.hpp" #include "GenericParser.hpp" #include "Primitives/PrimEllipse.hpp" -using namespace OOCP; -size_t PrimEllipse::getExpectedStructSize(FileFormatVersion aVersion) +size_t OOCP::PrimEllipse::getExpectedStructSize(FileFormatVersion aVersion) { size_t expectedByteLength; @@ -37,7 +36,7 @@ size_t PrimEllipse::getExpectedStructSize(FileFormatVersion aVersion) return expectedByteLength; } -void PrimEllipse::read(FileFormatVersion aVersion) +void OOCP::PrimEllipse::read(FileFormatVersion aVersion) { auto& ds = mCtx.mDs; GenericParser parser{mCtx}; diff --git a/src/Primitives/PrimEllipse.hpp b/src/Primitives/PrimEllipse.hpp index 8809e455..f3ae2164 100644 --- a/src/Primitives/PrimEllipse.hpp +++ b/src/Primitives/PrimEllipse.hpp @@ -105,7 +105,8 @@ class PrimEllipse : public PrimBase std::optional mHatchStyle; }; -[[maybe_unused]] static std::string to_string(const PrimEllipse& aObj) +[[maybe_unused]] +static std::string to_string(const PrimEllipse& aObj) { std::string str; @@ -127,7 +128,8 @@ inline std::string PrimEllipse::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const PrimEllipse& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const PrimEllipse& aVal) { aOs << to_string(aVal); diff --git a/src/Primitives/PrimLine.cpp b/src/Primitives/PrimLine.cpp index 04b3ce8f..882a58bb 100644 --- a/src/Primitives/PrimLine.cpp +++ b/src/Primitives/PrimLine.cpp @@ -10,9 +10,8 @@ #include "General.hpp" #include "GenericParser.hpp" #include "Primitives/PrimLine.hpp" -using namespace OOCP; -size_t PrimLine::getExpectedStructSize(FileFormatVersion aVersion) +size_t OOCP::PrimLine::getExpectedStructSize(FileFormatVersion aVersion) { size_t expectedByteLength; @@ -28,7 +27,7 @@ size_t PrimLine::getExpectedStructSize(FileFormatVersion aVersion) return expectedByteLength; } -void PrimLine::read(FileFormatVersion aVersion) +void OOCP::PrimLine::read(FileFormatVersion aVersion) { auto& ds = mCtx.mDs; GenericParser parser{mCtx}; diff --git a/src/Primitives/PrimLine.hpp b/src/Primitives/PrimLine.hpp index c384cc4e..686908ec 100644 --- a/src/Primitives/PrimLine.hpp +++ b/src/Primitives/PrimLine.hpp @@ -77,7 +77,8 @@ class PrimLine : public PrimBase std::optional mLineWidth; }; -[[maybe_unused]] static std::string to_string(const PrimLine& aObj) +[[maybe_unused]] +static std::string to_string(const PrimLine& aObj) { std::string str; @@ -97,7 +98,8 @@ inline std::string PrimLine::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const PrimLine& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const PrimLine& aVal) { aOs << to_string(aVal); diff --git a/src/Primitives/PrimPolygon.cpp b/src/Primitives/PrimPolygon.cpp index b86c0c6b..70bdfdb5 100644 --- a/src/Primitives/PrimPolygon.cpp +++ b/src/Primitives/PrimPolygon.cpp @@ -11,9 +11,8 @@ #include "General.hpp" #include "GenericParser.hpp" #include "Primitives/PrimPolygon.hpp" -using namespace OOCP; -size_t PrimPolygon::getExpectedStructSize(FileFormatVersion aVersion, size_t aPointCount) +size_t OOCP::PrimPolygon::getExpectedStructSize(FileFormatVersion aVersion, size_t aPointCount) { size_t expectedByteLength; @@ -33,7 +32,7 @@ size_t PrimPolygon::getExpectedStructSize(FileFormatVersion aVersion, size_t aPo return expectedByteLength; } -void PrimPolygon::read(FileFormatVersion aVersion) +void OOCP::PrimPolygon::read(FileFormatVersion aVersion) { auto& ds = mCtx.mDs; GenericParser parser{mCtx}; diff --git a/src/Primitives/PrimPolygon.hpp b/src/Primitives/PrimPolygon.hpp index b0dbe67b..bcbd7dfe 100644 --- a/src/Primitives/PrimPolygon.hpp +++ b/src/Primitives/PrimPolygon.hpp @@ -79,7 +79,8 @@ class PrimPolygon : public PrimBase std::vector points; }; -[[maybe_unused]] static std::string to_string(const PrimPolygon& aObj) +[[maybe_unused]] +static std::string to_string(const PrimPolygon& aObj) { std::string str; @@ -103,7 +104,8 @@ inline std::string PrimPolygon::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const PrimPolygon& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const PrimPolygon& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Primitives/PrimPolyline.cpp b/src/Primitives/PrimPolyline.cpp index 3b06724f..abbb58af 100644 --- a/src/Primitives/PrimPolyline.cpp +++ b/src/Primitives/PrimPolyline.cpp @@ -9,9 +9,8 @@ #include "General.hpp" #include "GenericParser.hpp" #include "Primitives/PrimPolyline.hpp" -using namespace OOCP; -size_t PrimPolyline::getExpectedStructSize(FileFormatVersion aVersion, size_t aPointCount) +size_t OOCP::PrimPolyline::getExpectedStructSize(FileFormatVersion aVersion, size_t aPointCount) { size_t expectedByteLength; @@ -27,7 +26,7 @@ size_t PrimPolyline::getExpectedStructSize(FileFormatVersion aVersion, size_t aP return expectedByteLength; } -void PrimPolyline::read(FileFormatVersion aVersion) +void OOCP::PrimPolyline::read(FileFormatVersion aVersion) { auto& ds = mCtx.mDs; GenericParser parser{mCtx}; diff --git a/src/Primitives/PrimPolyline.hpp b/src/Primitives/PrimPolyline.hpp index 190e043d..0ec5137e 100644 --- a/src/Primitives/PrimPolyline.hpp +++ b/src/Primitives/PrimPolyline.hpp @@ -72,7 +72,8 @@ class PrimPolyline : public PrimBase std::vector points; }; -[[maybe_unused]] static std::string to_string(const PrimPolyline& aObj) +[[maybe_unused]] +static std::string to_string(const PrimPolyline& aObj) { std::string str; @@ -94,7 +95,8 @@ inline std::string PrimPolyline::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const PrimPolyline& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const PrimPolyline& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Primitives/PrimRect.cpp b/src/Primitives/PrimRect.cpp index 2548e3b5..fd13f2ba 100644 --- a/src/Primitives/PrimRect.cpp +++ b/src/Primitives/PrimRect.cpp @@ -12,9 +12,8 @@ #include "General.hpp" #include "GenericParser.hpp" #include "Primitives/PrimRect.hpp" -using namespace OOCP; -size_t PrimRect::getExpectedStructSize(FileFormatVersion aVersion) +size_t OOCP::PrimRect::getExpectedStructSize(FileFormatVersion aVersion) { size_t expectedByteLength; @@ -34,7 +33,7 @@ size_t PrimRect::getExpectedStructSize(FileFormatVersion aVersion) return expectedByteLength; } -void PrimRect::read(FileFormatVersion aVersion) +void OOCP::PrimRect::read(FileFormatVersion aVersion) { auto& ds = mCtx.mDs; GenericParser parser{mCtx}; diff --git a/src/Primitives/PrimRect.hpp b/src/Primitives/PrimRect.hpp index 9ceb266c..47e0d5d2 100644 --- a/src/Primitives/PrimRect.hpp +++ b/src/Primitives/PrimRect.hpp @@ -86,7 +86,8 @@ class PrimRect : public PrimBase HatchStyle hatchStyle; }; -[[maybe_unused]] static std::string to_string(const PrimRect& aObj) +[[maybe_unused]] +static std::string to_string(const PrimRect& aObj) { std::string str; @@ -108,7 +109,8 @@ inline std::string PrimRect::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const PrimRect& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const PrimRect& aVal) { aOs << to_string(aVal); diff --git a/src/Primitives/PrimSymbolVector.cpp b/src/Primitives/PrimSymbolVector.cpp index 63f72963..8e0aa89f 100644 --- a/src/Primitives/PrimSymbolVector.cpp +++ b/src/Primitives/PrimSymbolVector.cpp @@ -11,9 +11,8 @@ #include "General.hpp" #include "GenericParser.hpp" #include "Primitives/PrimSymbolVector.hpp" -using namespace OOCP; -void PrimSymbolVector::read(FileFormatVersion /* aVersion */) +void OOCP::PrimSymbolVector::read(FileFormatVersion /* aVersion */) { auto& ds = mCtx.mDs; GenericParser parser{mCtx}; diff --git a/src/Primitives/PrimSymbolVector.hpp b/src/Primitives/PrimSymbolVector.hpp index d489db59..1b947ccd 100644 --- a/src/Primitives/PrimSymbolVector.hpp +++ b/src/Primitives/PrimSymbolVector.hpp @@ -51,7 +51,8 @@ class PrimSymbolVector std::vector primitives; }; -[[maybe_unused]] static std::string to_string(const PrimSymbolVector& aObj) +[[maybe_unused]] +static std::string to_string(const PrimSymbolVector& aObj) { std::string str; @@ -74,7 +75,8 @@ inline std::string PrimSymbolVector::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const PrimSymbolVector& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const PrimSymbolVector& aVal) { aOs << to_string(aVal); diff --git a/src/Streams/StreamAdminData.hpp b/src/Streams/StreamAdminData.hpp index 78c0c661..fccaa724 100644 --- a/src/Streams/StreamAdminData.hpp +++ b/src/Streams/StreamAdminData.hpp @@ -35,7 +35,8 @@ class StreamAdminData : public Stream } }; -[[maybe_unused]] static std::string to_string(const StreamAdminData& aObj) +[[maybe_unused]] +static std::string to_string(const StreamAdminData& aObj) { std::string str; @@ -49,7 +50,8 @@ inline std::string StreamAdminData::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamAdminData& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamAdminData& aVal) { aOs << to_string(aVal); diff --git a/src/Streams/StreamBOMDataStream.hpp b/src/Streams/StreamBOMDataStream.hpp index a00fa12f..1e52ba57 100644 --- a/src/Streams/StreamBOMDataStream.hpp +++ b/src/Streams/StreamBOMDataStream.hpp @@ -35,7 +35,8 @@ class StreamBOMDataStream : public Stream } }; -[[maybe_unused]] static std::string to_string(const StreamBOMDataStream& aObj) +[[maybe_unused]] +static std::string to_string(const StreamBOMDataStream& aObj) { std::string str; @@ -49,7 +50,8 @@ inline std::string StreamBOMDataStream::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamBOMDataStream& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamBOMDataStream& aVal) { aOs << to_string(aVal); diff --git a/src/Streams/StreamCache.hpp b/src/Streams/StreamCache.hpp index 7df52a57..ac9cd880 100644 --- a/src/Streams/StreamCache.hpp +++ b/src/Streams/StreamCache.hpp @@ -35,7 +35,8 @@ class StreamCache : public Stream } }; -[[maybe_unused]] static std::string to_string(const StreamCache& aObj) +[[maybe_unused]] +static std::string to_string(const StreamCache& aObj) { std::string str; @@ -49,7 +50,8 @@ inline std::string StreamCache::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamCache& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamCache& aVal) { aOs << to_string(aVal); diff --git a/src/Streams/StreamDTypeD.hpp b/src/Streams/StreamDTypeD.hpp index 2d5cea6d..c684db23 100644 --- a/src/Streams/StreamDTypeD.hpp +++ b/src/Streams/StreamDTypeD.hpp @@ -30,7 +30,8 @@ class Type ComponentType componentType; }; -[[maybe_unused]] static std::string to_string(const Type& aObj) +[[maybe_unused]] +static std::string to_string(const Type& aObj) { std::string str; @@ -46,7 +47,8 @@ inline std::string Type::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const Type& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const Type& aObj) { aOs << to_string(aObj); @@ -79,7 +81,8 @@ class StreamDTypeD : public Stream std::vector types; }; -[[maybe_unused]] static std::string to_string(const StreamDTypeD& aObj) +[[maybe_unused]] +static std::string to_string(const StreamDTypeD& aObj) { std::string str; @@ -100,7 +103,8 @@ inline std::string StreamDTypeD::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamDTypeD& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamDTypeD& aObj) { aOs << to_string(aObj); diff --git a/src/Streams/StreamDirectoryStruct.hpp b/src/Streams/StreamDirectoryStruct.hpp index d541194d..024e0bc5 100644 --- a/src/Streams/StreamDirectoryStruct.hpp +++ b/src/Streams/StreamDirectoryStruct.hpp @@ -37,7 +37,8 @@ class DirItemType int16_t timezone; //!< Refer to http://time.unitarium.com/military/ for more details. }; -[[maybe_unused]] static std::string to_string(const DirItemType& aObj) +[[maybe_unused]] +static std::string to_string(const DirItemType& aObj) { std::string str; @@ -54,7 +55,8 @@ inline std::string DirItemType::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const DirItemType& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const DirItemType& aVal) { aOs << to_string(aVal); @@ -93,7 +95,8 @@ class StreamDirectoryStruct : public Stream std::vector items; }; -[[maybe_unused]] static std::string to_string(const StreamDirectoryStruct& aObj) +[[maybe_unused]] +static std::string to_string(const StreamDirectoryStruct& aObj) { std::string str; @@ -114,7 +117,8 @@ inline std::string StreamDirectoryStruct::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamDirectoryStruct& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamDirectoryStruct& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Streams/StreamDsnStream.hpp b/src/Streams/StreamDsnStream.hpp index 60e33fa0..4bf16b14 100644 --- a/src/Streams/StreamDsnStream.hpp +++ b/src/Streams/StreamDsnStream.hpp @@ -35,7 +35,8 @@ class StreamDsnStream : public Stream } }; -[[maybe_unused]] static std::string to_string(const StreamDsnStream& aObj) +[[maybe_unused]] +static std::string to_string(const StreamDsnStream& aObj) { std::string str; @@ -49,7 +50,8 @@ inline std::string StreamDsnStream::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamDsnStream& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamDsnStream& aVal) { aOs << to_string(aVal); diff --git a/src/Streams/StreamERC.hpp b/src/Streams/StreamERC.hpp index bb0ac2d3..2ff12016 100644 --- a/src/Streams/StreamERC.hpp +++ b/src/Streams/StreamERC.hpp @@ -40,7 +40,8 @@ class StreamERC : public Stream std::unique_ptr ercSymbol; }; -[[maybe_unused]] static std::string to_string(const StreamERC& aObj) +[[maybe_unused]] +static std::string to_string(const StreamERC& aObj) { std::string str; @@ -60,7 +61,8 @@ inline std::string StreamERC::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamERC& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamERC& aVal) { aOs << to_string(aVal); diff --git a/src/Streams/StreamHSObjects.hpp b/src/Streams/StreamHSObjects.hpp index 22c1a798..5e2c9127 100644 --- a/src/Streams/StreamHSObjects.hpp +++ b/src/Streams/StreamHSObjects.hpp @@ -35,7 +35,8 @@ class StreamHSObjects : public Stream } }; -[[maybe_unused]] static std::string to_string(const StreamHSObjects& aObj) +[[maybe_unused]] +static std::string to_string(const StreamHSObjects& aObj) { std::string str; @@ -49,7 +50,8 @@ inline std::string StreamHSObjects::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamHSObjects& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamHSObjects& aVal) { aOs << to_string(aVal); diff --git a/src/Streams/StreamHierarchy.hpp b/src/Streams/StreamHierarchy.hpp index 3eea85b9..faa36c5b 100644 --- a/src/Streams/StreamHierarchy.hpp +++ b/src/Streams/StreamHierarchy.hpp @@ -55,7 +55,8 @@ class StreamHierarchy : public Stream std::vector> someHierarchyBases; }; -[[maybe_unused]] static std::string to_string(const StreamHierarchy& aObj) +[[maybe_unused]] +static std::string to_string(const StreamHierarchy& aObj) { std::string str; @@ -123,7 +124,8 @@ inline std::string StreamHierarchy::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamHierarchy& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamHierarchy& aObj) { aOs << to_string(aObj); diff --git a/src/Streams/StreamLibrary.hpp b/src/Streams/StreamLibrary.hpp index 803903df..023dd948 100644 --- a/src/Streams/StreamLibrary.hpp +++ b/src/Streams/StreamLibrary.hpp @@ -70,7 +70,8 @@ class StreamLibrary : public Stream std::vector> partAliases; //!< .first = Alias, .second = Package }; -[[maybe_unused]] static std::string to_string(const StreamLibrary& aObj) +[[maybe_unused]] +static std::string to_string(const StreamLibrary& aObj) { std::string str; @@ -114,7 +115,8 @@ inline std::string StreamLibrary::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamLibrary& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamLibrary& aVal) { aOs << to_string(aVal); return aOs; diff --git a/src/Streams/StreamNetBundleMapData.hpp b/src/Streams/StreamNetBundleMapData.hpp index 80812bb2..eb2ea497 100644 --- a/src/Streams/StreamNetBundleMapData.hpp +++ b/src/Streams/StreamNetBundleMapData.hpp @@ -34,7 +34,8 @@ class StreamNetBundleMapData : public Stream } }; -[[maybe_unused]] static std::string to_string(const StreamNetBundleMapData& aObj) +[[maybe_unused]] +static std::string to_string(const StreamNetBundleMapData& aObj) { std::string str; @@ -48,7 +49,8 @@ inline std::string StreamNetBundleMapData::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamNetBundleMapData& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamNetBundleMapData& aVal) { aOs << to_string(aVal); diff --git a/src/Streams/StreamPackage.hpp b/src/Streams/StreamPackage.hpp index 77215000..6cc35ad6 100644 --- a/src/Streams/StreamPackage.hpp +++ b/src/Streams/StreamPackage.hpp @@ -49,7 +49,8 @@ class StreamPackage : public Stream std::unique_ptr package; }; -[[maybe_unused]] static std::string to_string(const StreamPackage& aObj) +[[maybe_unused]] +static std::string to_string(const StreamPackage& aObj) { std::string str; @@ -87,7 +88,8 @@ inline std::string StreamPackage::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamPackage& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamPackage& aVal) { aOs << to_string(aVal); diff --git a/src/Streams/StreamPage.hpp b/src/Streams/StreamPage.hpp index af66b14f..0441bceb 100644 --- a/src/Streams/StreamPage.hpp +++ b/src/Streams/StreamPage.hpp @@ -78,7 +78,8 @@ class StreamPage : public Stream std::vector> graphicInsts; }; -[[maybe_unused]] static std::string to_string(const StreamPage& aObj) +[[maybe_unused]] +static std::string to_string(const StreamPage& aObj) { std::string str; @@ -195,7 +196,8 @@ inline std::string StreamPage::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamPage& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamPage& aVal) { aOs << to_string(aVal); diff --git a/src/Streams/StreamSchematic.cpp b/src/Streams/StreamSchematic.cpp index 111614b6..f1a86d4f 100644 --- a/src/Streams/StreamSchematic.cpp +++ b/src/Streams/StreamSchematic.cpp @@ -1,9 +1,6 @@ #include #include -#include -#include - #include "General.hpp" #include "GenericParser.hpp" #include "Streams/StreamSchematic.hpp" diff --git a/src/Streams/StreamSchematic.hpp b/src/Streams/StreamSchematic.hpp index 2d81479e..a0a911e3 100644 --- a/src/Streams/StreamSchematic.hpp +++ b/src/Streams/StreamSchematic.hpp @@ -36,7 +36,8 @@ class StreamSchematic : public Stream } }; -[[maybe_unused]] static std::string to_string(const StreamSchematic& aObj) +[[maybe_unused]] +static std::string to_string(const StreamSchematic& aObj) { std::string str; @@ -50,7 +51,8 @@ inline std::string StreamSchematic::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamSchematic& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamSchematic& aVal) { aOs << to_string(aVal); diff --git a/src/Streams/StreamSymbol.hpp b/src/Streams/StreamSymbol.hpp index 3cacb4e1..881abcf9 100644 --- a/src/Streams/StreamSymbol.hpp +++ b/src/Streams/StreamSymbol.hpp @@ -47,7 +47,8 @@ class StreamSymbol : public Stream std::vector> symbolDisplayProps; }; -[[maybe_unused]] static std::string to_string(const StreamSymbol& aObj) +[[maybe_unused]] +static std::string to_string(const StreamSymbol& aObj) { std::string str; @@ -85,7 +86,8 @@ inline std::string StreamSymbol::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StreamSymbol& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StreamSymbol& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructAlias.hpp b/src/Structures/StructAlias.hpp index 34f446bd..fbcd9773 100644 --- a/src/Structures/StructAlias.hpp +++ b/src/Structures/StructAlias.hpp @@ -52,7 +52,8 @@ class StructAlias : public Record std::string name; }; -[[maybe_unused]] static std::string to_string(const StructAlias& aObj) +[[maybe_unused]] +static std::string to_string(const StructAlias& aObj) { std::string str; @@ -71,7 +72,8 @@ inline std::string StructAlias::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructAlias& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructAlias& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructBookMarkSymbolInst.hpp b/src/Structures/StructBookMarkSymbolInst.hpp index 3c6b0166..6986fb6b 100644 --- a/src/Structures/StructBookMarkSymbolInst.hpp +++ b/src/Structures/StructBookMarkSymbolInst.hpp @@ -39,7 +39,8 @@ class StructBookMarkSymbolInst : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructBookMarkSymbolInst& aObj) +[[maybe_unused]] +static std::string to_string(const StructBookMarkSymbolInst& aObj) { return aObj.to_string(); } @@ -55,7 +56,8 @@ inline std::string StructBookMarkSymbolInst::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructBookMarkSymbolInst& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructBookMarkSymbolInst& aObj) { aOs << to_string(aObj); diff --git a/src/Structures/StructBusEntry.hpp b/src/Structures/StructBusEntry.hpp index 0cb59844..ec255f0d 100644 --- a/src/Structures/StructBusEntry.hpp +++ b/src/Structures/StructBusEntry.hpp @@ -51,7 +51,8 @@ class StructBusEntry : public Record int32_t endY; }; -[[maybe_unused]] static std::string to_string(const StructBusEntry& aObj) +[[maybe_unused]] +static std::string to_string(const StructBusEntry& aObj) { std::string str; @@ -70,7 +71,8 @@ inline std::string StructBusEntry::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructBusEntry& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructBusEntry& aObj) { aOs << to_string(aObj); diff --git a/src/Structures/StructDevice.hpp b/src/Structures/StructDevice.hpp index 83fc4f35..6107beae 100644 --- a/src/Structures/StructDevice.hpp +++ b/src/Structures/StructDevice.hpp @@ -57,7 +57,8 @@ class StructDevice : public Record std::vector pinGroup; // @todo Probably convert to std::optional }; -[[maybe_unused]] static std::string to_string(const StructDevice& aObj) +[[maybe_unused]] +static std::string to_string(const StructDevice& aObj) { std::string str; @@ -92,7 +93,8 @@ inline std::string StructDevice::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructDevice& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructDevice& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructERCObject.hpp b/src/Structures/StructERCObject.hpp index bf89ba96..75de8b6d 100644 --- a/src/Structures/StructERCObject.hpp +++ b/src/Structures/StructERCObject.hpp @@ -46,7 +46,8 @@ class StructERCObject : public StructGraphicInst std::string s2; }; -[[maybe_unused]] static std::string to_string(const StructERCObject& aObj) +[[maybe_unused]] +static std::string to_string(const StructERCObject& aObj) { return aObj.to_string(); } @@ -66,7 +67,8 @@ inline std::string StructERCObject::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructERCObject& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructERCObject& aObj) { aOs << to_string(aObj); diff --git a/src/Structures/StructERCSymbol.hpp b/src/Structures/StructERCSymbol.hpp index a57496d6..04fb8575 100644 --- a/src/Structures/StructERCSymbol.hpp +++ b/src/Structures/StructERCSymbol.hpp @@ -40,7 +40,8 @@ class StructERCSymbol : public StructSymbol StructSymbolBBox symbolBBox; }; -[[maybe_unused]] static std::string to_string(const StructERCSymbol& aObj) +[[maybe_unused]] +static std::string to_string(const StructERCSymbol& aObj) { std::string str; @@ -58,7 +59,8 @@ inline std::string StructERCSymbol::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructERCSymbol& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructERCSymbol& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructGeneralProperties.cpp b/src/Structures/StructGeneralProperties.cpp index 8316e976..1b2e09bf 100644 --- a/src/Structures/StructGeneralProperties.cpp +++ b/src/Structures/StructGeneralProperties.cpp @@ -1,13 +1,11 @@ #include #include +#include #include -#include -#include +#include -#include "Enums/LineStyle.hpp" -#include "Enums/LineWidth.hpp" -#include "FutureData.hpp" +#include "Enums/ImplementationType.hpp" #include "General.hpp" #include "Structures/StructGeneralProperties.hpp" diff --git a/src/Structures/StructGeneralProperties.hpp b/src/Structures/StructGeneralProperties.hpp index be7ec197..a23e6bf9 100644 --- a/src/Structures/StructGeneralProperties.hpp +++ b/src/Structures/StructGeneralProperties.hpp @@ -70,7 +70,8 @@ class StructGeneralProperties : public Other bool pinNumberVisible; }; -[[maybe_unused]] static std::string to_string(const StructGeneralProperties& aObj) +[[maybe_unused]] +static std::string to_string(const StructGeneralProperties& aObj) { std::string str; @@ -92,7 +93,8 @@ inline std::string StructGeneralProperties::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGeneralProperties& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGeneralProperties& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructGlobal.hpp b/src/Structures/StructGlobal.hpp index 9006b5ce..8f7cf837 100644 --- a/src/Structures/StructGlobal.hpp +++ b/src/Structures/StructGlobal.hpp @@ -39,7 +39,8 @@ class StructGlobal : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructGlobal& aObj) +[[maybe_unused]] +static std::string to_string(const StructGlobal& aObj) { return aObj.to_string(); } @@ -55,7 +56,8 @@ inline std::string StructGlobal::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGlobal& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGlobal& aObj) { aOs << to_string(aObj); diff --git a/src/Structures/StructGlobalSymbol.hpp b/src/Structures/StructGlobalSymbol.hpp index 5defc33e..95179569 100644 --- a/src/Structures/StructGlobalSymbol.hpp +++ b/src/Structures/StructGlobalSymbol.hpp @@ -45,7 +45,8 @@ class StructGlobalSymbol : public StructSymbol std::vector> symbolDisplayProps; }; -[[maybe_unused]] static std::string to_string(const StructGlobalSymbol& aObj) +[[maybe_unused]] +static std::string to_string(const StructGlobalSymbol& aObj) { std::string str; @@ -80,7 +81,8 @@ inline std::string StructGlobalSymbol::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGlobalSymbol& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGlobalSymbol& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructGraphicArcInst.hpp b/src/Structures/StructGraphicArcInst.hpp index e448bb6a..36d01a08 100644 --- a/src/Structures/StructGraphicArcInst.hpp +++ b/src/Structures/StructGraphicArcInst.hpp @@ -38,7 +38,8 @@ class StructGraphicArcInst : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructGraphicArcInst& aObj) +[[maybe_unused]] +static std::string to_string(const StructGraphicArcInst& aObj) { return aObj.to_string(); } @@ -54,7 +55,8 @@ inline std::string StructGraphicArcInst::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGraphicArcInst& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGraphicArcInst& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructGraphicBezierInst.hpp b/src/Structures/StructGraphicBezierInst.hpp index 0dc704fc..becb6284 100644 --- a/src/Structures/StructGraphicBezierInst.hpp +++ b/src/Structures/StructGraphicBezierInst.hpp @@ -38,7 +38,8 @@ class StructGraphicBezierInst : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructGraphicBezierInst& aObj) +[[maybe_unused]] +static std::string to_string(const StructGraphicBezierInst& aObj) { return aObj.to_string(); } @@ -54,7 +55,8 @@ inline std::string StructGraphicBezierInst::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGraphicBezierInst& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGraphicBezierInst& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructGraphicBitMapInst.hpp b/src/Structures/StructGraphicBitMapInst.hpp index 6017b080..71c749bd 100644 --- a/src/Structures/StructGraphicBitMapInst.hpp +++ b/src/Structures/StructGraphicBitMapInst.hpp @@ -38,7 +38,8 @@ class StructGraphicBitMapInst : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructGraphicBitMapInst& aObj) +[[maybe_unused]] +static std::string to_string(const StructGraphicBitMapInst& aObj) { return aObj.to_string(); } @@ -54,7 +55,8 @@ inline std::string StructGraphicBitMapInst::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGraphicBitMapInst& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGraphicBitMapInst& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructGraphicBoxInst.hpp b/src/Structures/StructGraphicBoxInst.hpp index 599afbe7..db0edc19 100644 --- a/src/Structures/StructGraphicBoxInst.hpp +++ b/src/Structures/StructGraphicBoxInst.hpp @@ -38,7 +38,8 @@ class StructGraphicBoxInst : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructGraphicBoxInst& aObj) +[[maybe_unused]] +static std::string to_string(const StructGraphicBoxInst& aObj) { return aObj.to_string(); } @@ -54,7 +55,8 @@ inline std::string StructGraphicBoxInst::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGraphicBoxInst& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGraphicBoxInst& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructGraphicCommentTextInst.hpp b/src/Structures/StructGraphicCommentTextInst.hpp index 0a4fad8e..3b88b115 100644 --- a/src/Structures/StructGraphicCommentTextInst.hpp +++ b/src/Structures/StructGraphicCommentTextInst.hpp @@ -38,7 +38,8 @@ class StructGraphicCommentTextInst : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructGraphicCommentTextInst& aObj) +[[maybe_unused]] +static std::string to_string(const StructGraphicCommentTextInst& aObj) { return aObj.to_string(); } @@ -54,7 +55,8 @@ inline std::string StructGraphicCommentTextInst::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGraphicCommentTextInst& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGraphicCommentTextInst& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructGraphicEllipseInst.hpp b/src/Structures/StructGraphicEllipseInst.hpp index e63cce03..d1fee584 100644 --- a/src/Structures/StructGraphicEllipseInst.hpp +++ b/src/Structures/StructGraphicEllipseInst.hpp @@ -38,7 +38,8 @@ class StructGraphicEllipseInst : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructGraphicEllipseInst& aObj) +[[maybe_unused]] +static std::string to_string(const StructGraphicEllipseInst& aObj) { return aObj.to_string(); } @@ -54,7 +55,8 @@ inline std::string StructGraphicEllipseInst::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGraphicEllipseInst& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGraphicEllipseInst& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructGraphicInst.hpp b/src/Structures/StructGraphicInst.hpp index b090ecb1..b01bfbef 100644 --- a/src/Structures/StructGraphicInst.hpp +++ b/src/Structures/StructGraphicInst.hpp @@ -73,7 +73,8 @@ class StructGraphicInst : public Record std::unique_ptr sthInPages0; }; -[[maybe_unused]] static std::string to_string(const StructGraphicInst& aObj) +[[maybe_unused]] +static std::string to_string(const StructGraphicInst& aObj) { return aObj.to_string(); } @@ -111,7 +112,8 @@ inline std::string StructGraphicInst::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGraphicInst& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGraphicInst& aObj) { aOs << to_string(aObj); diff --git a/src/Structures/StructGraphicLineInst.hpp b/src/Structures/StructGraphicLineInst.hpp index 28dd99cf..047ad8fd 100644 --- a/src/Structures/StructGraphicLineInst.hpp +++ b/src/Structures/StructGraphicLineInst.hpp @@ -38,7 +38,8 @@ class StructGraphicLineInst : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructGraphicLineInst& aObj) +[[maybe_unused]] +static std::string to_string(const StructGraphicLineInst& aObj) { return aObj.to_string(); } @@ -54,7 +55,8 @@ inline std::string StructGraphicLineInst::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGraphicLineInst& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGraphicLineInst& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructGraphicOleEmbedInst.hpp b/src/Structures/StructGraphicOleEmbedInst.hpp index c8b05a28..1187f6d7 100644 --- a/src/Structures/StructGraphicOleEmbedInst.hpp +++ b/src/Structures/StructGraphicOleEmbedInst.hpp @@ -38,7 +38,8 @@ class StructGraphicOleEmbedInst : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructGraphicOleEmbedInst& aObj) +[[maybe_unused]] +static std::string to_string(const StructGraphicOleEmbedInst& aObj) { return aObj.to_string(); } @@ -54,7 +55,8 @@ inline std::string StructGraphicOleEmbedInst::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGraphicOleEmbedInst& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGraphicOleEmbedInst& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructGraphicPolygonInst.hpp b/src/Structures/StructGraphicPolygonInst.hpp index eae585ed..6af85819 100644 --- a/src/Structures/StructGraphicPolygonInst.hpp +++ b/src/Structures/StructGraphicPolygonInst.hpp @@ -38,7 +38,8 @@ class StructGraphicPolygonInst : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructGraphicPolygonInst& aObj) +[[maybe_unused]] +static std::string to_string(const StructGraphicPolygonInst& aObj) { return aObj.to_string(); } @@ -54,7 +55,8 @@ inline std::string StructGraphicPolygonInst::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGraphicPolygonInst& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGraphicPolygonInst& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructGraphicPolylineInst.hpp b/src/Structures/StructGraphicPolylineInst.hpp index 32bca6ab..154a9450 100644 --- a/src/Structures/StructGraphicPolylineInst.hpp +++ b/src/Structures/StructGraphicPolylineInst.hpp @@ -38,7 +38,8 @@ class StructGraphicPolylineInst : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructGraphicPolylineInst& aObj) +[[maybe_unused]] +static std::string to_string(const StructGraphicPolylineInst& aObj) { return aObj.to_string(); } @@ -54,7 +55,8 @@ inline std::string StructGraphicPolylineInst::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructGraphicPolylineInst& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructGraphicPolylineInst& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructLibraryPart.hpp b/src/Structures/StructLibraryPart.hpp index f15a28f8..21672922 100644 --- a/src/Structures/StructLibraryPart.hpp +++ b/src/Structures/StructLibraryPart.hpp @@ -53,7 +53,8 @@ class StructLibraryPart : public Record StructGeneralProperties generalProperties; }; -[[maybe_unused]] static std::string to_string(const StructLibraryPart& aObj) +[[maybe_unused]] +static std::string to_string(const StructLibraryPart& aObj) { std::string str; @@ -98,7 +99,8 @@ inline std::string StructLibraryPart::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructLibraryPart& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructLibraryPart& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructNetDbIdMapping.hpp b/src/Structures/StructNetDbIdMapping.hpp index 61752404..3ffd309a 100644 --- a/src/Structures/StructNetDbIdMapping.hpp +++ b/src/Structures/StructNetDbIdMapping.hpp @@ -37,7 +37,8 @@ class StructNetDbIdMapping : public Record } }; -[[maybe_unused]] static std::string to_string(const StructNetDbIdMapping& aObj) +[[maybe_unused]] +static std::string to_string(const StructNetDbIdMapping& aObj) { std::string str; @@ -51,7 +52,8 @@ inline std::string StructNetDbIdMapping::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructNetDbIdMapping& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructNetDbIdMapping& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructOffPageConnector.hpp b/src/Structures/StructOffPageConnector.hpp index 5c135236..1b19be7d 100644 --- a/src/Structures/StructOffPageConnector.hpp +++ b/src/Structures/StructOffPageConnector.hpp @@ -39,7 +39,8 @@ class StructOffPageConnector : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructOffPageConnector& aObj) +[[maybe_unused]] +static std::string to_string(const StructOffPageConnector& aObj) { return aObj.to_string(); } @@ -55,7 +56,8 @@ inline std::string StructOffPageConnector::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructOffPageConnector& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructOffPageConnector& aObj) { aOs << to_string(aObj); diff --git a/src/Structures/StructOffPageSymbol.hpp b/src/Structures/StructOffPageSymbol.hpp index 6bb0dc97..ee42a409 100644 --- a/src/Structures/StructOffPageSymbol.hpp +++ b/src/Structures/StructOffPageSymbol.hpp @@ -46,7 +46,8 @@ class StructOffPageSymbol : public StructSymbol std::vector> symbolDisplayProps; }; -[[maybe_unused]] static std::string to_string(const StructOffPageSymbol& aObj) +[[maybe_unused]] +static std::string to_string(const StructOffPageSymbol& aObj) { std::string str; @@ -81,7 +82,8 @@ inline std::string StructOffPageSymbol::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructOffPageSymbol& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructOffPageSymbol& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructPackage.hpp b/src/Structures/StructPackage.hpp index a422be3a..b3c7b2fd 100644 --- a/src/Structures/StructPackage.hpp +++ b/src/Structures/StructPackage.hpp @@ -49,7 +49,8 @@ class StructPackage : public Record std::vector> devices; }; -[[maybe_unused]] static std::string to_string(const StructPackage& aObj) +[[maybe_unused]] +static std::string to_string(const StructPackage& aObj) { std::string str; @@ -75,7 +76,8 @@ inline std::string StructPackage::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructPackage& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructPackage& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructPartCell.hpp b/src/Structures/StructPartCell.hpp index 1e78b10f..fbbe8415 100644 --- a/src/Structures/StructPartCell.hpp +++ b/src/Structures/StructPartCell.hpp @@ -42,7 +42,8 @@ class StructPartCell : public Record std::string convertName; }; -[[maybe_unused]] static std::string to_string(const StructPartCell& aObj) +[[maybe_unused]] +static std::string to_string(const StructPartCell& aObj) { std::string str; @@ -59,7 +60,8 @@ inline std::string StructPartCell::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructPartCell& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructPartCell& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructPinShapeSymbol.hpp b/src/Structures/StructPinShapeSymbol.hpp index 2887a78a..09be482c 100644 --- a/src/Structures/StructPinShapeSymbol.hpp +++ b/src/Structures/StructPinShapeSymbol.hpp @@ -45,7 +45,8 @@ class StructPinShapeSymbol : public StructSymbol std::vector> symbolDisplayProps; }; -[[maybe_unused]] static std::string to_string(const StructPinShapeSymbol& aObj) +[[maybe_unused]] +static std::string to_string(const StructPinShapeSymbol& aObj) { std::string str; @@ -80,7 +81,8 @@ inline std::string StructPinShapeSymbol::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructPinShapeSymbol& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructPinShapeSymbol& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructPlacedInstance.hpp b/src/Structures/StructPlacedInstance.hpp index 36994048..3098be85 100644 --- a/src/Structures/StructPlacedInstance.hpp +++ b/src/Structures/StructPlacedInstance.hpp @@ -46,7 +46,8 @@ class StructPlacedInstance : public Record std::vector> t0x10s; }; -[[maybe_unused]] static std::string to_string(const StructPlacedInstance& aObj) +[[maybe_unused]] +static std::string to_string(const StructPlacedInstance& aObj) { std::string str; @@ -78,7 +79,8 @@ inline std::string StructPlacedInstance::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructPlacedInstance& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructPlacedInstance& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructPort.hpp b/src/Structures/StructPort.hpp index 2d630877..d1f944a2 100644 --- a/src/Structures/StructPort.hpp +++ b/src/Structures/StructPort.hpp @@ -39,7 +39,8 @@ class StructPort : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructPort& aObj) +[[maybe_unused]] +static std::string to_string(const StructPort& aObj) { return aObj.to_string(); } @@ -55,7 +56,8 @@ inline std::string StructPort::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructPort& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructPort& aObj) { aOs << to_string(aObj); diff --git a/src/Structures/StructPortSymbol.hpp b/src/Structures/StructPortSymbol.hpp index 33d8262e..31828671 100644 --- a/src/Structures/StructPortSymbol.hpp +++ b/src/Structures/StructPortSymbol.hpp @@ -37,7 +37,8 @@ class StructPortSymbol : public StructSymbol } }; -[[maybe_unused]] static std::string to_string(const StructPortSymbol& aObj) +[[maybe_unused]] +static std::string to_string(const StructPortSymbol& aObj) { std::string str; @@ -51,7 +52,8 @@ inline std::string StructPortSymbol::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructPortSymbol& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructPortSymbol& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructSomeHierarchyBase.hpp b/src/Structures/StructSomeHierarchyBase.hpp index 462a578c..63b6641b 100644 --- a/src/Structures/StructSomeHierarchyBase.hpp +++ b/src/Structures/StructSomeHierarchyBase.hpp @@ -38,7 +38,8 @@ class StructSomeHierarchyBase : public Record // void read(FileFormatVersion aVersion = FileFormatVersion::Unknown) override; }; -[[maybe_unused]] static std::string to_string(const StructSomeHierarchyBase& aObj) +[[maybe_unused]] +static std::string to_string(const StructSomeHierarchyBase& aObj) { std::string str; @@ -47,7 +48,8 @@ class StructSomeHierarchyBase : public Record return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructSomeHierarchyBase& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructSomeHierarchyBase& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructSthInHierarchy1.hpp b/src/Structures/StructSthInHierarchy1.hpp index 07b2c5ee..f183d413 100644 --- a/src/Structures/StructSthInHierarchy1.hpp +++ b/src/Structures/StructSthInHierarchy1.hpp @@ -37,7 +37,8 @@ class StructSthInHierarchy1 : public Record } }; -[[maybe_unused]] static std::string to_string(const StructSthInHierarchy1& aObj) +[[maybe_unused]] +static std::string to_string(const StructSthInHierarchy1& aObj) { std::string str; @@ -51,7 +52,8 @@ inline std::string StructSthInHierarchy1::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructSthInHierarchy1& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructSthInHierarchy1& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructSthInHierarchy2.hpp b/src/Structures/StructSthInHierarchy2.hpp index ef426c84..652aaefa 100644 --- a/src/Structures/StructSthInHierarchy2.hpp +++ b/src/Structures/StructSthInHierarchy2.hpp @@ -37,7 +37,8 @@ class StructSthInHierarchy2 : public StructSomeHierarchyBase } }; -[[maybe_unused]] static std::string to_string(const StructSthInHierarchy2& aObj) +[[maybe_unused]] +static std::string to_string(const StructSthInHierarchy2& aObj) { std::string str; @@ -51,7 +52,8 @@ inline std::string StructSthInHierarchy2::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructSthInHierarchy2& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructSthInHierarchy2& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructSthInHierarchy3.hpp b/src/Structures/StructSthInHierarchy3.hpp index d3d0c830..5dfae52a 100644 --- a/src/Structures/StructSthInHierarchy3.hpp +++ b/src/Structures/StructSthInHierarchy3.hpp @@ -37,7 +37,8 @@ class StructSthInHierarchy3 : public Record } }; -[[maybe_unused]] static std::string to_string(const StructSthInHierarchy3& aObj) +[[maybe_unused]] +static std::string to_string(const StructSthInHierarchy3& aObj) { std::string str; @@ -51,7 +52,8 @@ inline std::string StructSthInHierarchy3::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructSthInHierarchy3& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructSthInHierarchy3& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructSthInPages0.hpp b/src/Structures/StructSthInPages0.hpp index ca0e2f66..1aeaecdb 100644 --- a/src/Structures/StructSthInPages0.hpp +++ b/src/Structures/StructSthInPages0.hpp @@ -57,7 +57,8 @@ class StructSthInPages0 : public Record std::vector> primitives; }; -[[maybe_unused]] static std::string to_string(const StructSthInPages0& aObj) +[[maybe_unused]] +static std::string to_string(const StructSthInPages0& aObj) { std::string str; @@ -83,7 +84,8 @@ inline std::string StructSthInPages0::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructSthInPages0& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructSthInPages0& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructSymbol.hpp b/src/Structures/StructSymbol.hpp index d4145bfe..b7547a91 100644 --- a/src/Structures/StructSymbol.hpp +++ b/src/Structures/StructSymbol.hpp @@ -32,7 +32,8 @@ class StructSymbol : public StructSthInPages0 // void read(FileFormatVersion aVersion = FileFormatVersion::Unknown) override; }; -[[maybe_unused]] static std::string to_string(const StructSymbol& aObj) +[[maybe_unused]] +static std::string to_string(const StructSymbol& aObj) { std::string str; @@ -46,7 +47,8 @@ inline std::string StructSymbol::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructSymbol& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructSymbol& aObj) { aOs << to_string(aObj); diff --git a/src/Structures/StructSymbolBBox.hpp b/src/Structures/StructSymbolBBox.hpp index f0ce7555..5777e39c 100644 --- a/src/Structures/StructSymbolBBox.hpp +++ b/src/Structures/StructSymbolBBox.hpp @@ -42,7 +42,8 @@ class StructSymbolBBox : public Other int32_t y2; }; -[[maybe_unused]] static std::string to_string(const StructSymbolBBox& aObj) +[[maybe_unused]] +static std::string to_string(const StructSymbolBBox& aObj) { std::string str; @@ -60,7 +61,8 @@ inline std::string StructSymbolBBox::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructSymbolBBox& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructSymbolBBox& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructSymbolDisplayProp.hpp b/src/Structures/StructSymbolDisplayProp.hpp index 397b8e82..3d07d4cf 100644 --- a/src/Structures/StructSymbolDisplayProp.hpp +++ b/src/Structures/StructSymbolDisplayProp.hpp @@ -55,7 +55,8 @@ class StructSymbolDisplayProp : public Record // @todo implement getter methods for name and textFont -[[maybe_unused]] static std::string to_string(const StructSymbolDisplayProp& aObj) +[[maybe_unused]] +static std::string to_string(const StructSymbolDisplayProp& aObj) { std::string str; @@ -75,7 +76,8 @@ inline std::string StructSymbolDisplayProp::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructSymbolDisplayProp& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructSymbolDisplayProp& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructSymbolPin.hpp b/src/Structures/StructSymbolPin.hpp index 7aaa76ab..8413abd1 100644 --- a/src/Structures/StructSymbolPin.hpp +++ b/src/Structures/StructSymbolPin.hpp @@ -63,7 +63,8 @@ class StructSymbolPin : public Record std::vector> symbolDisplayProps; }; -[[maybe_unused]] static std::string to_string(const StructSymbolPin& aObj) +[[maybe_unused]] +static std::string to_string(const StructSymbolPin& aObj) { std::string str; @@ -96,7 +97,8 @@ inline std::string StructSymbolPin::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructSymbolPin& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructSymbolPin& aObj) { aOs << to_string(aObj); diff --git a/src/Structures/StructT0x10.hpp b/src/Structures/StructT0x10.hpp index e82c4697..e4f2b617 100644 --- a/src/Structures/StructT0x10.hpp +++ b/src/Structures/StructT0x10.hpp @@ -43,7 +43,8 @@ class StructT0x10 : public Record std::vector> symbolDisplayProps; }; -[[maybe_unused]] static std::string to_string(const StructT0x10& aObj) +[[maybe_unused]] +static std::string to_string(const StructT0x10& aObj) { std::string str; @@ -66,7 +67,8 @@ inline std::string StructT0x10::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructT0x10& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructT0x10& aObj) { aOs << to_string(aObj); diff --git a/src/Structures/StructT0x34.hpp b/src/Structures/StructT0x34.hpp index fc2aac45..820ebc23 100644 --- a/src/Structures/StructT0x34.hpp +++ b/src/Structures/StructT0x34.hpp @@ -50,7 +50,8 @@ class StructT0x34 : public Record LineWidth lineWidth; }; -[[maybe_unused]] static std::string to_string(const StructT0x34& aObj) +[[maybe_unused]] +static std::string to_string(const StructT0x34& aObj) { std::string str; @@ -68,7 +69,8 @@ inline std::string StructT0x34::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructT0x34& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructT0x34& aObj) { aOs << to_string(aObj); diff --git a/src/Structures/StructT0x35.hpp b/src/Structures/StructT0x35.hpp index 9f5087bd..47e244d7 100644 --- a/src/Structures/StructT0x35.hpp +++ b/src/Structures/StructT0x35.hpp @@ -49,7 +49,8 @@ class StructT0x35 : public Record LineWidth lineWidth; }; -[[maybe_unused]] static std::string to_string(const StructT0x35& aObj) +[[maybe_unused]] +static std::string to_string(const StructT0x35& aObj) { std::string str; @@ -67,7 +68,8 @@ inline std::string StructT0x35::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructT0x35& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructT0x35& aObj) { aOs << to_string(aObj); diff --git a/src/Structures/StructT0x45.hpp b/src/Structures/StructT0x45.hpp index dec692e9..f21f1302 100644 --- a/src/Structures/StructT0x45.hpp +++ b/src/Structures/StructT0x45.hpp @@ -37,7 +37,8 @@ class StructT0x45 : public StructSomeHierarchyBase } }; -[[maybe_unused]] static std::string to_string(const StructT0x45& aObj) +[[maybe_unused]] +static std::string to_string(const StructT0x45& aObj) { std::string str; @@ -51,7 +52,8 @@ inline std::string StructT0x45::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructT0x45& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructT0x45& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructT0x5b.hpp b/src/Structures/StructT0x5b.hpp index f6d598b9..d3013403 100644 --- a/src/Structures/StructT0x5b.hpp +++ b/src/Structures/StructT0x5b.hpp @@ -37,7 +37,8 @@ class StructT0x5b : public Record } }; -[[maybe_unused]] static std::string to_string(const StructT0x5b& aObj) +[[maybe_unused]] +static std::string to_string(const StructT0x5b& aObj) { std::string str; @@ -51,7 +52,8 @@ inline std::string StructT0x5b::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructT0x5b& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructT0x5b& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructTitleBlock.hpp b/src/Structures/StructTitleBlock.hpp index 154a4a76..4cf01509 100644 --- a/src/Structures/StructTitleBlock.hpp +++ b/src/Structures/StructTitleBlock.hpp @@ -39,7 +39,8 @@ class StructTitleBlock : public StructGraphicInst } }; -[[maybe_unused]] static std::string to_string(const StructTitleBlock& aObj) +[[maybe_unused]] +static std::string to_string(const StructTitleBlock& aObj) { return aObj.to_string(); } @@ -55,7 +56,8 @@ inline std::string StructTitleBlock::to_string() const return str; } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructTitleBlock& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructTitleBlock& aObj) { aOs << to_string(aObj); diff --git a/src/Structures/StructTitleBlockSymbol.hpp b/src/Structures/StructTitleBlockSymbol.hpp index 00204878..6b89f80d 100644 --- a/src/Structures/StructTitleBlockSymbol.hpp +++ b/src/Structures/StructTitleBlockSymbol.hpp @@ -45,7 +45,8 @@ class StructTitleBlockSymbol : public StructSymbol std::vector> symbolDisplayProps; }; -[[maybe_unused]] static std::string to_string(const StructTitleBlockSymbol& aObj) +[[maybe_unused]] +static std::string to_string(const StructTitleBlockSymbol& aObj) { std::string str; @@ -80,7 +81,8 @@ inline std::string StructTitleBlockSymbol::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructTitleBlockSymbol& aVal) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructTitleBlockSymbol& aVal) { aOs << to_string(aVal); diff --git a/src/Structures/StructWire.hpp b/src/Structures/StructWire.hpp index 6f4fb789..f66f46b4 100644 --- a/src/Structures/StructWire.hpp +++ b/src/Structures/StructWire.hpp @@ -62,7 +62,8 @@ class StructWire : public Record LineStyle lineStyle; }; -[[maybe_unused]] static std::string to_string(const StructWire& aObj) +[[maybe_unused]] +static std::string to_string(const StructWire& aObj) { std::string str; @@ -103,7 +104,8 @@ inline std::string StructWire::to_string() const return OOCP::to_string(*this); } -[[maybe_unused]] static std::ostream& operator<<(std::ostream& aOs, const StructWire& aObj) +[[maybe_unused]] +static std::ostream& operator<<(std::ostream& aOs, const StructWire& aObj) { aOs << to_string(aObj);