Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
guide.qc
Go to the documentation of this file.
1#include "guide.qh"
2
3METHOD(TopicSource, getEntry, entity(TopicSource this, int i, void(string, string) returns))
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}
19METHOD(TopicSource, reload, int(TopicSource this, string filter))
20{
21 int n = 0;
22 #define TOPIC(src, name, icon) ++n;
24 #undef TOPIC
25 return n;
26}
virtual void getEntry()
get entry i passing name and icon through returns if it is not null returns DataSource_false if out o...
Definition guide.qc:3
virtual void reload()
reload all entries matching filter returning how many matches were found
Definition guide.qc:19
entity() spawn
#define TOPIC(src, name, icon)
#define TOPICS(X)
Definition guide.qh:8
#define METHOD(cname, name, prototype)
Definition oo.qh:269