ADTF
Loading...
Searching...
No Matches
ddl::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS > Class Template Reference

Bug fix class for ddl::dd::utility::TypeAccessList to get rid of providing getNamedItemList in validator. More...

#include <access_list.h>

Inherits ddl::dd::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, ::ddl::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS > >.

Public Types

using base_type
 base type definition
 
- Public Types inherited from ddl::dd::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, ::ddl::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS > >
typedef DDL_TYPE_TO_ACCESS access_type
 local definition of the access type
 
typedef std::shared_ptr< DDL_TYPE_TO_ACCESS > value_type
 local definition of the value type
 
typedef std::vector< value_typecontainer_type
 local definition of the container type
 
typedef std::unordered_map< std::string_view, value_typecontainer_named_type
 local definition of the container type for getNamedItemViewList
 
typedef container_type::iterator iterator
 local definition of the container iterator
 
typedef container_type::const_iterator const_iterator
 local definition of the container const_iterator
 
typedef TypeAccessListObserver< DDL_TYPE_TO_ACCESS > parent_type
 local definition of the parent type to register observer
 
typedef TypeAccessListSubject< DDL_TYPE_TO_ACCESS > map_subject_type
 local definition of the internal subject type
 
typedef map_subject_type::observer_type observer_type
 local definition of the observer type
 
typedef parent_type::event_code_type event_code_type
 local definition of the eventcode type
 
typedef parent_type::subject_type subject_type
 local definition of the subject type
 
- Public Types inherited from ddl::dd::utility::ModelObserverUtility< T, TypeAccessListEventCode >
typedef TypeAccessListEventCode event_code_type
 local definition of the event code type
 
typedef T subject_type
 local definition of the subject code type
 
typedef TypeAccessListEventCode event_code_type
 local definition of the event code type
 
typedef T subject_type
 local definition of the subject code type
 
typedef TypeAccessListEventCode event_code_type
 local definition of the event code type
 
typedef T subject_type
 local definition of the subject code type
 
typedef TypeAccessListEventCode event_code_type
 local definition of the event code type
 
typedef T subject_type
 local definition of the subject code type
 

Public Member Functions

 TypeAccessList ()=delete
 no default CTOR!
 
 TypeAccessList (TYPE_VALIDATOR_CLASS *validator, const std::string &validation_info)
 CTOR.
 
virtual ~TypeAccessList ()
 DTOR.
 
 TypeAccessList (TypeAccessList &&other)=default
 move CTOR
 
TypeAccessListoperator= (TypeAccessList &&other)=default
 move assignment operator
 
 TypeAccessList (const TypeAccessList &other)
 copies (deepcopy!) CTOR
 
TypeAccessListoperator= (const TypeAccessList &other)
 copies (deepcopy!) and overwrite the current content.
 
- Public Member Functions inherited from ddl::dd::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, ::ddl::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS > >
 TypeAccessList ()=delete
 no default CTOR!
 
 TypeAccessList (TYPE_VALIDATOR_CLASS *validator, const std::string &validation_info)
 CTOR.
 
 TypeAccessList (TypeAccessList &&other)
 move CTOR
 
TypeAccessListoperator= (TypeAccessList &&other)
 move assignment operator
 
 TypeAccessList (const TypeAccessList &other)
 copies (deepcopy!) CTOR
 
TypeAccessListoperator= (const TypeAccessList &other)
 copies (deepcopy!) and overwrite the current content.
 
std::shared_ptr< const DDL_TYPE_TO_ACCESS > get (std::string_view type_name) const
 get the item with the given name type_name
 
Optional< size_t > getPosOf (const std::string &type_name) const
 Get the Pos Of the item with the name type_name.
 
bool contains (const std::string &type_name) const
 determines is the type name exists in this list
 
bool contains (const DDL_TYPE_TO_ACCESS &type_to_find) const
 determines if the item is in this list.
 
bool contains (const TypeAccessList &other) const
 determines if the other is a subset of this list
 
std::shared_ptr< DDL_TYPE_TO_ACCESS > create (const DDL_TYPE_TO_ACCESS &type_to_add)
 creates the given item by copy
 
void add (const DDL_TYPE_TO_ACCESS &type_to_add)
 creates the given item by copy
 
void insert (const size_t pos_idx, const DDL_TYPE_TO_ACCESS &type_to_add)
 inserts the given item at the given pos
 
std::shared_ptr< DDL_TYPE_TO_ACCESS > create (DDL_TYPE_TO_ACCESS &&type_to_add)
 create the given item by emplace
 
void emplace (DDL_TYPE_TO_ACCESS &&type_to_add)
 emplace the given item
 
void remove (const std::string &type_name)
 item to remove
 
std::shared_ptr< DDL_TYPE_TO_ACCESS > access (const std::string &type_name)
 change access to an item
 
size_t getSize () const
 Get the Size.
 
iterator begin ()
 the range based begin iterator
 
iterator end ()
 the range based end iterator
 
const_iterator cbegin () const
 const begin iterator access
 
const_iterator cend () const
 const end iterator access
 
const_iterator begin () const
 range based begin operator for const access
 
const_iterator end () const
 range based end operator for const access
 
bool operator== (const TypeAccessList &other) const
 equality operator.
 
bool operator!= (const TypeAccessList &other) const
 non equality operator.
 
void clear ()
 clears the list and remove this as observer
 
void popBack ()
 removes the last element if exists.
 
void modelChanged (event_code_type event_code, subject_type &subject_changed, const std::string &additional_info)
 overrides the observers utility function.
 
 TypeAccessList ()=delete
 no default CTOR!
 
 TypeAccessList (TYPE_VALIDATOR_CLASS *validator, const std::string &validation_info)
 CTOR.
 
 TypeAccessList (TypeAccessList &&other)
 move CTOR
 
 TypeAccessList (const TypeAccessList &other)
 copies (deepcopy!) CTOR
 
TypeAccessListoperator= (TypeAccessList &&other)
 move assignment operator
 
TypeAccessListoperator= (const TypeAccessList &other)
 copies (deepcopy!) and overwrite the current content.
 
std::shared_ptr< const DDL_TYPE_TO_ACCESS > get (std::string_view type_name) const
 get the item with the given name type_name
 
Optional< size_t > getPosOf (const std::string &type_name) const
 Get the Pos Of the item with the name type_name.
 
bool contains (const std::string &type_name) const
 determines is the type name exists in this list
 
bool contains (const DDL_TYPE_TO_ACCESS &type_to_find) const
 determines if the item is in this list.
 
bool contains (const TypeAccessList &other) const
 determines if the other is a subset of this list
 
std::shared_ptr< DDL_TYPE_TO_ACCESS > create (const DDL_TYPE_TO_ACCESS &type_to_add)
 creates the given item by copy
 
std::shared_ptr< DDL_TYPE_TO_ACCESS > create (DDL_TYPE_TO_ACCESS &&type_to_add)
 create the given item by emplace
 
void add (const DDL_TYPE_TO_ACCESS &type_to_add)
 creates the given item by copy
 
void insert (const size_t pos_idx, const DDL_TYPE_TO_ACCESS &type_to_add)
 inserts the given item at the given pos
 
void emplace (DDL_TYPE_TO_ACCESS &&type_to_add)
 emplace the given item
 
void remove (const std::string &type_name)
 item to remove
 
std::shared_ptr< DDL_TYPE_TO_ACCESS > access (const std::string &type_name)
 change access to an item
 
size_t getSize () const
 Get the Size.
 
iterator begin ()
 the range based begin iterator
 
const_iterator begin () const
 range based begin operator for const access
 
iterator end ()
 the range based end iterator
 
const_iterator end () const
 range based end operator for const access
 
const_iterator cbegin () const
 const begin iterator access
 
const_iterator cend () const
 const end iterator access
 
bool operator== (const TypeAccessList &other) const
 equality operator.
 
bool operator!= (const TypeAccessList &other) const
 non equality operator.
 
void clear ()
 clears the list and remove this as observer
 
void popBack ()
 removes the last element if exists.
 
void modelChanged (event_code_type event_code, subject_type &subject_changed, const std::string &additional_info)
 overrides the observers utility function.
 

Additional Inherited Members

- Public Attributes inherited from ddl::dd::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, ::ddl::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS > >
friend TYPE_VALIDATOR_CLASS
 friend validator class
 
friend TYPE_VALIDATOR_CLASS
 friend validator class
 
- Protected Member Functions inherited from ddl::dd::utility::ModelObserverUtility< T, TypeAccessListEventCode >
virtual ~ModelObserverUtility ()
 protected DTOR
 
virtual ~ModelObserverUtility ()
 protected DTOR
 
virtual ~ModelObserverUtility ()
 protected DTOR
 
virtual ~ModelObserverUtility ()
 protected DTOR
 

Detailed Description

template<typename DDL_TYPE_TO_ACCESS, typename TYPE_VALIDATOR_CLASS>
class ddl::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS >

Bug fix class for ddl::dd::utility::TypeAccessList to get rid of providing getNamedItemList in validator.

Template Parameters
DDL_TYPE_TO_ACCESSthe value type
TYPE_VALIDATOR_CLASSthe validator class to inform on changes

Member Typedef Documentation

◆ base_type

template<typename DDL_TYPE_TO_ACCESS, typename TYPE_VALIDATOR_CLASS>
using ddl::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS >::base_type
Initial value:
DDL_TYPE_TO_ACCESS,
Utility class for observable named items where the order is important.
Definition access_list.h:87
Bug fix class for ddl::dd::utility::TypeAccessList to get rid of providing getNamedItemList in valida...
Definition access_list.h:829

base type definition

Constructor & Destructor Documentation

◆ TypeAccessList() [1/3]

template<typename DDL_TYPE_TO_ACCESS, typename TYPE_VALIDATOR_CLASS>
ddl::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS >::TypeAccessList ( TYPE_VALIDATOR_CLASS * validator,
const std::string & validation_info )
inline

CTOR.

Parameters
validatorthe validator for name check!
validation_infoinfo for errors

◆ ~TypeAccessList()

◆ TypeAccessList() [2/3]

template<typename DDL_TYPE_TO_ACCESS, typename TYPE_VALIDATOR_CLASS>
ddl::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS >::TypeAccessList ( TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS > && other)
default

move CTOR

Parameters
otherthe object to move

◆ TypeAccessList() [3/3]

template<typename DDL_TYPE_TO_ACCESS, typename TYPE_VALIDATOR_CLASS>
ddl::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS >::TypeAccessList ( const TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS > & other)
inline

copies (deepcopy!) CTOR

Parameters
otherthe other list

Member Function Documentation

◆ operator=() [1/2]

template<typename DDL_TYPE_TO_ACCESS, typename TYPE_VALIDATOR_CLASS>
TypeAccessList & ddl::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS >::operator= ( const TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS > & other)
inline

copies (deepcopy!) and overwrite the current content.

Parameters
otherthe other list
Returns
TypeAccessList&

◆ operator=() [2/2]

template<typename DDL_TYPE_TO_ACCESS, typename TYPE_VALIDATOR_CLASS>
TypeAccessList & ddl::utility::TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS >::operator= ( TypeAccessList< DDL_TYPE_TO_ACCESS, TYPE_VALIDATOR_CLASS > && other)
default

move assignment operator

Parameters
otherthe object to move
Returns
TypeAccessList&

The documentation for this class was generated from the following file: