From f848d380fc75c615b7606a2c965afa670cd50741 Mon Sep 17 00:00:00 2001 From: Fabian Posch Date: Thu, 15 Jan 2026 23:35:57 +0100 Subject: [PATCH] fix ocr violations --- include/artifact.hpp | 7 +++++++ include/db_types.hpp | 16 ++++------------ src/db_types.cpp | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 src/db_types.cpp diff --git a/include/artifact.hpp b/include/artifact.hpp index 4e9ae8f..db94fc0 100644 --- a/include/artifact.hpp +++ b/include/artifact.hpp @@ -223,6 +223,11 @@ class SimConfigArtifact: public Artifact { const bool& has_reference = has_reference_; + inline void set_prolog (std::vector prolog) { this->prolog = prolog; }; + inline void set_epilog (std::vector epilog) { this->epilog = epilog; }; + inline std::vector& get_prolog () { return this->prolog; }; + inline std::vector& get_epilog () { return this->epilog; }; + /** * @brief Can this simulation be handled by multiple nodes * @@ -244,6 +249,8 @@ class SimConfigArtifact: public Artifact { bool has_reference_; std::vector testcases; + std::vector prolog; + std::vector epilog; }; /** Reference to a signal in an ACT design */ diff --git a/include/db_types.hpp b/include/db_types.hpp index 5230217..365d806 100644 --- a/include/db_types.hpp +++ b/include/db_types.hpp @@ -21,8 +21,7 @@ ************************************************************************** */ -#ifndef __DB_TYPES_HPP__ -#define __DB_TYPES_HPP__ +#pragma once #include #include @@ -184,9 +183,6 @@ struct std::hash { \ \ template<> \ - std::string const type_name{name}; \ - \ - template<> \ struct nullness : pqxx::no_null {}; \ \ template<> \ @@ -271,7 +267,9 @@ struct std::hash { }; \ }; \ }; - + // template<> + // std::string const type_name{name}; + // /** * @brief Conversion extension for uuid_t for the pqxx library @@ -281,9 +279,6 @@ struct std::hash { */ namespace pqxx { -template<> -std::string const type_name{"uuid_t"}; - template<> struct nullness : pqxx::no_null {}; @@ -344,6 +339,3 @@ struct string_traits { }; DB_REGISTER_ENUM_CLASS(db::JobStatusType, db::job_status_type_st, "job_status_type"); - - -#endif \ No newline at end of file diff --git a/src/db_types.cpp b/src/db_types.cpp new file mode 100644 index 0000000..5e9ea0f --- /dev/null +++ b/src/db_types.cpp @@ -0,0 +1,18 @@ + +#include "db_types.hpp" +#include + + +/** + * @brief Conversion extension for uuid_t for the pqxx library + * + * For more information see https://libpqxx.readthedocs.io/en/7.4.1/a01360.html + * + */ +namespace pqxx { +template<> +std::string const type_name{"job_status_type"}; + +template<> +std::string const type_name{"uuid_t"}; +};