68 lines
1.5 KiB
C++
Executable File
68 lines
1.5 KiB
C++
Executable File
/**
|
|
* Exercise object
|
|
* $Id$
|
|
* $HeadURL$
|
|
* Philipp Last
|
|
*/
|
|
#pragma once
|
|
|
|
#include "dds_handler.h"
|
|
#include "logger.h"
|
|
|
|
#include <DDS/Core/function_reply_object.h>
|
|
|
|
// Generated
|
|
#include <Evaluations/evl_db.h>
|
|
|
|
|
|
namespace Evaluations
|
|
{
|
|
class ObjectComment final
|
|
{
|
|
public:
|
|
ObjectComment(const std::shared_ptr<DdsHandler> &ddsHandler,
|
|
const std::shared_ptr<DatabaseInterface> &db);
|
|
~ObjectComment() = default;
|
|
|
|
Core::FunctionReplyObject createObject(const Database::EvlComment &data);
|
|
Core::FunctionReplyObject updateObject(const Database::EvlComment &data);
|
|
Core::FunctionReplyObject removeObject();
|
|
|
|
int getId() const { return m_data.id; }
|
|
|
|
protected:
|
|
void onPublishData();
|
|
|
|
private:
|
|
std::shared_ptr<DdsHandler> m_ddsHandler;
|
|
std::shared_ptr<DatabaseInterface> m_db;
|
|
Database::EvlComment m_data;
|
|
|
|
NGL::INGLLogger &m_logger;
|
|
};
|
|
|
|
class ObjectSchema final
|
|
{
|
|
public:
|
|
ObjectSchema(const std::shared_ptr<DdsHandler> &ddsHandler,
|
|
const std::shared_ptr<DatabaseInterface> &db);
|
|
~ObjectSchema() = default;
|
|
|
|
Core::FunctionReplyObject createObject(const Database::EvlSchema &data);
|
|
Core::FunctionReplyObject updateObject(const Database::EvlSchema &data);
|
|
Core::FunctionReplyObject removeObject();
|
|
|
|
int getId() const { return m_data.id; }
|
|
|
|
protected:
|
|
void onPublishData();
|
|
|
|
private:
|
|
std::shared_ptr<DdsHandler> m_ddsHandler;
|
|
std::shared_ptr<DatabaseInterface> m_db;
|
|
Database::EvlSchema m_data;
|
|
|
|
NGL::INGLLogger &m_logger;
|
|
};
|
|
}
|