| 
    PLCnext API Documentation 25.6.0.37
    
   | 
 
Provides information of component root variables More...
#include <DataInfoProvider.hpp>

Public Types | |
| using | Roots = std::map< String, DataInfo > | 
  Public Types inherited from Arp::Plc::Commons::Meta::IDataInfoProvider | |
| using | Ptr = std::shared_ptr< IDataInfoProvider > | 
| std::shared_ptr to IDataInfoProvider | |
Public Member Functions | |
| DataInfoProvider (const char *libraryNamespace, ProgramProviderBase *pProgramProvider=nullptr) | |
| Constructs an DataInfoProvider instance. More... | |
| DataInfoProvider (const DataInfoProvider &arg)=default | |
| Copy constructor. | |
| DataInfoProvider (DataInfoProvider &&arg)=default | |
| Move constructor | |
| DataInfoProvider & | operator= (const DataInfoProvider &arg)=default | 
| Copy assignment operator. | |
| DataInfoProvider & | operator= (DataInfoProvider &&arg)=default | 
| Move assignment operator | |
| ~DataInfoProvider (void) override=default | |
| Destructs this instance and frees all resources. | |
| const String & | GetLibraryNamespace () const | 
| Returns the library namespace | |
| IDataInfoProvider & | GetBackgroundProvider (void) | 
| Returns an IDataInfoProvider for the background domain More... | |
| void | Reset (void) | 
| Removes all variable information | |
| void | AddRootInfo (const DataInfo &rootInfo) | 
| Adds information about a component root More... | |
| void | RemoveRootInfo (const String &name) | 
| Removes the information about the specified variable More... | |
| template<class T > | |
| void | AddRoot (const char *name, const T &value) | 
| Deduces the required information of a root variable and add it More... | |
| IEnumerator< constDataInfo & >::Ptr | GetRoots (void) override | 
| Returns an IEnumerator to enumerate all root variables of the component More... | |
| DataInfo | GetRoot (const String &name) override | 
| Returns the requested root variable of the component More... | |
| virtual IEnumerator< constDataInfo & >::Ptr | GetRoots (void)=0 | 
| Returns an IEnumerator to enumerate all root variables of the component More... | |
| virtual DataInfo | GetRoot (const String &name)=0 | 
| Returns the requested root variable of the component More... | |
Friends | |
| class | Arp::Plc::Commons::Meta::ChangeDataInfoProvider | 
Additional Inherited Members | |
  Protected Member Functions inherited from Arp::Plc::Commons::Meta::IDataInfoProvider | |
| IDataInfoProvider (void)=default | |
| Constructs an IDataInfoProvider instance. | |
| virtual | ~IDataInfoProvider (void)=default | 
| Destructs this instance and frees all resources. | |
Provides information of component root variables
Each component providing variables needs to provide information about the component's root variables with a IDataInfo provider. This class is typically used to by C++ components. The information about the variables is deduced by the AddRoot function.
| Arp::Plc::Commons::Meta::DataInfoProvider::DataInfoProvider | ( | const char * | libraryNamespace, | 
| ProgramProviderBase * | pProgramProvider = nullptr  | 
        ||
| ) | 
Constructs an DataInfoProvider instance.
Providing a ProgramProviderBase pointer is deprecated. keeping track of programs is done in ProgramComponentBase.
      
  | 
  inline | 
Deduces the required information of a root variable and add it
| name | Name of the variable | 
| value | Reference of the variable to add | 
All required information except the name and the address is deduced at compile time. This function is used in almost all cases to add root variables.
| void Arp::Plc::Commons::Meta::DataInfoProvider::AddRootInfo | ( | const DataInfo & | rootInfo | ) | 
Adds information about a component root
| rootInfo | DataInfo object for the root variable | 
| IDataInfoProvider & Arp::Plc::Commons::Meta::DataInfoProvider::GetBackgroundProvider | ( | void | ) | 
Returns an IDataInfoProvider for the background domain
The property IsBackgroundDomain is set to true on all objects returned by the background provider.
Returns the requested root variable of the component
| name | Name of the root variable | 
Implements Arp::Plc::Commons::Meta::IDataInfoProvider.
      
  | 
  overridevirtual | 
Returns an IEnumerator to enumerate all root variables of the component
Implements Arp::Plc::Commons::Meta::IDataInfoProvider.
| void Arp::Plc::Commons::Meta::DataInfoProvider::RemoveRootInfo | ( | const String & | name | ) | 
Removes the information about the specified variable
| name | Name of the variable to be removed |