Xonotic
arraylist.qh File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _AL_type__e()   entity
 
#define _AL_type__f()   float
 
#define _AL_type__s()   string
 
#define AL_DELETE(this)
 
#define AL_EACH(this, T, cond, body)
 
#define AL_gete(this, idx)   al_ftoe(AL_getf(this, idx))
 
#define AL_getf(this, idx)   al_stof(AL_gets(this, idx))
 
#define AL_gets(this, idx)   bufstr_get(this.al_buf, idx)
 
#define AL_NEW(this, n, default, T)
 
#define AL_sete(this, idx, val)   AL_setf(this, idx, al_etof(val))
 
#define AL_setf(this, idx, val)   AL_sets(this, idx, al_ftos(val))
 
#define AL_sets(this, idx, val)   bufstr_set(this.al_buf, idx, val)
 

Typedefs

using ArrayList = entity
 

Variables

int al_buf
 
int al_len
 

Macro Definition Documentation

◆ _AL_type__e

#define _AL_type__e ( )    entity

Definition at line 55 of file arraylist.qh.

◆ _AL_type__f

#define _AL_type__f ( )    float

Definition at line 40 of file arraylist.qh.

◆ _AL_type__s

#define _AL_type__s ( )    string

Definition at line 25 of file arraylist.qh.

◆ AL_DELETE

#define AL_DELETE (   this)
Value:
MACRO_BEGIN \
buf_del(this.al_buf); \
delete(this); \
this = NULL; \
MACRO_END
#define NULL
Definition: post.qh:17
int al_buf
Definition: arraylist.qh:4

Definition at line 18 of file arraylist.qh.

◆ AL_EACH

#define AL_EACH (   this,
  T,
  cond,
  body 
)
Value:
MACRO_BEGIN \
const noref ArrayList _al = this; \
for (int i = 0, n = _al.al_len; i < n; ++i) \
{ \
const noref _AL_type__##T() it = AL_get##T(_al, i); \
if (cond) { body } \
} \
MACRO_END
entity ArrayList
Definition: arraylist.qh:3

Definition at line 59 of file arraylist.qh.

Referenced by HUD_Radar().

◆ AL_gete

#define AL_gete (   this,
  idx 
)    al_ftoe(AL_getf(this, idx))

Definition at line 56 of file arraylist.qh.

◆ AL_getf

#define AL_getf (   this,
  idx 
)    al_stof(AL_gets(this, idx))

Definition at line 41 of file arraylist.qh.

◆ AL_gets

#define AL_gets (   this,
  idx 
)    bufstr_get(this.al_buf, idx)

Definition at line 26 of file arraylist.qh.

◆ AL_NEW

#define AL_NEW (   this,
  n,
  default,
 
)
Value:
MACRO_BEGIN \
ArrayList _al = this = new_pure(ArrayList); \
_al.al_buf = buf_create(); \
for (int i = 0, _n = _al.al_len = n; i < _n; ++i) \
{ \
const _AL_type__##T() it = default; \
AL_set##T(this, i, it); \
} \
MACRO_END
entity ArrayList
Definition: arraylist.qh:3
#define buf_create
Definition: dpextensions.qh:63
#define new_pure(class)
purely logical entities (.origin doesn&#39;t work)
Definition: oo.qh:62

Definition at line 7 of file arraylist.qh.

◆ AL_sete

#define AL_sete (   this,
  idx,
  val 
)    AL_setf(this, idx, al_etof(val))

Definition at line 57 of file arraylist.qh.

◆ AL_setf

#define AL_setf (   this,
  idx,
  val 
)    AL_sets(this, idx, al_ftos(val))

Definition at line 42 of file arraylist.qh.

◆ AL_sets

#define AL_sets (   this,
  idx,
  val 
)    bufstr_set(this.al_buf, idx, val)

Definition at line 27 of file arraylist.qh.

Typedef Documentation

◆ ArrayList

using ArrayList = entity

Definition at line 3 of file arraylist.qh.

Variable Documentation

◆ al_buf

int al_buf

Definition at line 4 of file arraylist.qh.

◆ al_len

int al_len

Definition at line 5 of file arraylist.qh.