41 lines
969 B
C++
Executable File
41 lines
969 B
C++
Executable File
/**
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hannes Baeuerle, SLSE, 2016-05-23
|
|
*/
|
|
#pragma once
|
|
|
|
#include <QtCore/QString>
|
|
#include <ParticipantManagement/ppm_db.h>
|
|
#include <ParticipantManagement/ppm.hpp>
|
|
|
|
namespace ParticipantManagement
|
|
{
|
|
namespace TemplateHandling
|
|
{
|
|
class Template
|
|
{
|
|
public:
|
|
explicit Template(const Database::PpmTemplate &tmpl)
|
|
: m_data(tmpl)
|
|
{}
|
|
|
|
int32_t id() const { return m_data.id; }
|
|
int32_t typeId() const { return m_data.typeId; }
|
|
int32_t superiorId() const { return m_data.superiorId; }
|
|
TemplateParticipant toDdsTemplateParticipant() const;
|
|
|
|
bool hasToBeChanged(const TemplateData &newData);
|
|
bool hasNewSuperiorId(int32_t superiorId);
|
|
bool hasNewInferiorStructure(std::vector<int32_t> inferiorIds);
|
|
|
|
Database::PpmTemplate dbEntry() const;
|
|
|
|
private:
|
|
Database::PpmTemplate m_data;
|
|
std::vector<int32_t> m_inferiorIds;
|
|
}; // class Template
|
|
} //namespace TemplateHandling
|
|
} //namespace ParticipantManagement
|