PLCnext API Documentation 25.0.2.69
StandardAttributes.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Plc/Commons/Meta/StandardAttribute.hpp"
9#include <bitset>
10
11namespace Arp { namespace Plc { namespace Commons { namespace Meta
12{
13
16{
17public: // typedefs
18
19public: // construction/destruction
24 StandardAttributes(StandardAttributes&& arg) noexcept = default;
30 ~StandardAttributes(void) noexcept = default;
31
32public: // static properties
33 static const StandardAttributes None;
34
35public: // operators
36 operator StandardAttribute(void)const;
37 size_t GetCacheSize(void)const;
38
39public: // setter/getter operations
40 bool IsSet(StandardAttribute flag)const;
41 bool IsAnySet(StandardAttribute flags)const;
42 size_t CountSet() const;
43 StandardAttribute GetValue(void)const;
44
45private: // fields
47};
48
49}}}} // end of namespace Arp::Plc::Commons::Meta
50
52// template specialization of StandardAttribute formatter
53template<> struct fmt::formatter<Arp::Plc::Commons::Meta::StandardAttributes> : public fmt::formatter<Arp::Plc::Commons::Meta::StandardAttribute> {};
Collection of StandardAttribute flags
Definition: StandardAttributes.hpp:16
bool IsSet(StandardAttribute flag) const
Check if a flag is set
Definition: StandardAttributes.cpp:29
bool IsAnySet(StandardAttribute flags) const
Check if any of the given flags is set
Definition: StandardAttributes.cpp:38
StandardAttribute GetValue(void) const
Gets the underlying value
Definition: StandardAttributes.cpp:55
StandardAttributes & operator=(const StandardAttributes &arg)=default
Copy assignment operator.
StandardAttributes & operator=(StandardAttributes &&arg) noexcept=default
Move assignment operator
StandardAttributes(StandardAttribute value=StandardAttribute::None)
Constructs a StandardAttributes instance.
Definition: StandardAttributes.cpp:15
StandardAttributes(const StandardAttributes &arg)=default
Copy constructor.
size_t GetCacheSize(void) const
Get the cache size
Definition: StandardAttributes.cpp:62
StandardAttributes(StandardAttributes &&arg) noexcept=default
Move constructor.
~StandardAttributes(void) noexcept=default
Destructs this instance and frees all resources.
size_t CountSet() const
Gets the number of set flags
Definition: StandardAttributes.cpp:46
StandardAttribute
Standard attributes to types
Definition: StandardAttribute.hpp:18
@ None
The attribute value is not set.
Root namespace for the PLCnext API