PLCnext API Documentation 25.0.2.69
Public Member Functions | Static Public Member Functions | List of all members
Arp::Base::Acf::Commons::SystemStateEnum Class Reference

This wrapper class extends the SystemState enum by some special operations. More...

#include <SystemStateEnum.hpp>

Inheritance diagram for Arp::Base::Acf::Commons::SystemStateEnum:
Inheritance graph

Public Member Functions

 SystemStateEnum (SystemState value=SystemState::None)
 Constructs an SystemStateEnum instance. More...
 
bool HasError (void) const
 Determines if this system state has any error flag set. More...
 
bool HasSystemError (void) const
 Determines if this system state has a system error flag set. More...
 
void Assign (SystemState newValue, bool keepErrors)
 Assigns a new system state to this instance. More...
 
void SetFlags (SystemState flags)
 Sets the supplied flags to this state. More...
 
void ResetFlags (SystemState flags)
 Resets the supplied flags of this state. More...
 
- Public Member Functions inherited from Arp::Base::Core::Enum< T >
 Enum (Value initialValue=Zero)
 Constructs an instance of Enum with the given value. More...
 
 operator T (void) const
 Converts this instance implicitly to the value of its adapted type
 
Enumoperator= (Value arg)
 The assignment operator for a value of the adapted type. More...
 
Enumoperator&= (Enum rhs)
 The assignment AND operator. More...
 
Enumoperator|= (Enum rhs)
 The assignment OR operator. More...
 
GetValue (void) const
 Gets the adapted enum value. More...
 
bool HasFlag (Value flag)
 Determines if this enum value has the supplied flag set. More...
 
bool HasAnyFlag (Value flags)
 Determines if this enum value has any of the the supplied flags set. More...
 
bool HasAllFlags (Value flags)
 Determines if this enum value has all of the supplied flag set. More...
 
U ToUnderlyingType (void) const
 Converts this instance to the underlying integral type of its adapted enum type More...
 
String ToString (bool throwIfInvalid=true) const
 Converts this instance to its string representation. More...
 

Static Public Member Functions

static SystemStateEnum CreateFrom (SystemEvent systemEvent)
 This factory operation creates the system state as SystemStateEnum from the supplied system event. More...
 
- Static Public Member Functions inherited from Arp::Base::Core::Enum< T >
static bool TryParse (const String &input, Enum &result)
 Tries to parse the given input string. More...
 
static bool TryParse (const String &input, T &result)
 Tries to parse the given input string. More...
 
static bool TryParse (const char *input, Enum &result)
 Tries to parse the given input string. More...
 
static bool TryParse (const char *input, T &result)
 Tries to parse the given input string. More...
 
static Enum Parse (const String &input)
 Parses the given input string. More...
 
static Enum Parse (const char *input)
 Parses the given input string. More...
 

Additional Inherited Members

- Public Types inherited from Arp::Base::Core::Enum< T >
using Value = T
 The adapted enum class type.
 
using U = typename std::underlying_type< T >::type
 The underlying integral type of the adapted enum class type.
 
- Static Public Attributes inherited from Arp::Base::Core::Enum< T >
static constexpr T Zero = static_cast<T>(0)
 Zero initialized Enum value.
 

Detailed Description

This wrapper class extends the SystemState enum by some special operations.

Constructor & Destructor Documentation

◆ SystemStateEnum()

Arp::Base::Acf::Commons::SystemStateEnum::SystemStateEnum ( SystemState  value = SystemState::None)

Constructs an SystemStateEnum instance.

Parameters
valueThe initial value.

Member Function Documentation

◆ Assign()

void Arp::Base::Acf::Commons::SystemStateEnum::Assign ( SystemState  newValue,
bool  keepErrors 
)

Assigns a new system state to this instance.

Parameters
newValueThe new system state to assign.
keepErrorsIf set to true all error flags are kept, otherwise this state is overridden at all.

◆ CreateFrom()

SystemStateEnum Arp::Base::Acf::Commons::SystemStateEnum::CreateFrom ( SystemEvent  systemEvent)
static

This factory operation creates the system state as SystemStateEnum from the supplied system event.

Parameters
systemEventThe yet occuring system event to process.
Returns
The system state corresponding the supplied system event.

◆ HasError()

bool Arp::Base::Acf::Commons::SystemStateEnum::HasError ( void  ) const

Determines if this system state has any error flag set.

Returns
true if any error is set, otherwise false.

◆ HasSystemError()

bool Arp::Base::Acf::Commons::SystemStateEnum::HasSystemError ( void  ) const

Determines if this system state has a system error flag set.

Returns
true if a system error flag is set, otherwise false.

◆ ResetFlags()

void Arp::Base::Acf::Commons::SystemStateEnum::ResetFlags ( SystemState  flags)

Resets the supplied flags of this state.

Parameters
flagsThe flags to remove from this state.

◆ SetFlags()

void Arp::Base::Acf::Commons::SystemStateEnum::SetFlags ( SystemState  flags)

Sets the supplied flags to this state.

Parameters
flagsThe flags to add to this state.

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