Photon Fusion 2.0.6

Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
NetworkLinkedListReadOnly< T > Struct Template Reference

Read-only version of NetworkLinkedList<T>. More...

Public Member Functions

bool Contains (T value)
 Returns true if the value already exists in the list. More...
 
bool Contains (T value, IEqualityComparer< T > comparer)
 Returns true if the value already exists in the list. More...
 
int * Entry (int index)
 
Get (int index)
 Returns the value at supplied index. More...
 
int * GetEntryByListIndex (int listIndex)
 
int IndexOf (T value)
 Returns the index with this value. Returns -1 if not found. More...
 
int IndexOf (T value, IEqualityComparer< T > equalityComparer)
 Returns the index of the first occurrence of a value in the FixedArray. More...
 
Read (int *entry)
 

Public Attributes

int _capacity
 
int * _data
 
IElementReaderWriter< T > _rw
 
int _stride
 

Static Public Attributes

const int COUNT = 0
 
const int ELEMENT_WORDS = 2
 Returns the number of words required to store a single element. More...
 
const int HEAD = 1
 
const int INVALID = 0
 
const int META_WORDS = 3
 Returns the number of words required to store the list metadata. More...
 
const int NEXT = 1
 
const int OFFSET = 1
 
const int PREV = 0
 
const int TAIL = 2
 

Properties

int Capacity [get]
 Returns the max element count. More...
 
int Count [get]
 Returns the current element count. More...
 
int Head [get]
 
int Tail [get]
 
this[int index] [get]
 Element indexer. More...
 

Detailed Description

Read-only version of NetworkLinkedList<T>.

Template Parameters
TCustom struct type.

Member Function Documentation

◆ Contains() [1/2]

bool Contains ( value)

Returns true if the value already exists in the list.

◆ Contains() [2/2]

bool Contains ( value,
IEqualityComparer< T >  comparer 
)

Returns true if the value already exists in the list.

◆ Get()

T Get ( int  index)

Returns the value at supplied index.

◆ IndexOf() [1/2]

int IndexOf ( value)

Returns the index with this value. Returns -1 if not found.

◆ IndexOf() [2/2]

int IndexOf ( value,
IEqualityComparer< T >  equalityComparer 
)

Returns the index of the first occurrence of a value in the FixedArray.

Parameters
valueThe value to locate in the FixedArray. The value can be null for reference types.
equalityComparerAn equality comparer to compare values. Must not be null.
Returns
The zero-based index of the first occurrence of value within the entire FixedArray, if found; otherwise, -1.

This method performs a linear search; therefore, this method is an O(n) operation, where n is Capacity.

Member Data Documentation

◆ ELEMENT_WORDS

const int ELEMENT_WORDS = 2
static

Returns the number of words required to store a single element.

◆ META_WORDS

const int META_WORDS = 3
static

Returns the number of words required to store the list metadata.

Property Documentation

◆ Capacity

int Capacity
get

Returns the max element count.

◆ Count

int Count
get

Returns the current element count.

◆ this[int index]

T this[int index]
get

Element indexer.