move database information to specific implementation

This commit is contained in:
Fabian Posch 2024-01-12 18:29:46 -05:00
parent 2001e0890a
commit 7003b3d211
2 changed files with 100 additions and 0 deletions

View file

@ -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 <cluster/artifact.hpp>
#include <cluster/db_artifact.hpp>
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

View file

@ -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;
}