diff --git a/include/actsim_agent/agent_artifact.hpp b/include/actsim_agent/agent_artifact.hpp new file mode 100644 index 0000000..6091cb6 --- /dev/null +++ b/include/actsim_agent/agent_artifact.hpp @@ -0,0 +1,63 @@ + +/************************************************************************* + * + * This file is part of the ACT library + * + * Copyright (c) 2024 Fabian Posch + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + ************************************************************************** + */ + +#ifndef __AGENT_ARTIFACT__ +#define __AGENT_ARTIFACT__ + +#include +#include + +class DBSimArtifact : public db::DBArtifact { + + public: + + DBSimArtifact( + const db::uuid_t& id, + const db::uuid_t& source_pass, + const db::uuid_t& target_artifact, + const db::uuid_t& design, + const db::uuid_t& source_config + ); + + /** + * @brief The UUID of the design this simulation uses + */ + const db::uuid_t& design = design_; + + /** + * @brief The UUID of the simulator configuration + */ + const db::uuid_t& source_config = source_config_; + + private: + + db::uuid_t design_; + db::uuid_t source_config_; +}; + +class DBSimConfigArtifact : public DBSimArtifact, public pl::SimConfigArtifact {}; +class DBSimOutputArtifact : public DBSimArtifact, public pl::SimOutputArtifact {}; + +#endif \ No newline at end of file diff --git a/src/actsim_agent/agent_artifact.cpp b/src/actsim_agent/agent_artifact.cpp new file mode 100644 index 0000000..1fed4fd --- /dev/null +++ b/src/actsim_agent/agent_artifact.cpp @@ -0,0 +1,37 @@ + +/************************************************************************* + * + * This file is part of the ACT library + * + * Copyright (c) 2024 Fabian Posch + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + ************************************************************************** + */ + +#include "agent_artifact.hpp" + +DBSimArtifact::DBSimArtifact( + const db::uuid_t& id, + const db::uuid_t& source_pass, + const db::uuid_t& target_artifact, + const db::uuid_t& design, + const db::uuid_t& source_config +) : DBArtifact(id, source_pass, target_artifact) { + this->design_ = design; + this->source_config_ = source_config; +}