Table of Contents

Class CVar

Namespace
ReFuel.CVarScript
Assembly
ReFuel.dll

Base class of the configuration system.

public abstract class CVar : CValue, IConvertible
Inheritance
CVar
Implements
Derived
CVar<T>
Inherited Members

Constructors

CVar(string, Type, CVarKind)

protected CVar(string name, Type t, CVarKind cls)

Parameters

name string
t Type
cls CVarKind

Properties

Class

public CVarKind Class { get; }

Property Value

CVarKind

FullName

public string FullName { get; }

Property Value

string

Globals

public static CVarSet Globals { get; }

Property Value

CVarSet

Name

public string Name { get; }

Property Value

string

Parent

public CVar? Parent { get; }

Property Value

CVar

Methods

AddHelp(string, string?, bool)

public void AddHelp(string brief, string? detailed = null, bool hide = false)

Parameters

brief string
detailed string
hide bool

Find(string)

public static CVar? Find(string path)

Parameters

path string

Returns

CVar

Find<T>(string)

public static T? Find<T>(string path) where T : CVar

Parameters

path string

Returns

T

Type Parameters

T

NewBindBool(string)

public static CBind NewBindBool(string name)

Parameters

name string

Returns

CBind

NewBindSigned(string)

public static CBind NewBindSigned(string name)

Parameters

name string

Returns

CBind

NewBindUnsigned(string)

public static CBind NewBindUnsigned(string name)

Parameters

name string

Returns

CBind

NewCommand(string, CCommandHandler)

public static CCommand NewCommand(string name, CCommandHandler handler)

Parameters

name string
handler CCommandHandler

Returns

CCommand

NewHive(string)

public static CVarSet NewHive(string name)

Parameters

name string

Returns

CVarSet

NewVariable<T>(string, T)

public static CVar<T> NewVariable<T>(string name, T defaultValue)

Parameters

name string
defaultValue T

Returns

CVar<T>

Type Parameters

T

NewVariable<T>(string, T, CVarValidtor<T>)

public static CVar<T> NewVariable<T>(string name, T defaultValue, CVarValidtor<T> validator)

Parameters

name string
defaultValue T
validator CVarValidtor<T>

Returns

CVar<T>

Type Parameters

T

NewVariable<T>(string, T, T?, T?)

public static CVar<T> NewVariable<T>(string name, T defaultValue, T? minValue, T? maxValue) where T : IEquatable<T>

Parameters

name string
defaultValue T
minValue T
maxValue T

Returns

CVar<T>

Type Parameters

T

OnNewCVar(CVar)

protected void OnNewCVar(CVar cvar)

Parameters

cvar CVar

SetParent(CVar, CVar)

This retarded method exists because I can't call a protected member of the base CVar class from CVarHive.

protected static void SetParent(CVar ofWho, CVar toWhom)

Parameters

ofWho CVar

The instance to set the parent of.

toWhom CVar

The parent to set.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Events

NewCVar

public static event EventHandler<CVar>? NewCVar

Event Type

EventHandler<CVar>