Photon Quantum 3.0.0

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Quantum.QEnum16< T > Struct Template Reference

A variable sized enum field backed by a short value. The type helps with consistency and backwards compatibility when Enum types change during development. More...

Inherits IConvertible.

Public Member Functions

TypeCode GetTypeCode ()
 Obsolete More...
 
bool ToBoolean (IFormatProvider provider)
 Convert QEnum into a Boolean value using Convert.ToBoolean(bool). More...
 
byte ToByte (IFormatProvider provider)
 Convert QEnum into a Byte value using Convert.ToByte(byte). More...
 
char ToChar (IFormatProvider provider)
 Convert QEnum into a Char value using Convert.ToChar(char). More...
 
DateTime ToDateTime (IFormatProvider provider)
 Convert QEnum into a DateTime value using Convert.ToDateTime(DateTime). More...
 
decimal ToDecimal (IFormatProvider provider)
 Convert QEnum into a Decimal value using Convert.ToDecimal(decimal). More...
 
double ToDouble (IFormatProvider provider)
 Convert QEnum into a Double value using Convert.ToDouble(double). More...
 
short ToInt16 (IFormatProvider provider)
 Convert QEnum into a Int16 value using Convert.ToInt16(short). More...
 
int ToInt32 (IFormatProvider provider)
 Convert QEnum into a Int32 value using Convert.ToInt32(int). More...
 
long ToInt64 (IFormatProvider provider)
 Convert QEnum into a Int64 value using Convert.ToInt64(long). More...
 
sbyte ToSByte (IFormatProvider provider)
 Convert QEnum into a SByte value using Convert.ToSByte(sbyte). More...
 
float ToSingle (IFormatProvider provider)
 Convert QEnum into a Single value using Convert.ToSingle(float). More...
 
string ToString (IFormatProvider provider)
 Convert QEnum into a String value using Convert.ToString(string). More...
 
object ToType (Type conversionType, IFormatProvider provider)
 Convert QEnum into an object type using Convert.ChangeType(object, Type, IFormatProvider). More...
 
ushort ToUInt16 (IFormatProvider provider)
 Convert QEnum into a UInt16 value using Convert.ToUInt16(ushort). More...
 
uint ToUInt32 (IFormatProvider provider)
 Convert QEnum into a UInt32 value using Convert.ToUInt32(uint). More...
 
ulong ToUInt64 (IFormatProvider provider)
 Convert QEnum into a UInt64 value using Convert.ToUInt64(ulong). More...
 

Static Public Member Functions

static operator QEnum16< T > (short value)
 Convert backing type value into QEnum. More...
 
static implicit operator QEnum16< T > (T value)
 Convert enum into QEnum encapsulation. More...
 
static operator short (QEnum16< T > value)
 Convert QEnum value into backing type value. More...
 
static implicit operator T (QEnum16< T > value)
 Convert QEnum into the encapsulated enum value. More...
 

Public Attributes

short Value
 The backing value. More...
 

Detailed Description

A variable sized enum field backed by a short value. The type helps with consistency and backwards compatibility when Enum types change during development.

Template Parameters
TThe encapsulated enumeration type


Type Constraints
T :unmanaged 

Member Function Documentation

◆ operator T()

static implicit Quantum.QEnum16< T >.operator T ( QEnum16< T >  value)
inlinestatic

Convert QEnum into the encapsulated enum value.

Parameters
valueQEnum value

◆ operator QEnum16< T >() [1/2]

static implicit Quantum.QEnum16< T >.operator QEnum16< T > ( value)
inlinestatic

Convert enum into QEnum encapsulation.

Parameters
valueEnum value

◆ operator short()

static Quantum.QEnum16< T >.operator short ( QEnum16< T >  value)
inlineexplicitstatic

Convert QEnum value into backing type value.

Parameters
valueQEnum value

◆ operator QEnum16< T >() [2/2]

static Quantum.QEnum16< T >.operator QEnum16< T > ( short  value)
inlineexplicitstatic

Convert backing type value into QEnum.

Parameters
valueBacking type value

◆ GetTypeCode()

TypeCode Quantum.QEnum16< T >.GetTypeCode ( )

Obsolete

◆ ToBoolean()

bool Quantum.QEnum16< T >.ToBoolean ( IFormatProvider  provider)

Convert QEnum into a Boolean value using Convert.ToBoolean(bool).

Parameters
providerFormat provider.
Returns
Boolean representation

◆ ToByte()

byte Quantum.QEnum16< T >.ToByte ( IFormatProvider  provider)

Convert QEnum into a Byte value using Convert.ToByte(byte).

Parameters
providerFormat provider.
Returns
Byte representation

◆ ToChar()

char Quantum.QEnum16< T >.ToChar ( IFormatProvider  provider)

Convert QEnum into a Char value using Convert.ToChar(char).

Parameters
providerFormat provider.
Returns
Char representation

◆ ToDateTime()

DateTime Quantum.QEnum16< T >.ToDateTime ( IFormatProvider  provider)

Convert QEnum into a DateTime value using Convert.ToDateTime(DateTime).

Parameters
providerFormat provider.
Returns
DateTime representation

◆ ToDecimal()

decimal Quantum.QEnum16< T >.ToDecimal ( IFormatProvider  provider)

Convert QEnum into a Decimal value using Convert.ToDecimal(decimal).

Parameters
providerFormat provider.
Returns
Decimal representation

◆ ToDouble()

double Quantum.QEnum16< T >.ToDouble ( IFormatProvider  provider)

Convert QEnum into a Double value using Convert.ToDouble(double).

Parameters
providerFormat provider.
Returns
Double representation

◆ ToInt16()

short Quantum.QEnum16< T >.ToInt16 ( IFormatProvider  provider)

Convert QEnum into a Int16 value using Convert.ToInt16(short).

Parameters
providerFormat provider.
Returns
Int16 representation

◆ ToInt32()

int Quantum.QEnum16< T >.ToInt32 ( IFormatProvider  provider)

Convert QEnum into a Int32 value using Convert.ToInt32(int).

Parameters
providerFormat provider.
Returns
Int32 representation

◆ ToInt64()

long Quantum.QEnum16< T >.ToInt64 ( IFormatProvider  provider)

Convert QEnum into a Int64 value using Convert.ToInt64(long).

Parameters
providerFormat provider.
Returns
Int64 representation

◆ ToSByte()

sbyte Quantum.QEnum16< T >.ToSByte ( IFormatProvider  provider)

Convert QEnum into a SByte value using Convert.ToSByte(sbyte).

Parameters
providerFormat provider.
Returns
SByte representation

◆ ToSingle()

float Quantum.QEnum16< T >.ToSingle ( IFormatProvider  provider)

Convert QEnum into a Single value using Convert.ToSingle(float).

Parameters
providerFormat provider.
Returns
Single representation

◆ ToString()

string Quantum.QEnum16< T >.ToString ( IFormatProvider  provider)

Convert QEnum into a String value using Convert.ToString(string).

Parameters
providerFormat provider.
Returns
String representation

◆ ToUInt16()

ushort Quantum.QEnum16< T >.ToUInt16 ( IFormatProvider  provider)

Convert QEnum into a UInt16 value using Convert.ToUInt16(ushort).

Parameters
providerFormat provider.
Returns
UInt16 representation

◆ ToUInt32()

uint Quantum.QEnum16< T >.ToUInt32 ( IFormatProvider  provider)

Convert QEnum into a UInt32 value using Convert.ToUInt32(uint).

Parameters
providerFormat provider.
Returns
UInt32 representation

◆ ToUInt64()

ulong Quantum.QEnum16< T >.ToUInt64 ( IFormatProvider  provider)

Convert QEnum into a UInt64 value using Convert.ToUInt64(ulong).

Parameters
providerFormat provider.
Returns
UInt64 representation

◆ ToType()

object Quantum.QEnum16< T >.ToType ( Type  conversionType,
IFormatProvider  provider 
)

Convert QEnum into an object type using Convert.ChangeType(object, Type, IFormatProvider).

Parameters
conversionTypeConversion type
providerFormat provider.
Returns
Object representation

Member Data Documentation

◆ Value

short Quantum.QEnum16< T >.Value

The backing value.