API Documentation
Static Public Member Functions | List of all members
nkWinUi::RelativePositionUtils Class Referencefinal

Holds static utility functions to interact with the RELATIVE_POSITION enum class values. More...

Static Public Member Functions

static nkMemory::StringView enumToString (RELATIVE_POSITION toConvert)
 
static RELATIVE_POSITION stringToEnum (nkMemory::StringView toConvert)
 

Detailed Description

Holds static utility functions to interact with the RELATIVE_POSITION enum class values.

Member Function Documentation

◆ enumToString()

static nkMemory::StringView nkWinUi::RelativePositionUtils::enumToString ( RELATIVE_POSITION  toConvert)
static

Converts an RELATIVE_POSITION value to a string representation. Value range is :

Enum value String value
RELATIVE_POSITION::LEFT 'LEFT'
RELATIVE_POSITION::RIGHT 'RIGHT'
RELATIVE_POSITION::TOP 'TOP'
RELATIVE_POSITION::BOTTOM 'BOTTOM'
RELATIVE_POSITION::TOP_LEFT 'TOP_LEFT'
RELATIVE_POSITION::TOP_RIGHT 'TOP_RIGHT'
RELATIVE_POSITION::BOTTOM_LEFT 'BOTTOM_LEFT'
RELATIVE_POSITION::BOTTOM_RIGHT 'BOTTOM_RIGHT'
Parameters
toConvertThe value to convert to a string.
Returns
The value represented as a string.

◆ stringToEnum()

static RELATIVE_POSITION nkWinUi::RelativePositionUtils::stringToEnum ( nkMemory::StringView  toConvert)
static

Converts a string to an RELATIVE_POSITION value. Value range is :

String value Enum value
'LEFT' RELATIVE_POSITION::LEFT
'RIGHT' RELATIVE_POSITION::RIGHT
'TOP' RELATIVE_POSITION::TOP
'BOTTOM' RELATIVE_POSITION::BOTTOM
'TOP_LEFT' RELATIVE_POSITION::TOP_LEFT
'TOP_RIGHT' RELATIVE_POSITION::TOP_RIGHT
'BOTTOM_LEFT' RELATIVE_POSITION::BOTTOM_LEFT
'BOTTOM_RIGHT' RELATIVE_POSITION::BOTTOM_RIGHT
Anything else RELATIVE_POSITION::UNKNOWN'
Parameters
toConvertThe string to convert.
Returns
The value of RELATIVE_POSITION the strings translates into. Defaults to RELATIVE_POSITION::UNKNOWN if the string has no translation attached.

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