# this will also influence the order of the classes in the class list.
# The default value is: NO.
-SORT_BRIEF_DOCS = NO
+SORT_BRIEF_DOCS = YES
# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
# (brief and detailed) documentation of class members so that constructors and
# detailed member documentation.
# The default value is: NO.
-SORT_MEMBERS_CTORS_1ST = NO
+SORT_MEMBERS_CTORS_1ST = YES
# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
# of group names into alphabetical order. If set to NO the group names will
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-MACRO_EXPANSION = NO
+MACRO_EXPANSION = YES
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
# the macro expansion is limited to the macros specified with the PREDEFINED and
# The default value is: NO.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_ONLY_PREDEF = NO
+EXPAND_ONLY_PREDEF = YES
# If the SEARCH_INCLUDES tag is set to YES, the include files in the
# INCLUDE_PATH will be searched if a #include is found.
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
-INCLUDE_PATH =
+INCLUDE_PATH = .
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+PREDEFINED = \
+ "USING(name, T)=using name = T" \
+ "CLASS(name, base)=class name : public base { public:" \
+ "CONSTRUCTOR(class)=class::class(" \
+ "DESTRUCTOR(class)=class::~class()" \
+ "ATTRIB(class, name, T, val)=T name = val;" \
+ "METHOD(class, name, prototype)=virtual void class::name()" \
+ "ENDCLASS(class)=};" \
+ __STDC__
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
# definition found in the source code.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-EXPAND_AS_DEFINED =
+EXPAND_AS_DEFINED = \
+ USING \
+ CLASS \
+ CONSTRUCTOR \
+ DESTRUCTOR \
+ ATTRIB \
+ METHOD \
+ ENDCLASS \
+ LABEL \
+ __STDC__
# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
# remove all references to function-like macros that are alone on a line, have
MUTATOR_ROLLING_BACK
};
-typedef bool(int) mutatorfunc_t;
+USING(mutatorfunc_t, bool(int));
CLASS(Mutator, Object)
ATTRIB(Mutator, m_id, int, 0)
CASE(CPID, LAST)
ENUMCLASS_END(CPID)
-typedef entity Notification;
+USING(Notification, entity);
// used for notification system multi-team identifiers
#define APP_TEAM_NUM(num, prefix) ((num == NUM_TEAM_1) ? prefix##_RED : ((num == NUM_TEAM_2) ? prefix##_BLUE : ((num == NUM_TEAM_3) ? prefix##_YELLOW : prefix##_PINK)))
float boxesoverlap(vector m1, vector m2, vector m3, vector m4);
float boxinsidebox(vector smins, vector smaxs, vector bmins, vector bmaxs);
-typedef float(string s, vector size) textLengthUpToWidth_widthFunction_t;
-typedef float(string s) textLengthUpToLength_lenFunction_t;
+USING(textLengthUpToWidth_widthFunction_t, float(string s, vector size));
+USING(textLengthUpToLength_lenFunction_t, float(string s));
float textLengthUpToWidth(string theText, float maxWidth, vector size, textLengthUpToWidth_widthFunction_t tw);
string textShortenToWidth(string theText, float maxWidth, vector size, textLengthUpToWidth_widthFunction_t tw);
float textLengthUpToLength(string theText, float maxWidth, textLengthUpToLength_lenFunction_t tw);
// as it may exceed 0..1 bounds, or go in reverse
float cubic_speedfunc_is_sane(float startspeedfactor, float endspeedfactor);
-typedef entity(entity cur, entity near, entity pass) findNextEntityNearFunction_t;
-typedef float(entity a, entity b, entity pass) isConnectedFunction_t;
+USING(findNextEntityNearFunction_t, entity(entity cur, entity near, entity pass));
+USING(isConnectedFunction_t, float(entity a, entity b, entity pass));
void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t nxt, isConnectedFunction_t iscon, entity pass);
// expand multiple arguments into one argument by stripping parenthesis
#include "config.qh"
// weapon sets
-typedef vector WepSet;
+USING(WepSet, vector);
#ifdef SVQC
void WriteWepSet(float dest, WepSet w);
#endif
#include <dpdefs/keycodes.qh>
#endif
+#define USING(name, T) typedef T name
+
#include "bool.qh"
#include "int.qh"
#pragma once
-typedef entity ArrayList;
+USING(ArrayList, entity);
.int al_buf;
.int al_len;
// zero overhead mode, use this for releases
-#define ENUMCLASS(id) typedef int id; enum { CASE(id, Null)
+#define ENUMCLASS(id) USING(id, int); enum { CASE(id, Null)
#define CASE(class, id) class##_##id,
#define ENUMCLASS_END(id) };
#define ORDINAL(it) (it)
fclose(fh);
}
-typedef int HashMap;
+USING(HashMap, int);
int db_create()
{
.vector origin;
.bool pure_data;
-/** @deprecated, use new_pure or NEW(class) */
+/** @deprecated use new_pure or NEW(class) */
#define make_pure(e) \
MACRO_BEGIN \
{ \
#define EVAL_entityclass(...) __VA_ARGS__
#define entityclass_1(name) entityclass_2(name, Object)
#ifndef QCC_SUPPORT_ENTITYCLASS
- #define entityclass_2(name, base) typedef entity name
+ #define entityclass_2(name, base) USING(name, entity)
#define class(name)
#define _new(class, pure) __spawn( #class, __FILE__ ":" STR(__LINE__), pure)
#else
#pragma once
/** is only ever called for i1 < i2 */
-typedef void (int i1, int i2, entity pass) swapfunc_t;
+USING(swapfunc_t, void (int i1, int i2, entity pass));
/** <0 for <, ==0 for ==, >0 for > (like strcmp) */
-typedef int (int i1, int i2, entity pass) comparefunc_t;
+USING(comparefunc_t, int (int i1, int i2, entity pass));
void heapsort(int n, swapfunc_t swap, comparefunc_t cmp, entity pass)
{
#include "sort.qh"
.int m_id;
-typedef vector vectori;
+USING(vectori, vector);
#define REGISTER_STAT(...) EVAL_REGISTER_STAT(OVERLOAD(REGISTER_STAT, __VA_ARGS__))
#define EVAL_REGISTER_STAT(...) __VA_ARGS__
X(float)
X(entity)
X(string)
-typedef float(...) rawfunc;
+USING(rawfunc, float(...));
X(rawfunc)
#undef X
const float URL_READY_CANWRITE = 1;
const float URL_READY_CANREAD = 2;
// errors: -1, or negative HTTP status code
-typedef void (entity handle, entity pass, float status) url_ready_func;
+USING(url_ready_func, void (entity handle, entity pass, float status));
void url_single_fopen(string url, float mode, url_ready_func rdy, entity pass);
void url_fclose(entity e);
#define MOVE_NOTHING -1
entity WarpZone_trace_forent; // temp, callback is allowed to change it
-typedef void(vector start, vector hit, vector end) WarpZone_trace_callback_t; // called on every elementary trace
+USING(WarpZone_trace_callback_t, void(vector start, vector hit, vector end)); // called on every elementary trace
var WarpZone_trace_callback_t WarpZone_trace_callback_t_null;
entity WarpZone_trace_transform; // transform accumulator during a trace
entity WarpZone_trace_firstzone; // first warpzone hit by a trace (can differ from the requested zone in case of _ThroughZone, the trace is aborted then)
void PlayerUseKey();
-typedef vector(entity player, entity spot, vector current) spawn_evalfunc_t;
+USING(spawn_evalfunc_t, vector(entity player, entity spot, vector current));
.spawn_evalfunc_t spawn_evalfunc;
string modname;
.entity kh_next;
float kh_Key_AllOwnedByWhichTeam();
-typedef void() kh_Think_t;
+USING(kh_Think_t, void());
void kh_StartRound();
void kh_Controller_SetThink(float t, kh_Think_t func);