#include "base_thread_types.hh"
#include "gfx_gfxsys.hh"
Go to the source code of this file.
Namespaces | |
| namespace | base |
Classes | |
| class | base::Void |
| class | base::bool0 |
| class | base::int0 |
| class | base::uint0 |
| class | base::Bits |
| Portable bitfield class. More... | |
| struct | base::Seconds |
| Time units. More... | |
| struct | base::Milliseconds |
| struct | base::Microseconds |
Defines | |
| #define | BASE_TYPES_HH 1 |
| #define | virtual VIRTUAL_METHODS_IN_BASIC_TYPES_IS_TOO_SLOW |
| #define | DECLARE_DISTINCT_TYPE(CLASS, T) |
| This macro is meant turn a fundamental type into a distinct class. | |
Typedefs | |
| typedef unsigned char | Bool |
| byte-sized bool | |
| typedef unsigned char | uchar |
| typedef unsigned int | uint |
| typedef GLfloat | fp |
| typedef double | fpx |
| typedef int8_t | base::int8 |
| typedef uint8_t | base::uint8 |
| typedef int16_t | base::int16 |
| typedef uint16_t | base::uint16 |
| typedef int32_t | base::int32 |
| typedef uint32_t | base::uint32 |
| typedef int64_t | base::int64 |
| typedef uint64_t | base::uint64 |
Variables | |
| const uint | base::INT_BITS = sizeof(int) * 8 |
| const uint | base::LONG_BITS = sizeof(long) * 8 |
| const uint | base::PTR_BITS = sizeof(void*) * 8 |
| #define BASE_TYPES_HH 1 |
| #define DECLARE_DISTINCT_TYPE | ( | CLASS, | |||
| T | ) |
Value:
class CLASS \ { \ public: \ CLASS( void ) : mVal(0) { } /* clients depends on zero */ \ CLASS( T val ) : mVal(val) { } \ operator T() const { return mVal; } \ CLASS& operator=( const T& val ) { mVal = val; return *this; } \ friend bool operator==( const CLASS& a, const CLASS& b ) { return a.mVal == b.mVal; } \ friend bool operator!=( const CLASS& a, const CLASS& b ) { return a.mVal != b.mVal; } \ /* Arithmetic operators are omitted because of ambiguity. */ \ /* Rather, cast to fundamental type then do the math. */ \ private: \ T mVal; \ };
/// For example: /// DECLARE_DISTINCT_TYPE( Radian, fp ) /// DECLARE_DISTINCT_TYPE( Degree, fp ) /// BTW, this can't done using a template class and typedefs /// as the typedefs would still be the same type eg: /// typedef Distinct<fp> Radian; /// typedef Distinct<fp> Degree; ///
| #define virtual VIRTUAL_METHODS_IN_BASIC_TYPES_IS_TOO_SLOW |
| typedef unsigned char Bool |
byte-sized bool
| typedef GLfloat fp |
| typedef double fpx |
| typedef unsigned char uchar |
| typedef unsigned int uint |
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:14 2007