PLCnext API Documentation 25.0.2.69
CustomAttribute.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Base/Rsc/Commons/Rsc.hpp"
9#include "Arp/Base/Rsc/Commons/RscSerializable.hpp"
10#include "Arp/Base/Rsc/Commons/RscString.hxx"
11#include "Arp/Base/Rsc/Commons/RscVariant.hxx"
12
13namespace Arp { namespace Plc { namespace Commons { namespace Meta
14{
15
16using namespace Arp::Base::Rsc::Commons;
17using namespace Arp::Base::Rsc::Commons::Services;
18
21{
22public: // typedefs
23
24public: // construction/destruction
26 CustomAttribute(void) = default;
27 CustomAttribute(const String& name, RscVariant<256> value);
29 CustomAttribute(const CustomAttribute& arg) = default;
31 CustomAttribute(CustomAttribute&& arg) noexcept = default;
35 CustomAttribute& operator=(CustomAttribute&& arg) noexcept = default;
37 ~CustomAttribute(void) noexcept = default;
38
39public: // setter/getter operations
40 const String& GetName()const;
41 const RscVariant<256>& GetValue()const;
42 size_t GetCacheSize(void)const;
43
44public: // RscSerializable operations
45 void Serialize(RscWriter& writer)const;
46 void Deserialize(RscReader& reader);
47 static size_t GetFieldCount(void);
48
49protected: // operations
50
51private: // static methods
52
53private: // methods
54
55private: // fields
56 String name;
57 RscVariant<256> value;
58
59private: // static fields
60
61};
62
63}}}} // end of namespace Arp::Plc::Meta
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
Any custom struct type which is intended to be marshalled in a Rsc serialization context,...
Definition: RscSerializable.hpp:35
Reads marshaled data of RSC services.
Definition: RscReader.hpp:34
Writes marshalled data of RSC services.
Definition: RscWriter.hpp:34
Container for individual attributes within the interface DataBrowser
Definition: CustomAttribute.hpp:21
CustomAttribute(const CustomAttribute &arg)=default
Copy constructor.
CustomAttribute & operator=(CustomAttribute &&arg) noexcept=default
Move assignment operator
CustomAttribute(void)=default
Constructs an CustomAttribute instance.
~CustomAttribute(void) noexcept=default
Destructs this instance and frees all resources.
const String & GetName() const
Name of the respective attribute this instance object include.
Definition: CustomAttribute.cpp:34
const RscVariant< 256 > & GetValue() const
Attribute value.
Definition: CustomAttribute.cpp:42
size_t GetCacheSize(void) const
Get the cache size
Definition: CustomAttribute.cpp:54
CustomAttribute & operator=(const CustomAttribute &arg)=default
Copy assignment operator.
CustomAttribute(CustomAttribute &&arg) noexcept=default
Move constructor.
Root namespace for the PLCnext API