C# 클래스 idTech4.idCvarSystem

Console Variables (CVars) are used to hold scalar or string variables that can be changed or displayed at the console as well as accessed directly in code.
CVars are mostly used to hold settings that can be changed from the console or saved to and loaded from configuration files. CVars are also occasionally used to communicate information between different modules of the program.

CVars are restricted from having the same names as console commands to keep the console interface from being ambiguous.

CVars can be accessed from the console in three ways: cvarName prints the current value cvarName X sets the value to X if the variable exists set cvarName X as above, but creates the CVar if not present

CVars may be declared in classes and in functions. However declarations in classes and functions should always be static to save space and time. Making CVars static does not change their functionality due to their global nature.

CVars should be contructed only through one of the constructors with name, value, flags and description. The name, value and description parameters to the constructor have to be static strings, do not use va() or the like functions returning a string.

CVars may be declared multiple times using the same name string. However, they will all reference the same value and changing the value of one CVar changes the value of all CVars with the same name.

CVars should always be declared with the correct type flag: CVAR_BOOL, CVAR_INTEGER or CVAR_FLOAT. If no such flag is specified the CVar defaults to type string. If the CVAR_BOOL flag is used there is no need to specify an argument auto-completion function because the CVar gets one assigned automatically.

CVars are automatically range checked based on their type and any min/max or valid string set specified in the constructor.

CVars are always considered cheats except when CVAR_NOCHEAT, CVAR_INIT, CVAR_ROM, CVAR_ARCHIVE, CVAR_USERINFO, CVAR_SERVERINFO, CVAR_NETWORKSYNC is set.

파일 보기 프로젝트 열기: iainmckay/idtech4.net

공개 메소드들

메소드 설명
ArgCompletion ( string name, string argText ) : string[]
ClearModified ( string name ) : void
Command ( idCmdArgs args ) : bool

Called by the command system when a command is unrecognized.

CommandCompletion ( Predicate filter ) : string[]
CopyCvarsToDictionary ( idDict dict, CvarFlags flags ) : void
Find ( string name ) : idCvar
GetBool ( string name ) : bool
GetFloat ( string name ) : float
GetInteger ( string name ) : int
GetString ( string name ) : string
Init ( ) : void
IsModified ( string name ) : bool
Register ( idCvar var ) : void
RegisterStatics ( ) : void
SetBool ( string name, bool value, CvarFlags flags ) : void
SetFloat ( string name, float value, CvarFlags flags ) : void
SetInteger ( string name, int value, CvarFlags flags ) : void
SetModified ( string name ) : void
SetString ( string name, string value, CvarFlags flags ) : void
idCvarSystem ( ) : System

비공개 메소드들

메소드 설명
Cmd_List ( object sender, CommandEventArgs e ) : void
Cmd_Reset ( object sender, CommandEventArgs e ) : void
Cmd_Restart ( object sender, CommandEventArgs e ) : void
Cmd_Set ( object sender, CommandEventArgs e ) : void
Cmd_SetA ( object sender, CommandEventArgs e ) : void
Cmd_SetS ( object sender, CommandEventArgs e ) : void
Cmd_SetT ( object sender, CommandEventArgs e ) : void
Cmd_SetU ( object sender, CommandEventArgs e ) : void
Cmd_Toggle ( object sender, CommandEventArgs e ) : void
FindInternal ( string name, bool ignoreMissing = false ) : idInternalCvar
ListByFlags ( idCmdArgs args, CvarFlags flags ) : void
SetInternal ( string name, string value, CvarFlags flags ) : void

메소드 상세

ArgCompletion() 공개 메소드

public ArgCompletion ( string name, string argText ) : string[]
name string
argText string
리턴 string[]

ClearModified() 공개 메소드

public ClearModified ( string name ) : void
name string
리턴 void

Command() 공개 메소드

Called by the command system when a command is unrecognized.
public Command ( idCmdArgs args ) : bool
args idCmdArgs
리턴 bool

CommandCompletion() 공개 메소드

public CommandCompletion ( Predicate filter ) : string[]
filter Predicate
리턴 string[]

CopyCvarsToDictionary() 공개 메소드

public CopyCvarsToDictionary ( idDict dict, CvarFlags flags ) : void
dict idDict
flags CvarFlags
리턴 void

Find() 공개 메소드

public Find ( string name ) : idCvar
name string
리턴 idCvar

GetBool() 공개 메소드

public GetBool ( string name ) : bool
name string
리턴 bool

GetFloat() 공개 메소드

public GetFloat ( string name ) : float
name string
리턴 float

GetInteger() 공개 메소드

public GetInteger ( string name ) : int
name string
리턴 int

GetString() 공개 메소드

public GetString ( string name ) : string
name string
리턴 string

Init() 공개 메소드

public Init ( ) : void
리턴 void

IsModified() 공개 메소드

public IsModified ( string name ) : bool
name string
리턴 bool

Register() 공개 메소드

public Register ( idCvar var ) : void
var idCvar
리턴 void

RegisterStatics() 공개 메소드

public RegisterStatics ( ) : void
리턴 void

SetBool() 공개 메소드

public SetBool ( string name, bool value, CvarFlags flags ) : void
name string
value bool
flags CvarFlags
리턴 void

SetFloat() 공개 메소드

public SetFloat ( string name, float value, CvarFlags flags ) : void
name string
value float
flags CvarFlags
리턴 void

SetInteger() 공개 메소드

public SetInteger ( string name, int value, CvarFlags flags ) : void
name string
value int
flags CvarFlags
리턴 void

SetModified() 공개 메소드

public SetModified ( string name ) : void
name string
리턴 void

SetString() 공개 메소드

public SetString ( string name, string value, CvarFlags flags ) : void
name string
value string
flags CvarFlags
리턴 void

idCvarSystem() 공개 메소드

public idCvarSystem ( ) : System
리턴 System