Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TRangeBound< ElementType > Class Template Reference

#include <RangeBound.h>

+ Collaboration diagram for TRangeBound< ElementType >:

Public Types

typedef TCallTraits< ElementType >::ParamType ElementValueOrConstRef
 

Public Member Functions

 TRangeBound ()
 
 TRangeBound (ElementValueOrConstRef InValue)
 
bool operator== (const TRangeBound &Other) const
 
bool operator!= (const TRangeBound &Other) const
 
FORCEINLINE_DEBUGGABLE ElementValueOrConstRef GetValue () const
 
FORCEINLINE_DEBUGGABLE void SetValue (ElementValueOrConstRef NewValue)
 
FORCEINLINE_DEBUGGABLE bool IsClosed () const
 
FORCEINLINE_DEBUGGABLE bool IsExclusive () const
 
FORCEINLINE_DEBUGGABLE bool IsInclusive () const
 
FORCEINLINE_DEBUGGABLE bool IsOpen () const
 

Static Public Member Functions

static FORCEINLINE TRangeBound Exclusive (ElementValueOrConstRef Value)
 
static FORCEINLINE TRangeBound Inclusive (ElementValueOrConstRef Value)
 
static FORCEINLINE TRangeBound Open ()
 
static FORCEINLINE TRangeBound FlipInclusion (const TRangeBound &Bound)
 
static FORCEINLINE const TRangeBoundMaxLower (const TRangeBound &A, const TRangeBound &B)
 
static FORCEINLINE const TRangeBoundMaxUpper (const TRangeBound &A, const TRangeBound &B)
 
static FORCEINLINE const TRangeBoundMinLower (const TRangeBound &A, const TRangeBound &B)
 
static FORCEINLINE const TRangeBoundMinUpper (const TRangeBound &A, const TRangeBound &B)
 

Private Attributes

TEnumAsByte< ERangeBoundTypes::TypeType
 
ElementType Value
 

Friends

class FArchiveoperator<< (class FArchive &Ar, TRangeBound &Bound)
 
uint32 GetTypeHash (const TRangeBound &Bound)
 

Detailed Description

template<typename ElementType>
class TRangeBound< ElementType >

Template for range bounds.

Definition at line 35 of file RangeBound.h.

Member Typedef Documentation

◆ ElementValueOrConstRef

template<typename ElementType >
typedef TCallTraits<ElementType>::ParamType TRangeBound< ElementType >::ElementValueOrConstRef

Definition at line 40 of file RangeBound.h.

Constructor & Destructor Documentation

◆ TRangeBound() [1/2]

template<typename ElementType >
TRangeBound< ElementType >::TRangeBound ( )
inline

Default constructor.

See also
Exclusive, Inclusive, Open

Definition at line 47 of file RangeBound.h.

◆ TRangeBound() [2/2]

template<typename ElementType >
TRangeBound< ElementType >::TRangeBound ( ElementValueOrConstRef InValue)
inline

Creates a closed bound that includes the specified value.

Parameters
InValueThe bound's value.
See also
Exclusive, Inclusive, Open

Definition at line 58 of file RangeBound.h.

Member Function Documentation

◆ Exclusive()

template<typename ElementType >
static FORCEINLINE TRangeBound TRangeBound< ElementType >::Exclusive ( ElementValueOrConstRef Value)
inlinestatic

Returns a closed bound that excludes the specified value.

Parameters
ValueThe bound value.
Returns
An exclusive closed bound.

Definition at line 193 of file RangeBound.h.

◆ FlipInclusion()

template<typename ElementType >
static FORCEINLINE TRangeBound TRangeBound< ElementType >::FlipInclusion ( const TRangeBound< ElementType > & Bound)
inlinestatic

Returns the given bound with its inclusion flipped between inclusive and exclusive.

If the bound is open it is returned unchanged.

Returns
A new bound.

Definition at line 242 of file RangeBound.h.

◆ GetValue()

template<typename ElementType >
FORCEINLINE_DEBUGGABLE ElementValueOrConstRef TRangeBound< ElementType >::GetValue ( ) const
inline

Gets the bound's value.

Use IsClosed() to verify that this bound is closed before calling this method.

Returns
Bound value.
See also
IsOpen

Definition at line 97 of file RangeBound.h.

◆ Inclusive()

template<typename ElementType >
static FORCEINLINE TRangeBound TRangeBound< ElementType >::Inclusive ( ElementValueOrConstRef Value)
inlinestatic

Returns a closed bound that includes the specified value.

Parameters
ValueThe bound value.
Returns
An inclusive closed bound.

Definition at line 209 of file RangeBound.h.

◆ IsClosed()

template<typename ElementType >
FORCEINLINE_DEBUGGABLE bool TRangeBound< ElementType >::IsClosed ( ) const
inline

Checks whether the bound is closed.

Returns
true if the bound is closed, false otherwise.

Definition at line 125 of file RangeBound.h.

◆ IsExclusive()

template<typename ElementType >
FORCEINLINE_DEBUGGABLE bool TRangeBound< ElementType >::IsExclusive ( ) const
inline

Checks whether the bound is exclusive.

Returns
true if the bound is exclusive, false otherwise.

Definition at line 135 of file RangeBound.h.

◆ IsInclusive()

template<typename ElementType >
FORCEINLINE_DEBUGGABLE bool TRangeBound< ElementType >::IsInclusive ( ) const
inline

Checks whether the bound is inclusive.

Returns
true if the bound is inclusive, false otherwise.

Definition at line 145 of file RangeBound.h.

◆ IsOpen()

template<typename ElementType >
FORCEINLINE_DEBUGGABLE bool TRangeBound< ElementType >::IsOpen ( ) const
inline

Checks whether the bound is open.

Returns
true if the bound is open, false otherwise.

Definition at line 155 of file RangeBound.h.

◆ MaxLower()

template<typename ElementType >
static FORCEINLINE const TRangeBound & TRangeBound< ElementType >::MaxLower ( const TRangeBound< ElementType > & A,
const TRangeBound< ElementType > & B )
inlinestatic

Returns the greater of two lower bounds.

Parameters
AThe first lower bound.
BThe second lower bound.
Returns
The greater lower bound.

Definition at line 264 of file RangeBound.h.

◆ MaxUpper()

template<typename ElementType >
static FORCEINLINE const TRangeBound & TRangeBound< ElementType >::MaxUpper ( const TRangeBound< ElementType > & A,
const TRangeBound< ElementType > & B )
inlinestatic

Returns the greater of two upper bounds.

Parameters
AThe first upper bound.
BThe second upper bound.
Returns
The greater upper bound.

Definition at line 282 of file RangeBound.h.

◆ MinLower()

template<typename ElementType >
static FORCEINLINE const TRangeBound & TRangeBound< ElementType >::MinLower ( const TRangeBound< ElementType > & A,
const TRangeBound< ElementType > & B )
inlinestatic

Returns the lesser of two lower bounds.

Parameters
AThe first lower bound.
BThe second lower bound.
Returns
The lesser lower bound.

Definition at line 300 of file RangeBound.h.

◆ MinUpper()

template<typename ElementType >
static FORCEINLINE const TRangeBound & TRangeBound< ElementType >::MinUpper ( const TRangeBound< ElementType > & A,
const TRangeBound< ElementType > & B )
inlinestatic

Returns the lesser of two upper bounds.

Parameters
AThe first upper bound.
BThe second upper bound.
Returns
The lesser upper bound.

Definition at line 318 of file RangeBound.h.

◆ Open()

template<typename ElementType >
static FORCEINLINE TRangeBound TRangeBound< ElementType >::Open ( )
inlinestatic

Returns an open bound.

Returns
An open bound.

Definition at line 224 of file RangeBound.h.

◆ operator!=()

template<typename ElementType >
bool TRangeBound< ElementType >::operator!= ( const TRangeBound< ElementType > & Other) const
inline

Compares this range with the specified bound for inequality.

Parameters
OtherThe bound to compare with.
Returns
true if the bounds are not equal, false otherwise.

Definition at line 82 of file RangeBound.h.

◆ operator==()

template<typename ElementType >
bool TRangeBound< ElementType >::operator== ( const TRangeBound< ElementType > & Other) const
inline

Compares this bound with the specified bound for equality.

Parameters
OtherThe bound to compare with.
Returns
true if the bounds are equal, false otherwise.

Definition at line 71 of file RangeBound.h.

◆ SetValue()

template<typename ElementType >
FORCEINLINE_DEBUGGABLE void TRangeBound< ElementType >::SetValue ( ElementValueOrConstRef NewValue)
inline

Sets the bound's value, maintining the inclusivity of the bound

Use IsClosed() to verify that this bound is closed before calling this method.

Parameters
NewValueNew bound value.
See also
IsClosed

Definition at line 113 of file RangeBound.h.

Friends And Related Symbol Documentation

◆ GetTypeHash

template<typename ElementType >
uint32 GetTypeHash ( const TRangeBound< ElementType > & Bound)
friend

Gets the hash for the specified bound.

Parameters
BoundThe bound to get the hash for.
Returns
Hash value.

Definition at line 180 of file RangeBound.h.

◆ operator<<

template<typename ElementType >
class FArchive & operator<< ( class FArchive & Ar,
TRangeBound< ElementType > & Bound )
friend

Serializes the given bound from or into the specified archive.

Parameters
ArThe archive to serialize from or into.
BoundThe bound to serialize.
Returns
The archive.

Definition at line 169 of file RangeBound.h.

Member Data Documentation

◆ Type

template<typename ElementType >
TEnumAsByte<ERangeBoundTypes::Type> TRangeBound< ElementType >::Type
private

Holds the type of the bound.

Definition at line 332 of file RangeBound.h.

◆ Value

template<typename ElementType >
ElementType TRangeBound< ElementType >::Value
private

Holds the bound's value.

Definition at line 335 of file RangeBound.h.


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