aas-core3 1.0.0
Manipulate, verify and de/serialize asset administration shells in C++.
Loading...
Searching...
No Matches
Translate to strings, and, where applicable, from strings.

Namespaces

namespace  aas_core::aas_3_0::stringification
 

Functions

common::optional< types::ModelTypeaas_core::aas_3_0::stringification::ModelTypeFromString (const std::string &text)
 
types::ModelType aas_core::aas_3_0::stringification::MustModelTypeFromString (const std::string &text)
 
std::string aas_core::aas_3_0::stringification::to_string (types::ModelType model_type)
 
common::optional< types::ModellingKindaas_core::aas_3_0::stringification::ModellingKindFromString (const std::string &text)
 
types::ModellingKind aas_core::aas_3_0::stringification::MustModellingKindFromString (const std::string &text)
 
std::string aas_core::aas_3_0::stringification::to_string (types::ModellingKind literal)
 
common::optional< types::QualifierKindaas_core::aas_3_0::stringification::QualifierKindFromString (const std::string &text)
 
types::QualifierKind aas_core::aas_3_0::stringification::MustQualifierKindFromString (const std::string &text)
 
std::string aas_core::aas_3_0::stringification::to_string (types::QualifierKind literal)
 
common::optional< types::AssetKindaas_core::aas_3_0::stringification::AssetKindFromString (const std::string &text)
 
types::AssetKind aas_core::aas_3_0::stringification::MustAssetKindFromString (const std::string &text)
 
std::string aas_core::aas_3_0::stringification::to_string (types::AssetKind literal)
 
common::optional< types::AasSubmodelElementsaas_core::aas_3_0::stringification::AasSubmodelElementsFromString (const std::string &text)
 
types::AasSubmodelElements aas_core::aas_3_0::stringification::MustAasSubmodelElementsFromString (const std::string &text)
 
std::string aas_core::aas_3_0::stringification::to_string (types::AasSubmodelElements literal)
 
common::optional< types::EntityTypeaas_core::aas_3_0::stringification::EntityTypeFromString (const std::string &text)
 
types::EntityType aas_core::aas_3_0::stringification::MustEntityTypeFromString (const std::string &text)
 
std::string aas_core::aas_3_0::stringification::to_string (types::EntityType literal)
 
common::optional< types::Directionaas_core::aas_3_0::stringification::DirectionFromString (const std::string &text)
 
types::Direction aas_core::aas_3_0::stringification::MustDirectionFromString (const std::string &text)
 
std::string aas_core::aas_3_0::stringification::to_string (types::Direction literal)
 
common::optional< types::StateOfEventaas_core::aas_3_0::stringification::StateOfEventFromString (const std::string &text)
 
types::StateOfEvent aas_core::aas_3_0::stringification::MustStateOfEventFromString (const std::string &text)
 
std::string aas_core::aas_3_0::stringification::to_string (types::StateOfEvent literal)
 
common::optional< types::ReferenceTypesaas_core::aas_3_0::stringification::ReferenceTypesFromString (const std::string &text)
 
types::ReferenceTypes aas_core::aas_3_0::stringification::MustReferenceTypesFromString (const std::string &text)
 
std::string aas_core::aas_3_0::stringification::to_string (types::ReferenceTypes literal)
 
common::optional< types::KeyTypesaas_core::aas_3_0::stringification::KeyTypesFromString (const std::string &text)
 
types::KeyTypes aas_core::aas_3_0::stringification::MustKeyTypesFromString (const std::string &text)
 
std::string aas_core::aas_3_0::stringification::to_string (types::KeyTypes literal)
 
common::optional< types::DataTypeDefXsdaas_core::aas_3_0::stringification::DataTypeDefXsdFromString (const std::string &text)
 
types::DataTypeDefXsd aas_core::aas_3_0::stringification::MustDataTypeDefXsdFromString (const std::string &text)
 
std::string aas_core::aas_3_0::stringification::to_string (types::DataTypeDefXsd literal)
 
common::optional< types::DataTypeIec61360aas_core::aas_3_0::stringification::DataTypeIec61360FromString (const std::string &text)
 
types::DataTypeIec61360 aas_core::aas_3_0::stringification::MustDataTypeIec61360FromString (const std::string &text)
 
std::string aas_core::aas_3_0::stringification::to_string (types::DataTypeIec61360 literal)
 
std::string aas_core::aas_3_0::stringification::Base64Encode (const std::vector< std::uint8_t > &bytes)
 
common::expected< std::vector< std::uint8_t >, std::string > aas_core::aas_3_0::stringification::Base64Decode (const std::string &text)
 

Detailed Description

Function Documentation

◆ AasSubmodelElementsFromString()

common::optional< types::AasSubmodelElements > aas_core::aas_3_0::stringification::AasSubmodelElementsFromString ( const std::string & text)

Try to parse the text as a literal of types::AasSubmodelElements.

Parameters
textto be parsed
Returns
literal, or nothing, if text invalid

◆ AssetKindFromString()

common::optional< types::AssetKind > aas_core::aas_3_0::stringification::AssetKindFromString ( const std::string & text)

Try to parse the text as a literal of types::AssetKind.

Parameters
textto be parsed
Returns
literal, or nothing, if text invalid

◆ Base64Decode()

common::expected< std::vector< std::uint8_t >, std::string > aas_core::aas_3_0::stringification::Base64Decode ( const std::string & text)

Decode the the text with base64 to bytes.

Remarks
We intentionally decode from std::string and not from std::wstring as the de/serialization libraries currently work only with UTF-8 encoded strings.
Parameters
textto be decoded
Returns
decoded bytes, or error message, if any.

◆ Base64Encode()

std::string aas_core::aas_3_0::stringification::Base64Encode ( const std::vector< std::uint8_t > & bytes)

Encode the bytes with base64 to a std::string.

Parameters
bytesto be encoded
Returns
base64-encoding of bytes

◆ DataTypeDefXsdFromString()

common::optional< types::DataTypeDefXsd > aas_core::aas_3_0::stringification::DataTypeDefXsdFromString ( const std::string & text)

Try to parse the text as a literal of types::DataTypeDefXsd.

Parameters
textto be parsed
Returns
literal, or nothing, if text invalid

◆ DataTypeIec61360FromString()

common::optional< types::DataTypeIec61360 > aas_core::aas_3_0::stringification::DataTypeIec61360FromString ( const std::string & text)

Try to parse the text as a literal of types::DataTypeIec61360.

Parameters
textto be parsed
Returns
literal, or nothing, if text invalid

◆ DirectionFromString()

common::optional< types::Direction > aas_core::aas_3_0::stringification::DirectionFromString ( const std::string & text)

Try to parse the text as a literal of types::Direction.

Parameters
textto be parsed
Returns
literal, or nothing, if text invalid

◆ EntityTypeFromString()

common::optional< types::EntityType > aas_core::aas_3_0::stringification::EntityTypeFromString ( const std::string & text)

Try to parse the text as a literal of types::EntityType.

Parameters
textto be parsed
Returns
literal, or nothing, if text invalid

◆ KeyTypesFromString()

common::optional< types::KeyTypes > aas_core::aas_3_0::stringification::KeyTypesFromString ( const std::string & text)

Try to parse the text as a literal of types::KeyTypes.

Parameters
textto be parsed
Returns
literal, or nothing, if text invalid

◆ ModellingKindFromString()

common::optional< types::ModellingKind > aas_core::aas_3_0::stringification::ModellingKindFromString ( const std::string & text)

Try to parse the text as a literal of types::ModellingKind.

Parameters
textto be parsed
Returns
literal, or nothing, if text invalid

◆ ModelTypeFromString()

common::optional< types::ModelType > aas_core::aas_3_0::stringification::ModelTypeFromString ( const std::string & text)

Try to parse the text as a model type literal.

Parameters
textto be parsed
Returns
literal, or nothing, if text invalid

◆ MustAasSubmodelElementsFromString()

types::AasSubmodelElements aas_core::aas_3_0::stringification::MustAasSubmodelElementsFromString ( const std::string & text)

Parse the text as a literal of types::AasSubmodelElements.

Parameters
textto be parsed
Returns
literal
Exceptions
std::invalid_argumentif text invalid

◆ MustAssetKindFromString()

types::AssetKind aas_core::aas_3_0::stringification::MustAssetKindFromString ( const std::string & text)

Parse the text as a literal of types::AssetKind.

Parameters
textto be parsed
Returns
literal
Exceptions
std::invalid_argumentif text invalid

◆ MustDataTypeDefXsdFromString()

types::DataTypeDefXsd aas_core::aas_3_0::stringification::MustDataTypeDefXsdFromString ( const std::string & text)

Parse the text as a literal of types::DataTypeDefXsd.

Parameters
textto be parsed
Returns
literal
Exceptions
std::invalid_argumentif text invalid

◆ MustDataTypeIec61360FromString()

types::DataTypeIec61360 aas_core::aas_3_0::stringification::MustDataTypeIec61360FromString ( const std::string & text)

Parse the text as a literal of types::DataTypeIec61360.

Parameters
textto be parsed
Returns
literal
Exceptions
std::invalid_argumentif text invalid

◆ MustDirectionFromString()

types::Direction aas_core::aas_3_0::stringification::MustDirectionFromString ( const std::string & text)

Parse the text as a literal of types::Direction.

Parameters
textto be parsed
Returns
literal
Exceptions
std::invalid_argumentif text invalid

◆ MustEntityTypeFromString()

types::EntityType aas_core::aas_3_0::stringification::MustEntityTypeFromString ( const std::string & text)

Parse the text as a literal of types::EntityType.

Parameters
textto be parsed
Returns
literal
Exceptions
std::invalid_argumentif text invalid

◆ MustKeyTypesFromString()

types::KeyTypes aas_core::aas_3_0::stringification::MustKeyTypesFromString ( const std::string & text)

Parse the text as a literal of types::KeyTypes.

Parameters
textto be parsed
Returns
literal
Exceptions
std::invalid_argumentif text invalid

◆ MustModellingKindFromString()

types::ModellingKind aas_core::aas_3_0::stringification::MustModellingKindFromString ( const std::string & text)

Parse the text as a literal of types::ModellingKind.

Parameters
textto be parsed
Returns
literal
Exceptions
std::invalid_argumentif text invalid

◆ MustModelTypeFromString()

types::ModelType aas_core::aas_3_0::stringification::MustModelTypeFromString ( const std::string & text)

Parse the text as a model type literal.

Parameters
textto be parsed
Returns
literal
Exceptions
std::invalid_argumentif text invalid

◆ MustQualifierKindFromString()

types::QualifierKind aas_core::aas_3_0::stringification::MustQualifierKindFromString ( const std::string & text)

Parse the text as a literal of types::QualifierKind.

Parameters
textto be parsed
Returns
literal
Exceptions
std::invalid_argumentif text invalid

◆ MustReferenceTypesFromString()

types::ReferenceTypes aas_core::aas_3_0::stringification::MustReferenceTypesFromString ( const std::string & text)

Parse the text as a literal of types::ReferenceTypes.

Parameters
textto be parsed
Returns
literal
Exceptions
std::invalid_argumentif text invalid

◆ MustStateOfEventFromString()

types::StateOfEvent aas_core::aas_3_0::stringification::MustStateOfEventFromString ( const std::string & text)

Parse the text as a literal of types::StateOfEvent.

Parameters
textto be parsed
Returns
literal
Exceptions
std::invalid_argumentif text invalid

◆ QualifierKindFromString()

common::optional< types::QualifierKind > aas_core::aas_3_0::stringification::QualifierKindFromString ( const std::string & text)

Try to parse the text as a literal of types::QualifierKind.

Parameters
textto be parsed
Returns
literal, or nothing, if text invalid

◆ ReferenceTypesFromString()

common::optional< types::ReferenceTypes > aas_core::aas_3_0::stringification::ReferenceTypesFromString ( const std::string & text)

Try to parse the text as a literal of types::ReferenceTypes.

Parameters
textto be parsed
Returns
literal, or nothing, if text invalid

◆ StateOfEventFromString()

common::optional< types::StateOfEvent > aas_core::aas_3_0::stringification::StateOfEventFromString ( const std::string & text)

Try to parse the text as a literal of types::StateOfEvent.

Parameters
textto be parsed
Returns
literal, or nothing, if text invalid

◆ to_string() [1/12]

std::string aas_core::aas_3_0::stringification::to_string ( types::AasSubmodelElements literal)

Translate the enumeration literal literal of types::AasSubmodelElements to text.

Parameters
literalto be converted into text
Returns
text representation of literal
Exceptions
std::invalid_argumentif literal invalid

◆ to_string() [2/12]

std::string aas_core::aas_3_0::stringification::to_string ( types::AssetKind literal)

Translate the enumeration literal literal of types::AssetKind to text.

Parameters
literalto be converted into text
Returns
text representation of literal
Exceptions
std::invalid_argumentif literal invalid

◆ to_string() [3/12]

std::string aas_core::aas_3_0::stringification::to_string ( types::DataTypeDefXsd literal)

Translate the enumeration literal literal of types::DataTypeDefXsd to text.

Parameters
literalto be converted into text
Returns
text representation of literal
Exceptions
std::invalid_argumentif literal invalid

◆ to_string() [4/12]

std::string aas_core::aas_3_0::stringification::to_string ( types::DataTypeIec61360 literal)

Translate the enumeration literal literal of types::DataTypeIec61360 to text.

Parameters
literalto be converted into text
Returns
text representation of literal
Exceptions
std::invalid_argumentif literal invalid

◆ to_string() [5/12]

std::string aas_core::aas_3_0::stringification::to_string ( types::Direction literal)

Translate the enumeration literal literal of types::Direction to text.

Parameters
literalto be converted into text
Returns
text representation of literal
Exceptions
std::invalid_argumentif literal invalid

◆ to_string() [6/12]

std::string aas_core::aas_3_0::stringification::to_string ( types::EntityType literal)

Translate the enumeration literal literal of types::EntityType to text.

Parameters
literalto be converted into text
Returns
text representation of literal
Exceptions
std::invalid_argumentif literal invalid

◆ to_string() [7/12]

std::string aas_core::aas_3_0::stringification::to_string ( types::KeyTypes literal)

Translate the enumeration literal literal of types::KeyTypes to text.

Parameters
literalto be converted into text
Returns
text representation of literal
Exceptions
std::invalid_argumentif literal invalid

◆ to_string() [8/12]

std::string aas_core::aas_3_0::stringification::to_string ( types::ModellingKind literal)

Translate the enumeration literal literal of types::ModellingKind to text.

Parameters
literalto be converted into text
Returns
text representation of literal
Exceptions
std::invalid_argumentif literal invalid

◆ to_string() [9/12]

std::string aas_core::aas_3_0::stringification::to_string ( types::ModelType model_type)

Translate the enumeration literal model_type to text.

Parameters
model_typeto be converted into text
Returns
text representation of model_type
Exceptions
std::invalid_argumentif model_type invalid

◆ to_string() [10/12]

std::string aas_core::aas_3_0::stringification::to_string ( types::QualifierKind literal)

Translate the enumeration literal literal of types::QualifierKind to text.

Parameters
literalto be converted into text
Returns
text representation of literal
Exceptions
std::invalid_argumentif literal invalid

◆ to_string() [11/12]

std::string aas_core::aas_3_0::stringification::to_string ( types::ReferenceTypes literal)

Translate the enumeration literal literal of types::ReferenceTypes to text.

Parameters
literalto be converted into text
Returns
text representation of literal
Exceptions
std::invalid_argumentif literal invalid

◆ to_string() [12/12]

std::string aas_core::aas_3_0::stringification::to_string ( types::StateOfEvent literal)

Translate the enumeration literal literal of types::StateOfEvent to text.

Parameters
literalto be converted into text
Returns
text representation of literal
Exceptions
std::invalid_argumentif literal invalid