Shadowrun: Awakened 29 September 2011 - Build 871
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
cat Namespace Reference

Namespaces

namespace  Atomic
namespace  bombay
namespace  bs_bit
namespace  bs_byte
namespace  FIFO
namespace  sphynx

Classes

struct  AcceptExOverlapped
class  Aligned
class  AsyncBuffer
class  AsyncFile
class  AuthenticatedEncryption
class  AutoMutex
class  AutoReadLock
class  AutoRef
class  AutoWriteLock
class  BigMontgomery
class  BigPseudoMersenne
class  BigRTL
class  BigTwistedEdwards
class  BitStream
class  BMPTokenizer
class  BufferStream
class  BufferTok
struct  CAT_PACKED
class  ChaChaKey
class  ChaChaOutput
class  ClientEasyHandshake
class  Clock
class  CookieJar
struct  DNSCallback
class  DNSClient
struct  DNSRequest
class  EasyHandshake
class  Enforcer
union  Float32
class  FortunaFactory
class  FortunaOutput
class  HMAC_MD5
class  ICryptHash
class  IncrementalMurmurHash32
class  IncrementalMurmurHash64
class  IRandom
class  KennelFile
class  KennelPatchFile
class  KeyAgreementCommon
class  KeyAgreementInitiator
class  KeyAgreementResponder
class  KeyMaker
class  LargeAligned
class  Logging
class  Matrix
class  MersenneTwister
class  MessageRouter
class  MMapFile
class  Mutex
class  NetAddr
class  PNGSkeletonTokenizer
class  PNGTokenizer
class  Quaternion
class  RangeDecoder
class  RangeEncoder
class  Recorder
struct  RecvFromOverlapped
class  RegionAllocator
class  RWLock
class  ServerEasyHandshake
class  Settings
class  SettingsKey
struct  SettingsValue
class  ShutdownObserver
class  ShutdownWait
class  Singleton
class  Skein
class  StandardRand
class  STLAlignedAllocator
class  STLLargeAlignedAllocator
class  STLRegionAllocator
class  TCPClient
class  TCPClientQueued
class  TCPConnection
class  TCPConnexion
class  TCPServer
class  TextStatsCollector
class  Thread
class  ThreadPool
class  ThreadPoolLocalStorage
class  ThreadPoolWorker
class  ThreadRefObject
class  UDPEndpoint
class  Vector
class  WaitableFlag

Typedefs

typedef
fastdelegate::FastDelegate4
< ThreadPoolLocalStorage
*, int, AsyncBuffer *, u32,
bool
AsyncCallback
typedef
fastdelegate::FastDelegate3
< const char *, const NetAddr
*, int, bool
DNSResultCallback
typedef float f32
typedef double f64
typedef
fastdelegate::FastDelegate1
< bool, void > 
KennelPatchCallback
typedef void(* LogCallback )(EventSeverity severity, const char *source, region_ostringstream &msg)
typedef Matrix< 2, 2, f64Matrix2x2d
typedef Matrix< 2, 2, f32Matrix2x2f
typedef Matrix< 2, 2, s32Matrix2x2i
typedef Matrix< 2, 2, u32Matrix2x2u
typedef Matrix< 3, 3, f64Matrix3x3d
typedef Matrix< 3, 3, f32Matrix3x3f
typedef Matrix< 3, 3, s32Matrix3x3i
typedef Matrix< 3, 3, u32Matrix3x3u
typedef Matrix< 4, 4, f64Matrix4x4d
typedef Matrix< 4, 4, f32Matrix4x4f
typedef Matrix< 4, 4, s32Matrix4x4i
typedef Matrix< 4, 4, u32Matrix4x4u
typedef
fastdelegate::FastDelegate
< void(BitStream &m)> 
MessageHandler
typedef u16 Port
typedef Quaternion< f64, f64Quaternion4d
typedef Quaternion< f32, f64Quaternion4f
typedef
std::basic_ostringstream< char,
std::char_traits< char >
, STLRegionAllocator< char > > 
region_ostringstream
typedef std::basic_string
< char, std::char_traits< char >
, STLRegionAllocator< char > > 
region_string
typedef int16_t s16
typedef int32_t s32
typedef int64_t s64
typedef int8_t s8
typedef int Socket
typedef int ThreadPoolHandle
typedef uint16_t u16
typedef uint32_t u32
typedef uint64_t u64
typedef uint8_t u8
typedef Vector< 2, f64, f64Vector2d
typedef Vector< 2, f32, f64Vector2f
typedef Vector< 2, s32, s32Vector2s
typedef Vector< 2, u32, u32Vector2u
typedef Vector< 3, f64, f64Vector3d
typedef Vector< 3, f32, f64Vector3f
typedef Vector< 3, s32, s32Vector3s
typedef Vector< 3, u32, u32Vector3u
typedef Vector< 4, f64, f64Vector4d
typedef Vector< 4, f32, f64Vector4f
typedef Vector< 4, s32, s32Vector4s
typedef Vector< 4, u32, u32Vector4u

Enumerations

enum  AsyncFileModes { ASYNCFILE_READ = 1, ASYNCFILE_WRITE = 2, ASYNCFILE_RANDOM = 4 }
enum  EventSeverity {
  LVL_INANE, LVL_INFO, LVL_WARN, LVL_OOPS,
  LVL_FATAL, LVL_SILENT
}
enum  RefObjectPriorities { REFOBJ_PRIO_0, REFOBJ_PRIO_COUNT = 32 }
enum  SettingsValueFlags { CAT_SETTINGS_FILLED = 1, CAT_SETTINGS_INT = 2 }

Functions

template<typename T >
CAT_INLINE T BitCount (T v)
template<typename T >
T Bound (const T &minimum, const T &maximum, const T &x)
template<typename T >
T BoundMax (const T &maximum, const T &x)
template<typename T >
T BoundMin (const T &minimum, const T &x)
CAT_INLINE u32 BSF32 (u32 x)
CAT_INLINE u32 BSF64 (u64 x)
CAT_INLINE u32 BSR32 (u32 x)
CAT_INLINE u32 BSR64 (u64 x)
template<class Scalar >
void Clamp (Scalar &x, Scalar low, Scalar high)
void CleanupSockets ()
CAT_INLINE bool CloseSocket (Socket s)
void CopyDesimilarizeString (const char *from, char *to)
bool CreateSocket (int type, int protocol, bool SupportIPv4, Socket &out_s, bool &inout_OnlyIPv4)
int DecToString (s32 x, char *outs)
void DefaultLogCallback (EventSeverity severity, const char *source, region_ostringstream &msg)
f64 Deg2Rad (f64 angle)
f32 Deg2Rad (f32 angle)
char DesimilarizeCharacter (char ch)
u32 DesimilarizeFixedString (char *str, u32 max_len)
void FatalStop (const char *message)
int GetBase64LengthFromBinaryLength (int bytes)
int GetBinaryLengthFromBase64Length (const char *encoded_buffer, int bytes)
Port GetBoundPort (Socket s)
u32 GetCacheLineBytes ()
u32 GetFixedStrLen (const char *str, u32 max_len)
u8GetPostBuffer (u32 bytes)
template<typename T >
u8GetTrailingBytes (T *t)
region_string HexDumpString (const void *vdata, u32 bytes)
bool InitializeFramework (const char *settings_file, const char *service_name=0)
f32 InvSqrt (f32 x)
bool iStrEqual (const char *A, const char *B)
bool IsZeroFixedBuffer (const void *buffer, u32 bytes)
void * LoadBitmap (const char *path, u32 &width, u32 &height)
void * LoadBitmap (void *file, u32 bytes, u32 &width, u32 &height)
u32 MurmurHash32 (const void *key, int bytes, u32 seed)
u64 MurmurHash64 (const void *key, int bytes, u64 seed)
bool NetBind (Socket s, Port port, bool OnlyIPv4)
CAT_INLINE u64 NextHighestPow2 (u64 n)
CAT_INLINE u32 NextHighestPow2 (u32 n)
u32 NLCRand32 (int x, int y, u32 seed)
float NLCRandNorm (int x, int y, u32 seed)
template<typename T >
CAT_INLINE T NoChangeNeeded (const T t)
f32 Rad2Deg (f32 angle)
f64 Rad2Deg (f64 angle)
int ReadBase64 (const char *encoded_buffer, int encoded_bytes, void *decoded_buffer, int decoded_bytes)
int ReadBase64 (const char *encoded_buffer, int encoded_bytes, std::ostream &output)
template<int BITS, typename T >
CAT_INLINE T ReconstructCounter (T last_accepted_count, u32 partial_low_bits)
void ReleasePostBuffer (void *buffer)
void ReportUnexpectedSocketError (int error)
void * ResizePostBuffer (void *buffer, u32 newBytes)
bool SecureEqual (const void *A, const void *B, int bytes)
u32 SetFixedStr (char *dest, u32 dest_len, const char *src, u32 src_max_len)
void ShutdownFramework (bool WriteSettings=true)
std::string SocketGetErrorString (int code)
std::string SocketGetLastErrorString ()
bool StartupSockets ()
int WriteBase64 (const void *buffer, int bytes, char *encoded_buffer, int encoded_bytes)
int WriteBase64 (const void *buffer, int bytes, std::ostream &output)
int WriteBase64Str (const void *buffer, int bytes, char *encoded_buffer, int encoded_bytes)

Variables

const Leg CAT_LEG_LARGEST = ~(Leg)0
const Leg CAT_LEG_MSB = (Leg)1 << (CAT_LEG_BITS - 1)
static const int DNSCACHE_MAX_REQS = 8
static const int DNSCACHE_MAX_RESP = 8
static const int DNSCACHE_TIMEOUT = 60000
static const int DNSREQ_MAX_SIMUL = 2048
static const int DNSREQ_REPOST_TIME = 300
static const int DNSREQ_TIMEOUT = 3000
static const int HOSTNAME_MAXLEN = 63
static const Socket INVALID_SOCKET = -1
static const int SOCKET_ERROR = -1

Typedef Documentation

Definition at line 43 of file AsyncBuffer.hpp.

typedef fastdelegate::FastDelegate3<const char *, const NetAddr*, int, bool> cat::DNSResultCallback

Definition at line 57 of file DNSClient.hpp.

typedef float cat::f32

Definition at line 378 of file Platform.hpp.

typedef double cat::f64

Definition at line 379 of file Platform.hpp.

Definition at line 92 of file PackageManager.hpp.

typedef void(* cat::LogCallback)(EventSeverity severity, const char *source, region_ostringstream &msg)

Definition at line 67 of file Logging.hpp.

typedef Matrix<2, 2, f64> cat::Matrix2x2d

Definition at line 177 of file Matrix.hpp.

typedef Matrix<2, 2, f32> cat::Matrix2x2f

Definition at line 173 of file Matrix.hpp.

typedef Matrix<2, 2, s32> cat::Matrix2x2i

Definition at line 169 of file Matrix.hpp.

typedef Matrix<2, 2, u32> cat::Matrix2x2u

Definition at line 165 of file Matrix.hpp.

typedef Matrix<3, 3, f64> cat::Matrix3x3d

Definition at line 178 of file Matrix.hpp.

typedef Matrix<3, 3, f32> cat::Matrix3x3f

Definition at line 174 of file Matrix.hpp.

typedef Matrix<3, 3, s32> cat::Matrix3x3i

Definition at line 170 of file Matrix.hpp.

typedef Matrix<3, 3, u32> cat::Matrix3x3u

Definition at line 166 of file Matrix.hpp.

typedef Matrix<4, 4, f64> cat::Matrix4x4d

Definition at line 179 of file Matrix.hpp.

typedef Matrix<4, 4, f32> cat::Matrix4x4f

Definition at line 175 of file Matrix.hpp.

typedef Matrix<4, 4, s32> cat::Matrix4x4i

Definition at line 171 of file Matrix.hpp.

typedef Matrix<4, 4, u32> cat::Matrix4x4u

Definition at line 167 of file Matrix.hpp.

typedef fastdelegate::FastDelegate<void (BitStream &m)> cat::MessageHandler

Definition at line 38 of file MessageRouter.hpp.

typedef u16 cat::Port

Definition at line 59 of file Sockets.hpp.

Definition at line 396 of file Quaternion.hpp.

Definition at line 395 of file Quaternion.hpp.

typedef std::basic_ostringstream<char, std::char_traits<char>, STLRegionAllocator<char> > cat::region_ostringstream

Definition at line 182 of file RegionAllocator.hpp.

typedef std::basic_string<char, std::char_traits<char>, STLRegionAllocator<char> > cat::region_string

Definition at line 183 of file RegionAllocator.hpp.

typedef int16_t cat::s16

Definition at line 362 of file Platform.hpp.

typedef int32_t cat::s32

Definition at line 364 of file Platform.hpp.

typedef int64_t cat::s64

Definition at line 366 of file Platform.hpp.

typedef int8_t cat::s8

Definition at line 360 of file Platform.hpp.

typedef int cat::Socket

Definition at line 53 of file Sockets.hpp.

typedef int cat::ThreadPoolHandle

Definition at line 174 of file ThreadPool.hpp.

typedef uint16_t cat::u16

Definition at line 361 of file Platform.hpp.

typedef uint32_t cat::u32

Definition at line 363 of file Platform.hpp.

typedef uint64_t cat::u64

Definition at line 365 of file Platform.hpp.

typedef uint8_t cat::u8

Definition at line 359 of file Platform.hpp.

typedef Vector<2, f64, f64> cat::Vector2d

Definition at line 380 of file Vector.hpp.

typedef Vector<2, f32, f64> cat::Vector2f

Definition at line 376 of file Vector.hpp.

typedef Vector<2, s32, s32> cat::Vector2s

Definition at line 372 of file Vector.hpp.

typedef Vector<2, u32, u32> cat::Vector2u

Definition at line 368 of file Vector.hpp.

typedef Vector<3, f64, f64> cat::Vector3d

Definition at line 381 of file Vector.hpp.

typedef Vector<3, f32, f64> cat::Vector3f

Definition at line 377 of file Vector.hpp.

typedef Vector<3, s32, s32> cat::Vector3s

Definition at line 373 of file Vector.hpp.

typedef Vector<3, u32, u32> cat::Vector3u

Definition at line 369 of file Vector.hpp.

typedef Vector<4, f64, f64> cat::Vector4d

Definition at line 382 of file Vector.hpp.

typedef Vector<4, f32, f64> cat::Vector4f

Definition at line 378 of file Vector.hpp.

typedef Vector<4, s32, s32> cat::Vector4s

Definition at line 374 of file Vector.hpp.

typedef Vector<4, u32, u32> cat::Vector4u

Definition at line 370 of file Vector.hpp.


Enumeration Type Documentation

Enumerator:
ASYNCFILE_READ 
ASYNCFILE_WRITE 
ASYNCFILE_RANDOM 

Definition at line 42 of file ThreadPoolFiles.hpp.

Enumerator:
LVL_INANE 
LVL_INFO 
LVL_WARN 
LVL_OOPS 
LVL_FATAL 
LVL_SILENT 

Definition at line 43 of file Logging.hpp.

{
    LVL_INANE,
    LVL_INFO,
    LVL_WARN,
    LVL_OOPS,
    LVL_FATAL,

    LVL_SILENT, // invalid for an actual event's level, valid value for a threshold
};
Enumerator:
REFOBJ_PRIO_0 
REFOBJ_PRIO_COUNT 

Definition at line 48 of file ThreadPool.hpp.

Enumerator:
CAT_SETTINGS_FILLED 
CAT_SETTINGS_INT 

Definition at line 39 of file Settings.hpp.

{
    CAT_SETTINGS_FILLED = 1, // s[] array has been set
    CAT_SETTINGS_INT = 2,    // value has been promoted to int 'i'
};

Function Documentation

template<typename T >
CAT_INLINE T cat::BitCount ( T  v)

Definition at line 75 of file BitMath.hpp.

References T.

{
    // From Stanford Bit Twiddling Hacks collection
    // http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel
    v = v - ((v >> 1) & (T)~(T)0/3);
    v = (v & (T)~(T)0/15*3) + ((v >> 2) & (T)~(T)0/15*3);
    v = (v + (v >> 4)) & (T)~(T)0/255*15;
    return (T)(v * ((T)~(T)0/255)) >> ((sizeof(v) - 1) * 8);
}
template<typename T >
T cat::Bound ( const T minimum,
const T maximum,
const T x 
) [inline]

Definition at line 426 of file Platform.hpp.

{
    if (x < minimum) return minimum;
    if (x > maximum) return maximum;
    return x;
}
template<typename T >
T cat::BoundMax ( const T maximum,
const T x 
) [inline]

Definition at line 420 of file Platform.hpp.

{
    if (x > maximum) return maximum;
    return x;
}
template<typename T >
T cat::BoundMin ( const T minimum,
const T x 
) [inline]

Definition at line 414 of file Platform.hpp.

{
    if (x < minimum) return minimum;
    return x;
}
u32 cat::BSF32 ( u32  x)

Definition at line 99 of file BitMath.hpp.

References BSR32().

{
#if defined(CAT_COMPILER_MSVC) && defined(CAT_WORD_64) && !defined(CAT_DEBUG)

    u32 index;
    _BitScanForward((unsigned long*)&index, x);
    return index;

#elif defined(CAT_ASM_INTEL)

    CAT_ASM_BEGIN
        BSF eax, [x]
    CAT_ASM_END

#elif defined(CAT_ASM_ATT)

    u32 retval;

    CAT_ASM_BEGIN
        "BSFl %1, %%eax"
        : "=a" (retval)
        : "r" (x)
        : "cc"
    CAT_ASM_END

    return retval;

#else

    return BSR32(x ^ (x - 1));

#endif
}
u32 cat::BSF64 ( u64  x)

Definition at line 177 of file BitMath.hpp.

References BSR64().

{
#if defined(CAT_COMPILER_MSVC) && !defined(CAT_DEBUG) && defined(CAT_WORD_64)

    u32 index;
    _BitScanForward64((unsigned long*)&index, x);
    return index;

#elif defined(CAT_ASM_ATT) && defined(CAT_WORD_64)

    u32 retval;

    CAT_ASM_BEGIN
        "BSFq %1, %%rax"
        : "=a" (retval)
        : "r" (x)
        : "cc"
    CAT_ASM_END

    return retval;

#else

    return BSR64(x ^ (x - 1));

#endif
}
u32 cat::BSR32 ( u32  x)

Definition at line 134 of file BitMath.hpp.

Referenced by BSF32().

{
#if defined(CAT_COMPILER_MSVC) && defined(CAT_WORD_64) && !defined(CAT_DEBUG)

    u32 index;
    _BitScanReverse((unsigned long*)&index, x);
    return index;

#elif defined(CAT_ASM_INTEL)

    CAT_ASM_BEGIN
        BSR eax, [x]
    CAT_ASM_END

#elif defined(CAT_ASM_ATT)

    u32 retval;

    CAT_ASM_BEGIN
        "BSRl %1, %%eax"
        : "=a" (retval)
        : "r" (x)
        : "cc"
    CAT_ASM_END

    return retval;

#else

    // Adapted from the Stanford Bit Twiddling Hacks collection
    register u32 shift, r;

    r = (x > 0xFFFF) << 4; x >>= r;
    shift = (x > 0xFF) << 3; x >>= shift; r |= shift;
    shift = (x > 0xF) << 2; x >>= shift; r |= shift;
    shift = (x > 0x3) << 1; x >>= shift; r |= shift;
    r |= (x >> 1);
    return r;

#endif
}
u32 cat::BSR64 ( u64  x)

Definition at line 206 of file BitMath.hpp.

References _BitScanReverse64().

Referenced by BSF64().

{
#if defined(CAT_COMPILER_MSVC) && !defined(CAT_DEBUG) && defined(CAT_WORD_64)

    u32 index;
    _BitScanReverse64((unsigned long*)&index, x);
    return index;

#elif defined(CAT_ASM_ATT) && defined(CAT_WORD_64)

    u32 retval;

    CAT_ASM_BEGIN
        "BSRq %1, %%rax"
        : "=a" (retval)
        : "r" (x)
        : "cc"
    CAT_ASM_END

    return retval;

#else

    // Adapted from the Stanford Bit Twiddling Hacks collection
    register u32 shift, r;

    r = (x > 0xFFFFFFFF) << 5; x >>= r;
    shift = (x > 0xFFFF) << 4; x >>= shift; r |= shift;
    shift = (x > 0xFF) << 3; x >>= shift; r |= shift;
    shift = (x > 0xF) << 2; x >>= shift; r |= shift;
    shift = (x > 0x3) << 1; x >>= shift; r |= shift;
    r |= (u32)(x >> 1);
    return r;

#endif
}
template<class Scalar >
void cat::Clamp ( Scalar &  x,
Scalar  low,
Scalar  high 
)

Definition at line 72 of file Scalar.hpp.

{
    if (x < low) x = low;
    else if (x > high) x = high;
}
void cat::CleanupSockets ( )
CAT_INLINE bool cat::CloseSocket ( Socket  s)

Definition at line 56 of file Sockets.hpp.

{ return !close(s); }
void cat::CopyDesimilarizeString ( const char *  from,
char *  to 
)
bool cat::CreateSocket ( int  type,
int  protocol,
bool  SupportIPv4,
Socket &  out_s,
bool inout_OnlyIPv4 
)
int cat::DecToString ( s32  x,
char *  outs 
)
void cat::DefaultLogCallback ( EventSeverity  severity,
const char *  source,
region_ostringstream &  msg 
)
f64 cat::Deg2Rad ( f64  angle) [inline]

Definition at line 52 of file Scalar.hpp.

References CAT_TWO_PI_64.

{
    return angle * CAT_TWO_PI_64 / 360.0;
}
f32 cat::Deg2Rad ( f32  angle) [inline]

Definition at line 56 of file Scalar.hpp.

References CAT_TWO_PI_32.

{
    return angle * CAT_TWO_PI_32 / 360.0f;
}
char cat::DesimilarizeCharacter ( char  ch)
u32 cat::DesimilarizeFixedString ( char *  str,
u32  max_len 
)
void cat::FatalStop ( const char *  message)
int cat::GetBase64LengthFromBinaryLength ( int  bytes)
int cat::GetBinaryLengthFromBase64Length ( const char *  encoded_buffer,
int  bytes 
)
Port cat::GetBoundPort ( Socket  s)
u32 cat::GetCacheLineBytes ( )
u32 cat::GetFixedStrLen ( const char *  str,
u32  max_len 
)
u8 * cat::GetPostBuffer ( u32  bytes)
template<typename T >
u8* cat::GetTrailingBytes ( T t) [inline]

Definition at line 411 of file Platform.hpp.

References T.

{ return reinterpret_cast<u8*>( t ) + sizeof(T); }
region_string cat::HexDumpString ( const void *  vdata,
u32  bytes 
)
bool cat::InitializeFramework ( const char *  settings_file,
const char *  service_name = 0 
)
f32 cat::InvSqrt ( f32  x)
bool cat::iStrEqual ( const char *  A,
const char *  B 
)
bool cat::IsZeroFixedBuffer ( const void *  buffer,
u32  bytes 
)
void* cat::LoadBitmap ( const char *  path,
u32 &  width,
u32 &  height 
)
void* cat::LoadBitmap ( void *  file,
u32  bytes,
u32 &  width,
u32 &  height 
)
u32 cat::MurmurHash32 ( const void *  key,
int  bytes,
u32  seed 
)
u64 cat::MurmurHash64 ( const void *  key,
int  bytes,
u64  seed 
)
bool cat::NetBind ( Socket  s,
Port  port,
bool  OnlyIPv4 
)
CAT_INLINE u64 cat::NextHighestPow2 ( u64  n)

Definition at line 51 of file BitMath.hpp.

{
    n |= n >> 1;
    n |= n >> 2;
    n |= n >> 4;
    n |= n >> 8;
    n |= n >> 16;
    n |= n >> 32;
    return n + 1;
}
CAT_INLINE u32 cat::NextHighestPow2 ( u32  n)

Definition at line 42 of file BitMath.hpp.

{
    n |= n >> 1;
    n |= n >> 2;
    n |= n >> 4;
    n |= n >> 8;
    n |= n >> 16;
    return n + 1;
}
u32 cat::NLCRand32 ( int  x,
int  y,
u32  seed 
)
float cat::NLCRandNorm ( int  x,
int  y,
u32  seed 
)
template<typename T >
CAT_INLINE T cat::NoChangeNeeded ( const T  t)

Definition at line 41 of file EndianNeutral.hpp.

    {
        return t;
    }
f32 cat::Rad2Deg ( f32  angle) [inline]

Definition at line 64 of file Scalar.hpp.

References CAT_TWO_PI_32.

{
    return angle * 360.0f / CAT_TWO_PI_32;
}
f64 cat::Rad2Deg ( f64  angle) [inline]

Definition at line 60 of file Scalar.hpp.

References CAT_TWO_PI_64.

{
    return angle * 360.0 / CAT_TWO_PI_64;
}
int cat::ReadBase64 ( const char *  encoded_buffer,
int  encoded_bytes,
void *  decoded_buffer,
int  decoded_bytes 
)
int cat::ReadBase64 ( const char *  encoded_buffer,
int  encoded_bytes,
std::ostream &  output 
)
template<int BITS, typename T >
CAT_INLINE T cat::ReconstructCounter ( T  last_accepted_count,
u32  partial_low_bits 
)

Definition at line 87 of file BitMath.hpp.

References T.

{
    const u32 IV_MSB = (1 << BITS); // BITS < 32
    const u32 IV_MASK = (IV_MSB - 1);

    s32 diff = partial_low_bits - (u32)(last_accepted_count & IV_MASK);
    return ((last_accepted_count & ~(T)IV_MASK) | partial_low_bits)
        - (((IV_MSB >> 1) - (diff & IV_MASK)) & IV_MSB)
        + (diff & IV_MSB);
}
void cat::ReleasePostBuffer ( void *  buffer)
void cat::ReportUnexpectedSocketError ( int  error)
void * cat::ResizePostBuffer ( void *  buffer,
u32  newBytes 
)
bool cat::SecureEqual ( const void *  A,
const void *  B,
int  bytes 
)
u32 cat::SetFixedStr ( char *  dest,
u32  dest_len,
const char *  src,
u32  src_max_len 
)
void cat::ShutdownFramework ( bool  WriteSettings = true)
std::string cat::SocketGetErrorString ( int  code)
std::string cat::SocketGetLastErrorString ( )
bool cat::StartupSockets ( )
int cat::WriteBase64 ( const void *  buffer,
int  bytes,
char *  encoded_buffer,
int  encoded_bytes 
)
int cat::WriteBase64 ( const void *  buffer,
int  bytes,
std::ostream &  output 
)
int cat::WriteBase64Str ( const void *  buffer,
int  bytes,
char *  encoded_buffer,
int  encoded_bytes 
)

Variable Documentation

const Leg cat::CAT_LEG_LARGEST = ~(Leg)0

Definition at line 72 of file Legs.hpp.

const Leg cat::CAT_LEG_MSB = (Leg)1 << (CAT_LEG_BITS - 1)

Definition at line 75 of file Legs.hpp.

const int cat::DNSCACHE_MAX_REQS = 8 [static]

Definition at line 52 of file DNSClient.hpp.

const int cat::DNSCACHE_MAX_RESP = 8 [static]

Definition at line 53 of file DNSClient.hpp.

const int cat::DNSCACHE_TIMEOUT = 60000 [static]

Definition at line 54 of file DNSClient.hpp.

const int cat::DNSREQ_MAX_SIMUL = 2048 [static]

Definition at line 51 of file DNSClient.hpp.

const int cat::DNSREQ_REPOST_TIME = 300 [static]

Definition at line 50 of file DNSClient.hpp.

const int cat::DNSREQ_TIMEOUT = 3000 [static]

Definition at line 49 of file DNSClient.hpp.

const int cat::HOSTNAME_MAXLEN = 63 [static]

Definition at line 48 of file DNSClient.hpp.

const Socket cat::INVALID_SOCKET = -1 [static]

Definition at line 54 of file Sockets.hpp.

const int cat::SOCKET_ERROR = -1 [static]

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net