basictypes.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <inttypes.h>
  3. typedef signed char schar;
  4. typedef int8_t int8;
  5. typedef int16_t int16;
  6. typedef int32_t int32;
  7. typedef int64_t int64;
  8. typedef uint8_t uint8;
  9. typedef uint16_t uint16;
  10. typedef uint32_t uint32;
  11. typedef uint64_t uint64;
  12. const uint16 kuint16max = ( (uint16) 0xFFFF);
  13. const uint32 kuint32max = ( (uint32) 0xFFFFFFFF);
  14. const uint64 kuint64max = ( (((uint64) kuint32max) << 32) | kuint32max );
  15. const int8 kint8max = ( ( int8) 0x7F);
  16. const int16 kint16max = ( ( int16) 0x7FFF);
  17. const int32 kint32max = ( ( int32) 0x7FFFFFFF);
  18. const int64 kint64max = ( ((( int64) kint32max) << 32) | kuint32max );
  19. const int8 kint8min = ( ( int8) 0x80);
  20. const int16 kint16min = ( ( int16) 0x8000);
  21. const int32 kint32min = ( ( int32) 0x80000000);
  22. const int64 kint64min = ( ((( int64) kint32min) << 32) | 0 );
  23. #define DISALLOW_EVIL_CONSTRUCTORS(TypeName) \
  24. TypeName(const TypeName&); \
  25. void operator=(const TypeName&)