PLCnext API Documentation 25.0.2.69
Public Types | Public Member Functions | Static Public Attributes | List of all members
Arp::Plc::Meta::Commons::CustomAttribute Class Reference

This class represents an attribute on a variable as a key-value-pair More...

#include <CustomAttribute.hpp>

Public Types

using ValueType = Arp::Base::Rsc::Commons::RscVariant< ValueTypeLength >
 Specialization of RscVariant for the value
 

Public Member Functions

 CustomAttribute (const String &name, const ValueType &value)
 Constructs a CustomAttribute as a key-value pair More...
 
 CustomAttribute (const CustomAttribute &arg)
 The default copy constructor.
 
 CustomAttribute (CustomAttribute &&arg) noexcept
 The default move constructor.
 
CustomAttributeoperator= (const CustomAttribute &arg)
 The default copy-assignment operator.
 
CustomAttributeoperator= (CustomAttribute &&arg) noexcept
 The default move-assignment operator.
 
 ~CustomAttribute (void)
 The default destructor.
 
const StringGetName () const
 Returns the name of the attribute More...
 
const ValueTypeGetValue () const
 Returns the value of the attribute More...
 
Impl & GetImpl (void)
 For internal use only.
 
const Impl & GetImpl (void) const
 

Static Public Attributes

static constexpr size_t ValueTypeLength = 256
 Maximum length of an attribute value
 

Detailed Description

This class represents an attribute on a variable as a key-value-pair

Constructor & Destructor Documentation

◆ CustomAttribute()

Arp::Plc::Meta::Commons::CustomAttribute::CustomAttribute ( const String name,
const ValueType value 
)

Constructs a CustomAttribute as a key-value pair

Parameters
nameName of the attribute. Must not be empty.
valueValue of the attribute, must be shorter than 256 characters.

Member Function Documentation

◆ GetName()

const String & Arp::Plc::Meta::Commons::CustomAttribute::GetName ( void  ) const

Returns the name of the attribute

Returns
Name of the attribute

◆ GetValue()

const CustomAttribute::ValueType & Arp::Plc::Meta::Commons::CustomAttribute::GetValue ( void  ) const

Returns the value of the attribute

Returns
value of the attribute

The documentation for this class was generated from the following files: