Apply clang-format to Lts/Common and DTC/enum headers
- Formatted all CodeGen module files (9 files) - Formatted LtsAppDescriptor module files - Formatted LtsAppManager/AppChooser files - Applied clang-format to all DTC and enum headers across modules - Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/) Cosmetic changes only, no functional modifications. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
848 files changed
+89305
-100020
No files matched your search
Executable → Regular
+27
-34
@@ -1,47 +1,40 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
|
||||
#include "reply_message.h"
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include <memory>
|
||||
|
||||
namespace LtsWebSocket
|
||||
{
|
||||
|
||||
|
||||
template<typename T>
|
||||
class DataManagerBaseDl
|
||||
template <typename T> class DataManagerBaseDl
|
||||
{
|
||||
protected:
|
||||
|
||||
|
||||
explicit DataManagerBaseDl(const std::shared_ptr<T> &dbInterface, NGL::INGLLogger &logger)
|
||||
: m_logger(logger)
|
||||
, m_dbInterface(dbInterface)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
template<typename DbType, typename MessageType>
|
||||
ReplyMessage *toBaseDataMessageFromDb(const QString &uuid) const
|
||||
{
|
||||
QVector<DbType> dataVec;
|
||||
|
||||
if (!m_dbInterface->select(dataVec))
|
||||
protected:
|
||||
explicit DataManagerBaseDl(const std::shared_ptr<T>& dbInterface, NGL::INGLLogger& logger)
|
||||
: m_logger(logger), m_dbInterface(dbInterface)
|
||||
{
|
||||
const QString errorMessage = QStringLiteral("Error reading data from database!");
|
||||
ERROR_LOG(m_logger) << errorMessage;
|
||||
ErrorMessage::ErrorData errData;
|
||||
errData.errorMessage = errorMessage;
|
||||
errData.uuid = uuid;
|
||||
return new ErrorMessage(errData);
|
||||
}
|
||||
|
||||
return new MessageType (m_dbInterface->template toJson<DbType>(dataVec), uuid);
|
||||
}
|
||||
template <typename DbType, typename MessageType> ReplyMessage* toBaseDataMessageFromDb(const QString& uuid) const
|
||||
{
|
||||
QVector<DbType> dataVec;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<T> m_dbInterface;
|
||||
};
|
||||
}
|
||||
if (!m_dbInterface->select(dataVec))
|
||||
{
|
||||
const QString errorMessage = QStringLiteral("Error reading data from database!");
|
||||
ERROR_LOG(m_logger) << errorMessage;
|
||||
ErrorMessage::ErrorData errData;
|
||||
errData.errorMessage = errorMessage;
|
||||
errData.uuid = uuid;
|
||||
return new ErrorMessage(errData);
|
||||
}
|
||||
|
||||
return new MessageType(m_dbInterface->template toJson<DbType>(dataVec), uuid);
|
||||
}
|
||||
|
||||
protected:
|
||||
std::shared_ptr<T> m_dbInterface;
|
||||
};
|
||||
} // namespace LtsWebSocket
|
||||
Reference in new issue
Block a user