PLCnext API Documentation 23.6.0.37
MetaLibraryBase.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8#include "Arp/System/Acf/LibraryBase.hpp"
9#include "Arp/Plc/Commons/Meta/IMetaLibrary.hpp"
10#include "Arp/Plc/Commons/Meta/TypeInfoProvider.hpp"
11namespace Arp { namespace Plc { namespace Commons { namespace Meta
12{
13
14using namespace Arp::System::Acf;
16
19{
20public: // construction/destruction
25 MetaLibraryBase(AppDomain& appDomain, const Version& buildVersion, TypeDomain& typeDomain);
27 MetaLibraryBase(const MetaLibraryBase& arg) = default;
31 ~MetaLibraryBase(void) override = default;
32
33public: // setter/getter operations
34 TypeDomain& GetTypeDomain();
35
36public: // IMetaLibrary operations
37 const char* GetNamespace(void)override;
38 ITypeInfoProvider& GetTypeInfoProvider(bool useBackgroundDomain)override;
40
41private: // fields
42 TypeInfoProvider typeInfoProvider;
43};
44
46// inline methods of class MetaLibraryBase
47inline MetaLibraryBase::MetaLibraryBase(AppDomain& appDomain, const Version& buildVersion, TypeDomain& typeDomain)
48 : LibraryBase(appDomain, buildVersion)
49 , typeInfoProvider(typeDomain)
50{
51}
52
54{
55 return this->typeInfoProvider.GetTypeDomain().GetLibraryNamespace();
56}
57
58inline ITypeInfoProvider& MetaLibraryBase::GetTypeInfoProvider(bool /*useBackgroundDomain*/)
59{
60 return this->typeInfoProvider;
61}
62
64{
65 return nullptr;
66}
67
68}}}} // end of namespace Arp::Plc::Commons::Meta
This class represents a single application domain for each process and is implemented as singleton.
Definition: AppDomain.hpp:119
This class represents the version of a special SDK or Arp build.
Definition: BasicVersion.hpp:36
Enables switching of counterparts during download change
Definition: IChangeNavigator.hpp:17
Interface for all libraries providing meta data
Definition: IMetaLibrary.hpp:19
Interface to type information of a library
Definition: ITypeInfoProvider.hpp:25
Base class for libraries providing meta data
Definition: MetaLibraryBase.hpp:19
MetaLibraryBase(AppDomain &appDomain, const Version &buildVersion, TypeDomain &typeDomain)
Constructs an MetaLibraryBase instance.
Definition: MetaLibraryBase.hpp:47
IChangeNavigator * GetChangeNavigator(void) override
Gets the specialized IChangeNavigator of this component.
Definition: MetaLibraryBase.hpp:63
MetaLibraryBase & operator=(const MetaLibraryBase &arg)=default
Assignment operator.
ITypeInfoProvider & GetTypeInfoProvider(bool useBackgroundDomain) override
Gets the ITypeInfoProvider of this library.
Definition: MetaLibraryBase.hpp:58
const char * GetNamespace(void) override
Gets the namespace of this library.
Definition: MetaLibraryBase.hpp:53
MetaLibraryBase(const MetaLibraryBase &arg)=default
Copy constructor.
~MetaLibraryBase(void) override=default
Destructs this instance and frees all resources.
Provides type information of one library
Definition: TypeInfoProvider.hpp:20
Container for the type information of a library
Definition: TypeDomain.hpp:26
const char * GetLibraryNamespace(void) const
Returns the namespace of the library
Definition: TypeDomain.hpp:96
Any Acf Library shall derive from this base class.
Definition: LibraryBase.hpp:21
Namespace for the type information of the Meta component
Definition: DataInfoDeduction.hxx:11
This is the namespace of the Application Component Framework.
Definition: ComponentBase.hpp:13
Root namespace for the PLCnext API