Photon Fusion 2.0.0

Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
Ptr Struct Reference

Ptr. More...

Inherits IEquatable< Ptr >, and INetworkStruct.

Classes

class  EqualityComparer
 Ptr Equality Comparer. More...
 

Public Member Functions

override bool Equals (object obj)
 Check Ptr equality.
 
bool Equals (Ptr other)
 Check Ptr equality.
 
override int GetHashCode ()
 Ptr Hash Code, same as Address
 
override string ToString ()
 Ptr to String
 

Static Public Member Functions

static implicit operator bool (Ptr a)
 Implicit Bool Operator Check if Address is not 0.
 
static bool operator!= (Ptr a, Ptr b)
 Implicit Ptr Not Equals Operator.
 
static Ptr operator+ (Ptr p, int v)
 Implicit Ptr Sum Operator.
 
static Ptr operator- (Ptr p, int v)
 Implicit Ptr Subtraction Operator.
 
static bool operator== (Ptr a, Ptr b)
 Implicit Ptr Equals Operator.
 

Public Attributes

int Address
 Ptr Address.
 

Static Public Attributes

const int SIZE = 4
 Ptr Size.
 

Properties

static Ptr Null [get]
 Null Ptr.
 

Detailed Description

Ptr.

Member Function Documentation

◆ Equals() [1/2]

override bool Equals ( object  obj)

Check Ptr equality.

Parameters
objAny object reference
Returns
True if obj is a Ptr and points to the same Address

◆ Equals() [2/2]

bool Equals ( Ptr  other)

Check Ptr equality.

Parameters
otherPtr Ref
Returns
True if points to the same Address

◆ GetHashCode()

override int GetHashCode ( )

Ptr Hash Code, same as Address

Returns
Address

◆ operator bool()

static implicit operator bool ( Ptr  a)
static

Implicit Bool Operator Check if Address is not 0.

Parameters
aPtr to check
Returns
True if Address is not 0

◆ operator!=()

static bool operator!= ( Ptr  a,
Ptr  b 
)
static

Implicit Ptr Not Equals Operator.

Parameters
aPtr A
bPtr B
Returns
True if Address is not the same

◆ operator+()

static Ptr operator+ ( Ptr  p,
int  v 
)
static

Implicit Ptr Sum Operator.

Parameters
pPtr to add to
vValue to add
Returns
Ptr with Address increased by v

◆ operator-()

static Ptr operator- ( Ptr  p,
int  v 
)
static

Implicit Ptr Subtraction Operator.

Parameters
pPtr to subtract from
vValue to subtract
Returns
Ptr with Address decreased by v

◆ operator==()

static bool operator== ( Ptr  a,
Ptr  b 
)
static

Implicit Ptr Equals Operator.

Parameters
aPtr A
bPtr B
Returns
True if Address is the same

◆ ToString()

override string ToString ( )

Ptr to String

Returns
Address in Hexadecimal format