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

Public Member Functions

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 24 of file guide.qh.

Member Function Documentation

◆ 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 TopicSource::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 DataSource.

Definition at line 3 of file guide.qc.

4{
5 int idx = 0;
6 #define TOPIC(src, name, icon) \
7 if (idx++ == i) \
8 { \
9 if (returns) \
10 returns(name, icon); \
11 return DataSource_true; \
12 }
14 #undef TOPIC
15 if (returns)
16 returns("undefined", "undefined");
17 return DataSource_false;
18}
#define TOPIC(src, name, icon)
#define TOPICS(X)
Definition guide.qh:8

References getEntry(), TOPIC, and TOPICS.

Referenced by 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 TopicSource::reload ( )
virtual

reload all entries matching filter returning how many matches were found

Reimplemented from DataSource.

Definition at line 19 of file guide.qc.

20{
21 int n = 0;
22 #define TOPIC(src, name, icon) ++n;
24 #undef TOPIC
25 return n;
26}

References reload(), TOPIC, and TOPICS.

Referenced by 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: