Put in some doxygen.

Note: This will force a recompile of all files.
If someone else can document the rest in one shot,
that would be beneficial.
This commit is contained in:
Jason Felds
2011-02-12 18:26:31 -05:00
parent 1aced33113
commit 440827ddc0
+23 -12
View File
@@ -9,8 +9,10 @@
#pragma once #pragma once
#endif // _MSC_VER >= 1000 #endif // _MSC_VER >= 1000
#define __STDC_LIMIT_MACROS // for INT8_MIN, etc /** @brief This macro is for INT8_MIN, etc. */
#define __STDC_CONSTANT_MACROS // for INT64_C, etc #define __STDC_LIMIT_MACROS
/** @brief This macro is for INT64_C, etc. */
#define __STDC_CONSTANT_MACROS
/* Platform-specific fixes. */ /* Platform-specific fixes. */
#if defined(WIN32) #if defined(WIN32)
@@ -33,7 +35,9 @@
#elif defined(HAVE_MACHINE_ENDIAN_H) #elif defined(HAVE_MACHINE_ENDIAN_H)
#include <machine/endian.h> #include <machine/endian.h>
#else #else
/** @brief The macro for little endian order. */
#define LITTLE_ENDIAN 1234 #define LITTLE_ENDIAN 1234
/** @brief The macro for big endian order. */
#define BIG_ENDIAN 4321 #define BIG_ENDIAN 4321
#if defined(ENDIAN_LITTLE) #if defined(ENDIAN_LITTLE)
#define BYTE_ORDER LITTLE_ENDIAN #define BYTE_ORDER LITTLE_ENDIAN
@@ -78,7 +82,7 @@ using namespace std;
#undef ASSERT #undef ASSERT
#endif #endif
/* RageThreads defines (don't pull in all of RageThreads.h here) */ /** @brief RageThreads defines (don't pull in all of RageThreads.h here) */
namespace Checkpoints namespace Checkpoints
{ {
void SetCheckpoint( const char *file, int line, const char *message ); void SetCheckpoint( const char *file, int line, const char *message );
@@ -87,10 +91,12 @@ namespace Checkpoints
#define CHECKPOINT_M(m) (Checkpoints::SetCheckpoint(__FILE__, __LINE__, m)) #define CHECKPOINT_M(m) (Checkpoints::SetCheckpoint(__FILE__, __LINE__, m))
/* Define a macro to tell the compiler that a function doesn't return. This just /**
* improves compiler warnings. This should be placed near the beginning of the * @brief Define a macro to tell the compiler that a function doesn't return.
* function prototype (although it looks better near the end, VC only accepts it *
* at the beginning). */ * This just improves compiler warnings. This should be placed near the
* beginning of the function prototype (although it looks better near the end,
* VC only accepts it at the beginning). */
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define NORETURN __declspec(noreturn) #define NORETURN __declspec(noreturn)
#elif defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5)) #elif defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
@@ -111,7 +117,7 @@ void NORETURN sm_crash( const char *reason = "Internal error" );
#define ASSERT(COND) ASSERT_M((COND), "Assertion '" #COND "' failed") #define ASSERT(COND) ASSERT_M((COND), "Assertion '" #COND "' failed")
#endif #endif
/* Use this to catch switching on invalid values */ /** @brief Use this to catch switching on invalid values */
#define DEFAULT_FAIL(i) default: FAIL_M( ssprintf("%s = %i", #i, (i)) ) #define DEFAULT_FAIL(i) default: FAIL_M( ssprintf("%s = %i", #i, (i)) )
void ShowWarningOrTrace( const char *file, int line, const char *message, bool bWarning ); // don't pull in LOG here void ShowWarningOrTrace( const char *file, int line, const char *message, bool bWarning ); // don't pull in LOG here
@@ -144,7 +150,7 @@ template<int> struct CompileAssertDecl { };
#define COMPILE_ASSERT(COND) typedef CompileAssertDecl< sizeof(CompileAssert<!!(COND)>) > CompileAssertInst #define COMPILE_ASSERT(COND) typedef CompileAssertDecl< sizeof(CompileAssert<!!(COND)>) > CompileAssertInst
#if defined(__GNUC__) #if defined(__GNUC__)
/* Define a macro to tell the compiler that a function has printf() semantics, to aid warning output. */ /** @brief Define a macro to tell the compiler that a function has printf() semantics, to aid warning output. */
#define PRINTF(a,b) __attribute__((format(__printf__,a,b))) #define PRINTF(a,b) __attribute__((format(__printf__,a,b)))
#define CONST_FUNCTION __attribute__((const)) #define CONST_FUNCTION __attribute__((const))
#else #else
@@ -159,14 +165,16 @@ template<int> struct CompileAssertDecl { };
#endif #endif
/* Use CStdString: */ /** @brief Use RStrings throughout the program. */
#include "StdString.h" #include "StdString.h"
typedef StdString::CStdString RString; typedef StdString::CStdString RString;
#include "RageException.h" #include "RageException.h"
#if !defined(WIN32) #if !defined(WIN32)
/** @brief Define stricmp to be strcasecmp. */
#define stricmp strcasecmp #define stricmp strcasecmp
/** @brief Define strnicmp to be strncasecmp. */
#define strnicmp strncasecmp #define strnicmp strncasecmp
#endif #endif
@@ -174,6 +182,7 @@ typedef StdString::CStdString RString;
#include <cmath> #include <cmath>
#ifndef M_PI #ifndef M_PI
/** @brief Define Pi to many digits. */
#define M_PI 3.1415926535897932384626433832795 #define M_PI 3.1415926535897932384626433832795
#endif #endif
@@ -225,8 +234,10 @@ inline float strtof( const char *s, char **se ) { return (float) strtod( s, se )
#endif #endif
/* /**
* (c) 2001-2004 Chris Danford, Glenn Maynard * @file
* @author Chris Danford, Glenn Maynard (c) 2001-2004
* @section LICENSE
* All rights reserved. * All rights reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a