PLCnext API Documentation  20.6.0.30321
MetaLibraryBase.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include "Arp/System/Acf/LibraryBase.hpp"
9 #include "Arp/Plc/Commons/Meta/IMetaLibrary.hpp"
10 #include "Arp/Plc/Commons/Meta/TypeInfoProvider.hpp"
11 namespace Arp { namespace Plc { namespace Commons { namespace Meta
12 {
13 
14 using namespace Arp::System::Acf;
16 
18 {
19 public: // construction/destruction
21  MetaLibraryBase(AppDomain& appDomain, const Version& buildVersion, TypeDomain& typeDomain);
23  MetaLibraryBase(const MetaLibraryBase& arg) = default;
25  MetaLibraryBase& operator=(const MetaLibraryBase& arg) = default;
27  ~MetaLibraryBase(void) = default;
28 
29 public: // setter/getter operations
30 
31 public: // IMetaLibrary operations
32  const char* GetNamespace(void)override;
33  ITypeInfoProvider& GetTypeInfoProvider(bool useBackgroundDomain)override;
34  IChangeNavigator* GetChangeNavigator(void)override;
35 
36 private: // fields
37  TypeInfoProvider typeInfoProvider;
38 };
39 
41 // inline methods of class MetaLibraryBase
42 inline MetaLibraryBase::MetaLibraryBase(AppDomain& appDomain, const Version& buildVersion, TypeDomain& typeDomain)
43  : LibraryBase(appDomain, buildVersion)
44  , typeInfoProvider(typeDomain)
45 {
46 }
47 
48 inline const char* MetaLibraryBase::GetNamespace()
49 {
50  return this->typeInfoProvider.GetTypeDomain().GetLibraryNamespace();
51 }
52 
53 inline ITypeInfoProvider& MetaLibraryBase::GetTypeInfoProvider(bool /*useBackgroundDomain*/)
54 {
55  return this->typeInfoProvider;
56 }
57 
59 {
60  return nullptr;
61 }
62 
63 }}}} // end of namespace Arp::Plc::Commons::Meta
IChangeNavigator * GetChangeNavigator(void) override
Gets the specialized IChangeNavigator of this component.
Definition: MetaLibraryBase.hpp:58
Definition: ITypeInfoProvider.hpp:19
Definition: IMetaLibrary.hpp:16
This class represents the version of a special SDK or Arp build.
Definition: BasicVersion.hpp:34
MetaLibraryBase(AppDomain &appDomain, const Version &buildVersion, TypeDomain &typeDomain)
Constructs an MetaLibraryBase instance.
Definition: MetaLibraryBase.hpp:42
This class represents a single application domain for each process and is implemented as singleton...
Definition: AppDomain.hpp:122
Definition: TypeInfoProvider.hpp:18
Root namespace for the PLCnext API
Definition: DataInfoDeduction.hxx:10
Any Acf Library shall derive from this base class.
Definition: LibraryBase.hpp:19
ITypeInfoProvider & GetTypeInfoProvider(bool useBackgroundDomain) override
Gets the ITypeInfoProvider of this library.
Definition: MetaLibraryBase.hpp:53
Namespace of the Application Component Framework (ACF)
const char * GetNamespace(void) override
Gets the namespace of this library.
Definition: MetaLibraryBase.hpp:48
Definition: MetaLibraryBase.hpp:17
Definition: IChangeNavigator.hpp:13