Tanoda
Leap.Unity.BoxedIndexableStruct< Element, IndexableStruct > Class Template Reference

Explicit boxing class for IIndexableStructs that implements IIndexable. More...

Inheritance diagram for Leap.Unity.BoxedIndexableStruct< Element, IndexableStruct >:
Leap.Unity.IIndexable< Element > Leap.Unity.IPoolable

Public Member Functions

void OnSpawn ()
 
void OnRecycle ()
 
void OnSpawn ()
 
void OnRecycle ()
 

Public Attributes

IndexableStruct? maybeIndexableStruct = null
 The wrapped indexable struct, or null. More...
 

Properties

Element? this[int idx] [get]
 
int Count [get]
 
- Properties inherited from Leap.Unity.IIndexable< Element >
this[int idx] [get]
 
int Count [get]
 

Detailed Description

Explicit boxing class for IIndexableStructs that implements IIndexable.

This is useful when you need to pass an IIndexableStruct into a context that requires an IIndexable and you also need to avoid allocating any garbage. To avoid allocation, you can use the generic Pool to pool instances of this class and pass it around as an IIndexable.

Type Constraints
IndexableStruct :struct 
IndexableStruct :IIndexableStruct 
IndexableStruct :Element 
IndexableStruct :IndexableStruct 

Definition at line 47 of file IIndexableStruct.cs.

Member Function Documentation

◆ OnRecycle()

void Leap.Unity.BoxedIndexableStruct< Element, IndexableStruct >.OnRecycle ( )

Implements Leap.Unity.IPoolable.

Definition at line 79 of file IIndexableStruct.cs.

◆ OnSpawn()

void Leap.Unity.BoxedIndexableStruct< Element, IndexableStruct >.OnSpawn ( )

Implements Leap.Unity.IPoolable.

Definition at line 77 of file IIndexableStruct.cs.

Member Data Documentation

◆ maybeIndexableStruct

IndexableStruct? Leap.Unity.BoxedIndexableStruct< Element, IndexableStruct >.maybeIndexableStruct = null

The wrapped indexable struct, or null.

Definition at line 56 of file IIndexableStruct.cs.

Property Documentation

◆ Count

int Leap.Unity.BoxedIndexableStruct< Element, IndexableStruct >.Count
get

Definition at line 70 of file IIndexableStruct.cs.

◆ this[int idx]

Element? Leap.Unity.BoxedIndexableStruct< Element, IndexableStruct >.this[int idx]
get

Definition at line 58 of file IIndexableStruct.cs.


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