libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
Ship::CVar Struct Reference

A single console variable (CVar) holding a typed value. More...

#include <ConsoleVariable.h>

Collaboration diagram for Ship::CVar:
[legend]

Public Member Functions

 ~CVar ()
 

Public Attributes

ConsoleVariableType Type
 Discriminator indicating which union field is active.
 
union { 
 
   int32_t   Integer 
 Active when Type == ConsoleVariableType::Integer. More...
 
   float   Float 
 Active when Type == ConsoleVariableType::Float. More...
 
   char *   String = nullptr 
 Active when Type == ConsoleVariableType::String (heap-allocated). More...
 
   Color_RGBA8   Color 
 Active when Type == ConsoleVariableType::Color. More...
 
   Color_RGB8   Color24 
 Active when Type == ConsoleVariableType::Color24. More...
 
};  
 

Detailed Description

A single console variable (CVar) holding a typed value.

CVars are the primary runtime-tunable settings system. Each CVar stores exactly one value whose type is determined by the Type field. The union members Integer, Float, String, Color, and Color24 are mutually exclusive.

Note
The String member is heap-allocated and is freed by the destructor.

Constructor & Destructor Documentation

◆ ~CVar()

Ship::CVar::~CVar ( )
inline

Member Data Documentation

◆ [union]

union { ... } Ship::CVar

◆ Color

Color_RGBA8 Ship::CVar::Color

Active when Type == ConsoleVariableType::Color.

◆ Color24

Color_RGB8 Ship::CVar::Color24

Active when Type == ConsoleVariableType::Color24.

◆ Float

float Ship::CVar::Float

Active when Type == ConsoleVariableType::Float.

◆ Integer

int32_t Ship::CVar::Integer

Active when Type == ConsoleVariableType::Integer.

◆ String

char* Ship::CVar::String = nullptr

Active when Type == ConsoleVariableType::String (heap-allocated).

◆ Type

ConsoleVariableType Ship::CVar::Type

Discriminator indicating which union field is active.


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