ADTF
ddl::utility Namespace Reference

definition of the utility namespace More...

Classes

class  TypeAccessList
 Bug fix class for ddl::dd::utility::TypeAccessList to get rid of providing getNamedItemList in validator. More...
 
class  TypeAccessVector
 Utility class for observable named items where the order is important. More...
 
struct  VersionRequirement
 VersionRequirement to report a Version requirement. More...
 

Typedefs

template<typename T >
using TypeAccessListSubject = ModelSubjectUtility< T, TypeAccessListEventCode >
 helper template to observe list content. More...
 
template<typename T >
using TypeAccessListObserver = ModelObserverUtility< T, TypeAccessListEventCode >
 helper template to observe list content. More...
 
using OptionalSize = Optional< size_t >
 optional size definition.
 
template<typename T >
using TypeAccessVectorSubject = ModelSubjectUtility< T, TypeAccessVectorEventCode >
 helper template to observe vector content. More...
 
template<typename T >
using TypeAccessVectorObserver = ModelObserverUtility< T, TypeAccessVectorEventCode >
 helper template to observe vector content. More...
 
using Error = ::ddl::dd::Error
 Exception helper class to collect information while parsing, adding DD Objects or other failed operatons. More...
 
using Problem = ::ddl::dd::Problem
 Problem to report to find the corresponding item name in a simple way. More...
 

Enumerations

enum  TypeAccessVectorEventCode {
  vector_item_added , vector_item_removed , vector_item_changed , vector_item_renamed ,
  vector_subitem_added , vector_subitem_removed , vector_subitem_changed , vector_item_popped ,
  vector_subitem_popped , vector_item_inserted , vector_subitem_inserted , vector_subitem_renamed ,
  vector_item_removing , vector_subitem_removing , vector_item_renaming , vector_subitem_renaming
}
 Internal event code to inform the parent DD Object about the change of an item within the list. More...
 

Functions

Optional< int > toType (const std::string &from_string, const Optional< int > &default_value={})
 specialized conversion to the Optional<int> More...
 
Optional< size_t > toType (const std::string &from_string, const utility::Optional< size_t > &default_value={})
 specialized conversion to the Optional<size_t> More...
 
Optional< std::string > toType (const std::string &from_string, const utility::Optional< std::string > &default_value={})
 specialized function to convert a string to an optional string which is only valid if set. More...
 
void replaceInString (std::string &string_data, const std::string &to_replace, const std::string &replace_with)
 In place replacement helper function. More...
 

Detailed Description

definition of the utility namespace

Typedef Documentation

◆ Error

using Error = ::ddl::dd::Error

Exception helper class to collect information while parsing, adding DD Objects or other failed operatons.

Definition at line 110 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/ddl/utilities/ddl_error.h.

◆ Problem

Problem to report to find the corresponding item name in a simple way.

Definition at line 68 of file problem.h.

◆ TypeAccessListObserver

using TypeAccessListObserver = ModelObserverUtility<T, TypeAccessListEventCode>

helper template to observe list content.

Remarks
for internal use only.
Template Parameters
Tthe subject class to observe

Definition at line 847 of file access_list.h.

◆ TypeAccessListSubject

using TypeAccessListSubject = ModelSubjectUtility<T, TypeAccessListEventCode>

helper template to observe list content.

Remarks
for internal use only.
Template Parameters
Tthe subject class to observe

Definition at line 838 of file access_list.h.

◆ TypeAccessVectorObserver

helper template to observe vector content.

Remarks
for internal use only.
Template Parameters
Tthe subject class to observe

Definition at line 74 of file access_vector.h.

◆ TypeAccessVectorSubject

helper template to observe vector content.

Remarks
for internal use only.
Template Parameters
Tthe subject class to observe

Definition at line 65 of file access_vector.h.

Enumeration Type Documentation

◆ TypeAccessVectorEventCode

Internal event code to inform the parent DD Object about the change of an item within the list.

Remarks
for internal use only. The user API will use ddl::dd::datamodel::ModelEventCode only.

Definition at line 39 of file access_vector.h.

Function Documentation

◆ replaceInString()

void ddl::utility::replaceInString ( std::string &  string_data,
const std::string &  to_replace,
const std::string &  replace_with 
)

In place replacement helper function.

Parameters
string_datathe string data to replace in
to_replacethe string to replace
replace_withthe string to replace with

Referenced by MappingConfigurationFromXMLFactoryBase< DomNodeType >::setDataOrSubNodesAsProperty().

◆ toType() [1/3]

Optional<int> ddl::utility::toType ( const std::string &  from_string,
const Optional< int > &  default_value = {} 
)

specialized conversion to the Optional<int>

Parameters
from_stringstring representation of the value
default_valuethe optional value to set if not set in from_string
Returns
utility::Optional<int>

◆ toType() [2/3]

Optional<size_t> ddl::utility::toType ( const std::string &  from_string,
const utility::Optional< size_t > &  default_value = {} 
)

specialized conversion to the Optional<size_t>

Parameters
from_stringstring representation of the value
default_valuethe optional value to set if not set in from_string
Returns
utility::Optional<size_t>

◆ toType() [3/3]

Optional<std::string> ddl::utility::toType ( const std::string &  from_string,
const utility::Optional< std::string > &  default_value = {} 
)

specialized function to convert a string to an optional string which is only valid if set.

Parameters
from_stringthe string to convert from
default_valuethe optional value to set if from_string is empty
Returns
utility::Optional<std::string>