12#ifndef USMTF_TRANSFORMER_HPP
13#define USMTF_TRANSFORMER_HPP
15#include "usmtf_export.h"
24#include "UtStringUtil.hpp"
39 template<
typename SetType>
41 const std::string& aLogicalConceptName,
42 bool aSkipValidation =
false,
43 bool aIsOptional =
false)
45 static_assert(std::is_base_of<Set, SetType>::value,
"Template argument must be subclass of Set");
57 AddError(aStf +
" Set Type must be registered to create a " + aLogicalConceptName,
59 "To create a " + aLogicalConceptName +
" you must register a Set that handles " + aStf);
61 else if (!set->IsValid())
63 AddError(aStf +
": " + loc.first.GetReconstructedSet() +
" is invalid. See below.",
65 "To create a " + aLogicalConceptName +
" " + aStf +
" must be a valid set.");
74 AddError(aLogicalConceptName +
" requirements are not satisfied", aLogicalConceptName, std::string(err.what()));
80 static const std::string
ReplaceSpaces(
const std::string& aTarget,
char aDesiredChar)
noexcept;
void AddError(const ValidationError &aError) noexcept
Definition ErrorManager.cpp:36
void AddErrors(const std::vector< ValidationError > &aErrors) noexcept
Definition ErrorManager.cpp:53
Definition Exportable.hpp:27
Definition MacroEnabled.hpp:27
Definition Segment.hpp:30
std::pair< const Set &, SetPosition > SetLocation
Definition Segment.hpp:34
Error in accessing a field that isn't present in the set.
Definition USMTF_Exceptions.hpp:52
static USMTF_Factory< Set, std::vector< Field > > * GetFactory()
const V * CastIfRegistered(const T &aEntity) noexcept
Definition USMTF_Factory.hpp:103
Definition Validatable.hpp:24