Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* ISM Object Main Structure Element
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Iuliana Ojog, SLSE, 2016-11-26
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QMap>
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
|
||||
#include <PresentationManagement/pre_db.h>
|
||||
#include <PresentationManagement/pre.hpp>
|
||||
|
||||
#include "logger.h"
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
namespace PresentationManagement
|
||||
{
|
||||
class Initialization;
|
||||
|
||||
class ObjectPresentation
|
||||
{
|
||||
public:
|
||||
explicit ObjectPresentation(Initialization *mainHandler);
|
||||
ObjectPresentation(const Presentation &data, Initialization *mainHandler);
|
||||
|
||||
~ObjectPresentation();
|
||||
|
||||
Core::FunctionReplyObject createObject(const PresentationModifyRequest &request);
|
||||
Core::FunctionReplyObject updateObject(const PresentationModifyRequest &request);
|
||||
Core::FunctionReplyObject removeObject();
|
||||
Core::FunctionReplyObject changeStatus(const PresentationChangeStatusRequest &request);
|
||||
|
||||
qint32 getId() const { return m_data.id(); }
|
||||
QString getName() const { return QString::fromStdString(m_data.name()); }
|
||||
const std::vector<PresentationContent> &getContent() const { return m_content; }
|
||||
const Presentation &getData() const { return m_data; }
|
||||
|
||||
bool isValid() const;
|
||||
|
||||
void addPresentationContent(PresentationContent &&data);
|
||||
|
||||
// convert methods
|
||||
static Database::PrePresentation toDbData(const Presentation &ddsData); // dds -> db
|
||||
static Presentation toDdsData(const Database::PrePresentation &dbData); // db -> dds
|
||||
|
||||
static Database::PrePresentationContent toDbData(const PresentationContent &ddsData); // dds -> db
|
||||
static PresentationContent toDdsData(const Database::PrePresentationContent &dbData); // db -> dds
|
||||
|
||||
void onPublishData();
|
||||
|
||||
private:
|
||||
Initialization *m_mainHandler;
|
||||
Presentation m_data;
|
||||
std::vector<PresentationContent> m_content;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user