1#ifndef AAS_CORE_AAS_3_0_VERIFICATION_GUARD_ 
    2#define AAS_CORE_AAS_3_0_VERIFICATION_GUARD_ 
   12#pragma warning(push, 0) 
   48  explicit Error(std::wstring a_cause);
 
 
   77  using iterator_category = std::forward_iterator_tag;
 
   79  using difference_type = std::ptrdiff_t;
 
   80  using value_type = 
Error;
 
   81  using pointer = 
const Error*;
 
   82  using reference = 
const Error&;
 
   86    std::unique_ptr<impl::IVerificator> verificator
 
   88  verificator_(std::move(verificator)) {
 
 
  111  std::unique_ptr<impl::IVerificator> verificator_;
 
 
  122  virtual void Start() = 0;
 
  123  virtual void Next() = 0;
 
  124  virtual bool Done() 
const = 0;
 
  126  virtual const Error& Get() 
const = 0;
 
  127  virtual Error& GetMutable() = 0;
 
  128  virtual long Index() 
const = 0;
 
  130  virtual std::unique_ptr<IVerificator> Clone() 
const = 0;
 
  132  virtual ~IVerificator() = 
default;
 
  169    const std::shared_ptr<types::IClass>& instance
 
  177  const std::shared_ptr<types::IClass>& instance_;
 
 
  205    const std::shared_ptr<types::IClass>& instance
 
  213  const std::shared_ptr<types::IClass>& instance_;
 
 
  220  const std::wstring& text
 
  225  const std::wstring& text
 
  230  const std::wstring& text
 
  241  const std::wstring& text
 
  254  const std::wstring& text
 
  264  const std::wstring& text
 
  272  const std::wstring& text
 
  279  const std::wstring& text
 
  285  typename LangStringT,
 
  286  typename std::enable_if<
 
  287    std::is_base_of<types::IAbstractLangString, LangStringT>::value
 
  292    std::shared_ptr<LangStringT>
 
  298  std::set<std::wstring> language_set;
 
  300  for (
const std::shared_ptr<LangStringT>& lang_string : lang_strings) {
 
  301    const std::wstring& language = lang_string->language();
 
  303    if (language_set.find(language) != language_set.end()) {
 
  306    language_set.insert(language);
 
 
  315    std::shared_ptr<types::IQualifier>
 
  324  const std::wstring& text
 
  332  const std::wstring& text
 
  339  const std::wstring& text
 
  346  const std::wstring& text
 
  353  const std::wstring& text
 
  360  const std::wstring& text
 
  371  const std::wstring& text
 
  378  const std::wstring& text
 
  385  const std::wstring& text
 
  392  const std::wstring& text
 
  399  const std::wstring& text
 
  406  const std::wstring& text
 
  413  const std::wstring& text
 
  420  const std::wstring& text
 
  427  const std::wstring& text
 
  434  const std::wstring& text
 
  441  const std::wstring& text
 
  448  const std::wstring& text
 
  455  const std::wstring& text
 
  462  const std::wstring& text
 
  469  const std::wstring& text
 
  476  const std::wstring& text
 
  483  const std::wstring& text
 
  490  const std::wstring& text
 
  497  const std::wstring& text
 
  504  const std::wstring& text
 
  511  const std::wstring& text
 
  518  const std::wstring& text
 
  525  const std::wstring& text
 
  532  const std::wstring& text
 
  539  const std::wstring& text
 
  546  const std::wstring& text
 
  551  const std::wstring& value,
 
  656  const std::shared_ptr<types::IReference>& reference,
 
  662  const std::shared_ptr<types::IReference>& reference
 
  669  typename std::enable_if<
 
  670    std::is_base_of<types::IReferable, ReferableT>::value
 
  674    std::shared_ptr<ReferableT>
 
  677  std::set<std::wstring> id_short_set;
 
  679  for (
const std::shared_ptr<types::IReferable> referable : referables) {
 
  680    const common::optional<std::wstring>& id_short = referable->id_short();
 
  682    if (id_short.has_value()) {
 
  683      if (id_short_set.find(*id_short) != id_short_set.end()) {
 
  687      id_short_set.insert(*id_short);
 
 
  698  const common::optional<
 
  700      std::shared_ptr<types::IOperationVariable>
 
  703  const common::optional<
 
  705      std::shared_ptr<types::IOperationVariable>
 
  708  const common::optional<
 
  710      std::shared_ptr<types::IOperationVariable>
 
  712  >& inoutput_variables
 
  718    std::shared_ptr<types::IExtension>
 
  725    std::shared_ptr<types::ISubmodelElement>
 
  732  const std::shared_ptr<types::ISubmodelElement>& element,
 
  739    std::shared_ptr<types::ISubmodelElement>
 
  746  const std::shared_ptr<types::IReference>& that,
 
  747  const std::shared_ptr<types::IReference>& other
 
  754    std::shared_ptr<types::IEmbeddedDataSpecification>
 
  755  >& embedded_data_specifications
 
  762    std::shared_ptr<types::IEmbeddedDataSpecification>
 
  763  >& embedded_data_specifications
 
  770    std::shared_ptr<types::IEmbeddedDataSpecification>
 
  771  >& embedded_data_specifications
 
  778    std::shared_ptr<types::IEmbeddedDataSpecification>
 
  779  >& embedded_data_specifications
 
  786    std::shared_ptr<types::IEmbeddedDataSpecification>
 
  787  >& embedded_data_specifications
 
  794    std::shared_ptr<types::IEmbeddedDataSpecification>
 
  795  >& embedded_data_specifications
 
  800  const std::wstring& text
 
  816  const std::wstring& that
 
  828  const std::wstring& that
 
  840  const std::wstring& that
 
  852  const std::wstring& that
 
  864  const std::vector<std::uint8_t>& that
 
  876  const std::wstring& that
 
  888  const std::wstring& that
 
  900  const std::wstring& that
 
  912  const std::wstring& that
 
  924  const std::wstring& that
 
  936  const std::wstring& that
 
  948  const std::wstring& that
 
  960  const std::wstring& that
 
  972  const std::wstring& that
 
  984  const std::wstring& that
 
  996  const std::wstring& that
 
 1008  const std::wstring& that
 
 1020  const std::wstring& that
 
 
Definition verification.hpp:137
virtual ~IVerification()=default
virtual Iterator begin() const =0
virtual const Iterator & end() const =0
Iterate over the verification errors.
Definition verification.hpp:76
Iterator(std::unique_ptr< impl::IVerificator > verificator)
Definition verification.hpp:85
friend bool operator!=(const Iterator &a, const Iterator &b)
Iterator(const Iterator &other)
pointer operator->() const
Iterator & operator=(Iterator &&other)
Iterator & operator=(const Iterator &other)
Iterator(Iterator &&other)
reference operator*() const
friend bool operator==(const Iterator &a, const Iterator &b)
const Iterator & end() const override
NonRecursiveVerification(const std::shared_ptr< types::IClass > &instance)
Iterator begin() const override
~NonRecursiveVerification() override=default
const Iterator & end() const override
Iterator begin() const override
RecursiveVerification(const std::shared_ptr< types::IClass > &instance)
~RecursiveVerification() override=default
AasSubmodelElements
Enumeration of all possible elements of a ISubmodelElementList.
Definition types.hpp:115
DataTypeDefXsd
Enumeration listing all XSD anySimpleTypes.
Definition types.hpp:230
KeyTypes
Enumeration of different key value types within a key.
Definition types.hpp:179
Definition verification.hpp:29
Definition verification.hpp:23
bool IsXsUnsignedShort(const std::wstring &value)
Check that value is a valid xs:unsignedShort.
bool MatchesXsUnsignedShort(const std::wstring &text)
Check that text conforms to the pattern of an xs:unsignedShort.
bool IsXsUnsignedByte(const std::wstring &value)
Check that value is a valid xs:unsignedByte.
std::unique_ptr< IVerification > VerifyBcp47LanguageTag(const std::wstring &that)
Verify that the invariants hold for that value.
std::unique_ptr< IVerification > VerifyValueDataType(const std::wstring &that)
Verify that the invariants hold for that value.
bool MatchesXsShort(const std::wstring &text)
Check that text conforms to the pattern of an xs:short.
bool operator!=(const Iterator &a, const Iterator &b)
bool MatchesXsByte(const std::wstring &text)
Check that text conforms to the pattern of an xs:byte.
bool MatchesXsTime(const std::wstring &text)
Check that text conforms to the pattern of an xs:time.
bool IdShortsOfVariablesAreUnique(const common::optional< std::vector< std::shared_ptr< types::IOperationVariable > > > &input_variables, const common::optional< std::vector< std::shared_ptr< types::IOperationVariable > > > &output_variables, const common::optional< std::vector< std::shared_ptr< types::IOperationVariable > > > &inoutput_variables)
Check that the types::IReferable::id_short's among all the input_variables, output_variables and inou...
std::unique_ptr< IVerification > VerifyIdentifier(const std::wstring &that)
Verify that the invariants hold for that value.
bool MatchesXsGYearMonth(const std::wstring &text)
Check that text conforms to the pattern of an xs:gYearMonth.
std::unique_ptr< IVerification > VerifyNameType(const std::wstring &that)
Verify that the invariants hold for that value.
std::unique_ptr< IVerification > VerifyBlobType(const std::vector< std::uint8_t > &that)
Verify that the invariants hold for that value.
bool MatchesXsGDay(const std::wstring &text)
Check that text conforms to the pattern of an xs:gDay.
bool IsXsLong(const std::wstring &value)
Check that value is a valid xs:long.
bool MatchesRevisionType(const std::wstring &text)
Check that text is a valid revision string.
bool MatchesXsUnsignedLong(const std::wstring &text)
Check that text conforms to the pattern of an xs:unsignedLong.
std::unique_ptr< IVerification > VerifyVersionType(const std::wstring &that)
Verify that the invariants hold for that value.
bool IsXsDate(const std::wstring &text)
Check that value is a valid xs:date.
bool MatchesXsInt(const std::wstring &text)
Check that text conforms to the pattern of an xs:int.
bool MatchesXsDate(const std::wstring &text)
Check that text conforms to the pattern of an xs:date.
bool IsXsByte(const std::wstring &value)
Check that value is a valid xs:byte.
bool IsModelReferenceToReferable(const std::shared_ptr< types::IReference > &reference)
Check that the target of the reference matches a constants::kAasReferables.
bool MatchesXsInteger(const std::wstring &text)
Check that text conforms to the pattern of an xs:integer.
bool QualifierTypesAreUnique(const std::vector< std::shared_ptr< types::IQualifier > > &qualifiers)
Check that types::IQualifier::type's of qualifiers are unique.
bool MatchesXsGMonthDay(const std::wstring &text)
Check that text conforms to the pattern of an xs:gMonthDay.
bool MatchesIdShort(const std::wstring &text)
Check that text is a valid short ID.
bool MatchesXsDateTime(const std::wstring &text)
Check that text conforms to the pattern of an xs:dateTime.
bool MatchesXsNonNegativeInteger(const std::wstring &text)
Check that text conforms to the pattern of an xs:nonNegativeInteger.
std::unique_ptr< IVerification > VerifyRevisionType(const std::wstring &that)
Verify that the invariants hold for that value.
bool MatchesXsDuration(const std::wstring &text)
Check that text conforms to the pattern of an xs:duration.
bool IsXsUnsignedLong(const std::wstring &value)
Check that value is a valid xs:unsignedLong.
std::unique_ptr< IVerification > VerifyContentType(const std::wstring &that)
Verify that the invariants hold for that value.
std::unique_ptr< IVerification > VerifyDuration(const std::wstring &that)
Verify that the invariants hold for that value.
bool MatchesXsDouble(const std::wstring &text)
Check that text conforms to the pattern of an xs:double.
bool MatchesVersionType(const std::wstring &text)
Check that text is a valid version string.
bool IsXsDateTime(const std::wstring &text)
Check that text is a xs:dateTime with time zone set to UTC.
bool IsXsUnsignedInt(const std::wstring &value)
Check that value is a valid xs:unsignedInt.
std::unique_ptr< IVerification > VerifyXmlSerializableString(const std::wstring &that)
Verify that the invariants hold for that value.
std::unique_ptr< IVerification > VerifyLabelType(const std::wstring &that)
Verify that the invariants hold for that value.
bool MatchesXsGYear(const std::wstring &text)
Check that text conforms to the pattern of an xs:gYear.
bool MatchesXsDateTimeUtc(const std::wstring &text)
Check that text conforms to the pattern of an xs:dateTime.
bool DataSpecificationIec61360sForPropertyOrValueHaveAppropriateDataType(const std::vector< std::shared_ptr< types::IEmbeddedDataSpecification > > &embedded_data_specifications)
Check that the types::IDataSpecificationIec61360::data_type is defined appropriately for all data spe...
bool SubmodelElementsHaveIdenticalSemanticIds(const std::vector< std::shared_ptr< types::ISubmodelElement > > &elements)
Check that all semantic IDs are identical, if specified.
std::unique_ptr< IVerification > VerifyNonEmptyXmlSerializableString(const std::wstring &that)
Verify that the invariants hold for that value.
bool ValueConsistentWithXsdType(const std::wstring &value, types::DataTypeDefXsd value_type)
Check that the value conforms to its value_type.
bool MatchesXsAnyUri(const std::wstring &text)
Check that text conforms to the pattern of an xs:anyURI.
bool MatchesXsFloat(const std::wstring &text)
Check that text conforms to the pattern of an xs:float.
bool IsXsDouble(const std::wstring &value)
Check that value is a valid xs:double.
bool IdShortsAreUnique(const std::vector< std::shared_ptr< ReferableT > > &referables)
Check that the types::IReferable::id_short's among the referables are unique.
Definition verification.hpp:672
std::unique_ptr< IVerification > VerifyQualifierType(const std::wstring &that)
Verify that the invariants hold for that value.
bool MatchesRfc8089Path(const std::wstring &text)
Check that text is a path conforming to the pattern of RFC 8089.
bool IsModelReferenceTo(const std::shared_ptr< types::IReference > &reference, types::KeyTypes expected_type)
Check that the target of the model reference matches the expected_type.
std::unique_ptr< IVerification > VerifyValueTypeIec61360(const std::wstring &that)
Verify that the invariants hold for that value.
std::unique_ptr< IVerification > VerifyDateTimeUtc(const std::wstring &that)
Verify that the invariants hold for that value.
bool MatchesMimeType(const std::wstring &text)
Check that text conforms to the pattern of MIME type.
bool MatchesXsString(const std::wstring &text)
Check that text conforms to the pattern of an xs:string.
std::unique_ptr< IVerification > VerifyPathType(const std::wstring &that)
Verify that the invariants hold for that value.
bool MatchesXsBase64Binary(const std::wstring &text)
Check that text conforms to the pattern of an xs:base64Binary.
bool DataSpecificationIec61360sHaveValue(const std::vector< std::shared_ptr< types::IEmbeddedDataSpecification > > &embedded_data_specifications)
Check that the types::IDataSpecificationIec61360::value is defined for all data specifications whose ...
bool MatchesXsLong(const std::wstring &text)
Check that text conforms to the pattern of an xs:long.
bool MatchesXsPositiveInteger(const std::wstring &text)
Check that text conforms to the pattern of an xs:positiveInteger.
bool IsBcp47ForEnglish(const std::wstring &text)
Check that the text corresponds to a BCP47 code for english.
bool MatchesXsUnsignedByte(const std::wstring &text)
Check that text conforms to the pattern of an xs:unsignedByte.
bool DataSpecificationIec61360sForReferenceHaveAppropriateDataType(const std::vector< std::shared_ptr< types::IEmbeddedDataSpecification > > &embedded_data_specifications)
Check that the types::IDataSpecificationIec61360::data_type is defined appropriately for all data spe...
bool MatchesXmlSerializableString(const std::wstring &text)
Check that text conforms to the pattern of the Constraint AASd-130.
bool DataSpecificationIec61360sHaveDataType(const std::vector< std::shared_ptr< types::IEmbeddedDataSpecification > > &embedded_data_specifications)
Check that the types::IDataSpecificationIec61360::data_type is defined for all data specifications wh...
bool ExtensionNamesAreUnique(const std::vector< std::shared_ptr< types::IExtension > > &extensions)
Check that the extension names are unique.
bool PropertiesOrRangesHaveValueType(const std::vector< std::shared_ptr< types::ISubmodelElement > > &elements, types::DataTypeDefXsd value_type)
Check that all the elements have the value_type.
bool DataSpecificationIec61360sForDocumentHaveAppropriateDataType(const std::vector< std::shared_ptr< types::IEmbeddedDataSpecification > > &embedded_data_specifications)
Check that the types::IDataSpecificationIec61360::data_type is defined appropriately for all data spe...
std::unique_ptr< IVerification > VerifyMessageTopicType(const std::wstring &that)
Verify that the invariants hold for that value.
bool LangStringsHaveUniqueLanguages(const std::vector< std::shared_ptr< LangStringT > > &lang_strings)
Check that the lang_strings do not have overlapping types::IAbstractLangString::language's.
Definition verification.hpp:290
bool MatchesXsBoolean(const std::wstring &text)
Check that text conforms to the pattern of an xs:boolean.
bool IsXsDateTimeUtc(const std::wstring &text)
Check that text is a xs:dateTime with time zone set to UTC.
bool MatchesBcp47(const std::wstring &text)
Check that text is a valid BCP 47 language tag.
bool IsXsShort(const std::wstring &value)
Check that value is a valid xs:short.
bool IsXsInt(const std::wstring &value)
Check that value is a valid xs:int.
bool MatchesXsDecimal(const std::wstring &text)
Check that text conforms to the pattern of an xs:decimal.
bool MatchesXsNonPositiveInteger(const std::wstring &text)
Check that text conforms to the pattern of an xs:nonPositiveInteger.
bool MatchesXsHexBinary(const std::wstring &text)
Check that text conforms to the pattern of an xs:hexBinary.
bool MatchesXsGMonth(const std::wstring &text)
Check that text conforms to the pattern of an xs:gMonth.
bool DataSpecificationIec61360sHaveDefinitionAtLeastInEnglish(const std::vector< std::shared_ptr< types::IEmbeddedDataSpecification > > &embedded_data_specifications)
Check that the types::IDataSpecificationIec61360::definition is defined for all data specifications w...
bool MatchesXsUnsignedInt(const std::wstring &text)
Check that text conforms to the pattern of an xs:unsignedInt.
bool operator==(const Iterator &a, const Iterator &b)
bool SubmodelElementIsOfType(const std::shared_ptr< types::ISubmodelElement > &element, types::AasSubmodelElements element_type)
Check that the run-time type of the element coincides with element_type.
bool ReferenceKeyValuesEqual(const std::shared_ptr< types::IReference > &that, const std::shared_ptr< types::IReference > &other)
Check that the two references are equal by comparing their key values.
bool MatchesXsNegativeInteger(const std::wstring &text)
Check that text conforms to the pattern of an xs:negativeInteger.
bool IsXsGMonthDay(const std::wstring &value)
Check that value is a valid xs:gMonthDay.
bool IsXsFloat(const std::wstring &value)
Check that value is a valid xs:float.
std::unique_ptr< IVerification > VerifyIdShortType(const std::wstring &that)
Verify that the invariants hold for that value.
Represent a path to some value.
Definition iteration.hpp:181
Definition verification.hpp:37
iteration::Path path
Definition verification.hpp:46
Error(std::wstring a_cause, iteration::Path a_path)
std::wstring cause
Definition verification.hpp:41
Error(std::wstring a_cause)