Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
CvarStringSource Class Reference
Inheritance diagram for CvarStringSource:
Collaboration diagram for CvarStringSource:

Public Member Functions

 CvarStringSource (string cv, string sep)
 ATTRIB (CvarStringSource, CvarStringSource_cvar, string)
 ATTRIB (StringSource, StringSource_sep, string)
 ATTRIB (StringSource, StringSource_str, string)
virtual void destroy ()
 cleanup on shutdown.
virtual void getEntry ()
 get entry i passing name and icon through returns if it is not null returns DataSource_false if out of bounds otherwise returns an entity or DataSource_true
virtual void indexOf ()
 return the index of the first match for find.
virtual void reload ()
 reload all entries matching filter returning how many matches were found

Static Public Attributes

static entity false = NULL
static entity true = NEW(Object)

Detailed Description

Definition at line 29 of file datasource.qh.

Constructor & Destructor Documentation

◆ CvarStringSource()

CvarStringSource::CvarStringSource ( string cv,
string sep )

Definition at line 22 of file datasource.qc.

23 {
25 this.CvarStringSource_cvar = cv;
26 this.StringSource_sep = sep;
27 }
CvarStringSource(string cv, string sep)
Definition datasource.qc:22
#define CONSTRUCT(cname,...)
Definition oo.qh:123

References CvarStringSource(), and CONSTRUCT.

Referenced by CvarStringSource(), ATTRIB(), getEntry(), and reload().

Member Function Documentation

◆ ATTRIB() [1/3]

CvarStringSource::ATTRIB ( CvarStringSource ,
CvarStringSource_cvar ,
string  )

◆ ATTRIB() [2/3]

StringSource::ATTRIB ( StringSource ,
StringSource_sep ,
string  )
inherited

◆ ATTRIB() [3/3]

StringSource::ATTRIB ( StringSource ,
StringSource_str ,
string  )
inherited

References StringSource(), and ATTRIB().

Referenced by ATTRIB(), and ATTRIB().

◆ destroy()

virtual void DataSource::destroy ( )
inlinevirtualinherited

cleanup on shutdown.

optional

Definition at line 17 of file datasource.qh.

17{ }

References destroy(), and entity().

Referenced by destroy().

◆ getEntry()

void CvarStringSource::getEntry ( )
virtual

get entry i passing name and icon through returns if it is not null returns DataSource_false if out of bounds otherwise returns an entity or DataSource_true

Reimplemented from StringSource.

Definition at line 28 of file datasource.qc.

29 {
30 string s = this.CvarStringSource_cvar;
31 this.StringSource_str = s ? cvar_string(s) : string_null;
32 return SUPER(CvarStringSource).getEntry(this, i, returns);
33 }
const string cvar_string(string name)
string string_null
Definition nil.qh:9
#define SUPER(cname)
Definition oo.qh:231

References CvarStringSource(), cvar_string(), entity(), getEntry(), name, string_null, and SUPER.

Referenced by ATTRIB(), and getEntry().

◆ indexOf()

virtual void DataSource::indexOf ( )
inlinevirtualinherited

return the index of the first match for find.

optional

Definition at line 13 of file datasource.qh.

13{ return -1; }

References entity(), find(), and indexOf().

Referenced by indexOf().

◆ reload()

void CvarStringSource::reload ( )
virtual

reload all entries matching filter returning how many matches were found

Reimplemented from StringSource.

Definition at line 34 of file datasource.qc.

35 {
36 string s = this.CvarStringSource_cvar;
37 this.StringSource_str = s ? cvar_string(s) : string_null;
38 return SUPER(CvarStringSource).reload(this, filter);
39 }

References CvarStringSource(), cvar_string(), entity(), reload(), string_null, and SUPER.

Referenced by ATTRIB(), and reload().

Member Data Documentation

◆ false

entity DataSource::false = NULL
staticinherited

Definition at line 5 of file datasource.qh.

◆ true

entity DataSource::true = NEW(Object)
staticinherited

Definition at line 4 of file datasource.qh.


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