PLCnext API Documentation 25.0.2.69
TypeNameBase.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8
9namespace Arp { namespace Base { namespace Core
10{
11
14class ARP_EXPORT TypeNameBase
15{
16public: // Impl forward declaration
17 class Impl;
18
19private: // nested type ValueType for backward compatibility only
20 class ARP_EXPORT ValueType
21 {
22 friend class TypeNameBase;
23 private:
24 ValueType(TypeNameBase& parent);
25 public:
26 ValueType(const ValueType& arg);
27 ValueType(ValueType&& arg)noexcept;
28 ValueType& operator=(const ValueType& arg);
29 ValueType& operator=(ValueType&& arg)noexcept;
30 ~ValueType(void);
31
32 public: // implicit conversion to String
33 operator String(void);
34
35 private: // fields
36 TypeNameBase* pParent = nullptr;
37 };
38
39public: // construction/destruction/assignment
40 TypeNameBase(const String& rttiTypeName, bool isCommonName);
42 TypeNameBase(TypeNameBase&& arg)noexcept;
46
47public: // properties (just for backward compatibility)
48 ARP_DEPRECATED("Use GetFullName() operation or implicit string conversion instead .")
49 ValueType Value;
50
51public: // operators
52 operator String(void)const;
53 ARP_EXPORT friend bool operator==(const TypeNameBase& left, const TypeNameBase& right);
54 ARP_EXPORT friend bool operator!=(const TypeNameBase& left, const TypeNameBase& right);
55 ARP_EXPORT friend std::ostream& operator<<(std::ostream& os, const TypeNameBase& arg);
56
57public: // setter/getter operations
58 String GetFullName(void)const;
59 String GetSafeName(void)const;
60 String GetNamespace(void)const;
61 String GetClassName(void)const;
62
63public: // internal operations
64 Impl& GetImpl(void);
65 const Impl& GetImpl(void)const;
66
67private: // Impl usings
68 using Pimpl = PimplPtr<Impl, true>;
69
70private: // Impl fields
71 Pimpl pimpl;
72};
73
74}}} // end of namespace Arp::Base::Core
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
This class is used as base class for the implementation of TypeName<T> and CommonTypeName<T>
Definition: TypeNameBase.hpp:15
~TypeNameBase(void)
Default destructor.
TypeNameBase & operator=(TypeNameBase &&arg) noexcept
Default move-assignment operator.
TypeNameBase(const TypeNameBase &arg)
Default copy constructor.
TypeNameBase & operator=(const TypeNameBase &arg)
Default copy-assignment operator.
TypeNameBase(TypeNameBase &&arg) noexcept
Default move constructor.
Root namespace for the PLCnext API
class ARP_DEPRECATED("Use Arp::Enum<T> instead.") EnumStrings
Deprecated! The class implements an adapter for enums to define the string literals of the enum entri...
Definition: EnumStrings.hxx:38
Namespace of the C++ standard library