PLCnext API Documentation 25.0.2.69
Endianness.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8
9namespace Arp { namespace Base { namespace Core
10{
11
13enum class Endianness
14{
15 None = 0,
16 BigEndian = 1,
17 LittleEndian = 2,
18
19 // define Current endinannes
20#ifdef ARP_BIG_ENDIAN
21 Current = BigEndian
22#else
23 Current = LittleEndian
24#endif
25};
26
28// global stream operators of enum Endianness for logging and parsing
29ARP_EXPORT std::ostream& operator<<(std::ostream& os, Endianness value);
30ARP_EXPORT std::istream& operator>>(std::istream& is, Endianness& value);
31
32}}} // end of namespace Arp::Base::Core
33
35// template specialization of Endianness formatter
36namespace Arp {
38using Arp::Base::Core::Endianness;
39}
41template<> struct fmt::formatter<Arp::Base::Core::Endianness>: public fmt::ostream_formatter {};
Root namespace for the PLCnext API