Backbone - Persistence
 
Loading...
Searching...
No Matches
Backbone::TEnum Class Reference

Represents an array of boolean values indexed by an enum type. More...

Inheritance diagram for Backbone::TEnum:

Public Member Functions

void Init ()
 Initializes the array by filling it with false values, one for each entry in the enum.
 

Public Attributes

bool this [TEnum key]
 Gets or sets the boolean value associated with a specific enum key.
 
 set => values[Convert.ToInt32(key)] = value
 
List< bool > Raw => values
 Gets the raw internal list of boolean values.
 
float this [TEnum key]
 
List< float > Raw => values
 
int this [TEnum key]
 
List< int > Raw => values
 
string this [TEnum key]
 
List< string > Raw => values
 

Private Member Functions

void Init ()
 
void Init ()
 
void Init ()
 
void Init ()
 

Private Attributes

List< bool > values = new List<bool>()
 Internal list of boolean values, indexed based on the enum order.
 
List< float > values = new List<float>()
 
List< int > values = new List<int>()
 
List< string > values = new List<string>()
 
List< Vector3 > values = new List<Vector3>()
 

Detailed Description

Represents an array of boolean values indexed by an enum type.

Serializable array of Vector3 indexed by enum.

Serializable array of ints indexed by enum.

Serializable array of floats indexed by enum.

Template Parameters
TEnumThe enum type used for indexing. Must be a valid enum.
Template Parameters
TEnumAn enum type used for indexing.

Member Function Documentation

◆ Init() [1/5]

void Backbone::TEnum::Init ( )

Initializes the array by filling it with false values, one for each entry in the enum.

Note: This method must be called manually when the object is created at runtime. It is not called in the constructor to avoid overwriting values when deserializing from JSON.

◆ Init() [2/5]

void Backbone::TEnum::Init ( )
private

◆ Init() [3/5]

void Backbone::TEnum::Init ( )
private

◆ Init() [4/5]

void Backbone::TEnum::Init ( )
private

◆ Init() [5/5]

void Backbone::TEnum::Init ( )
private

Member Data Documentation

◆ Raw [1/4]

List<bool> Backbone::TEnum::Raw => values

Gets the raw internal list of boolean values.

This is useful for serialization, inspection, or manual manipulation.

◆ Raw [2/4]

List<float> Backbone::TEnum::Raw => values

◆ Raw [3/4]

List<int> Backbone::TEnum::Raw => values

◆ Raw [4/4]

List<string> Backbone::TEnum::Raw => values

◆ set

Backbone::TEnum::set => values[Convert.ToInt32(key)] = value

◆ this [1/4]

bool Backbone::TEnum::this[TEnum key]
Initial value:
{
get => values[Convert.ToInt32(key)]
List< bool > values
Internal list of boolean values, indexed based on the enum order.
Definition EnumBoolArray.cs:19

Gets or sets the boolean value associated with a specific enum key.

Parameters
keyThe enum key to access or assign.
Returns
The boolean value stored at the given enum position.

◆ this [2/4]

float Backbone::TEnum::this[TEnum key]
Initial value:
{
get => values[Convert.ToInt32(key)]

◆ this [3/4]

int Backbone::TEnum::this[TEnum key]
Initial value:
{
get => values[Convert.ToInt32(key)]

◆ this [4/4]

string Backbone::TEnum::this[TEnum key]
Initial value:
{
get => values[Convert.ToInt32(key)]

◆ values [1/5]

List<bool> Backbone::TEnum::values = new List<bool>()
private

Internal list of boolean values, indexed based on the enum order.

◆ values [2/5]

List<float> Backbone::TEnum::values = new List<float>()
private

◆ values [3/5]

List<int> Backbone::TEnum::values = new List<int>()
private

◆ values [4/5]

List<string> Backbone::TEnum::values = new List<string>()
private

◆ values [5/5]

List<Vector3> Backbone::TEnum::values = new List<Vector3>()
private

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