Shadowrun: Awakened 29 September 2011 - Build 871
Public Member Functions | Protected Attributes
CheckSum Class Reference

Generates and validates checksums.

#include <CheckSum.h>

List of all members.

Public Member Functions

void Add (unsigned int w)
void Add (unsigned short w)
void Add (unsigned char *b, unsigned int length)
void Add (unsigned char b)
 CheckSum ()
 Default constructor.
void Clear ()
unsigned int Get ()

Protected Attributes

unsigned short c1
unsigned short c2
unsigned short r
unsigned int sum

Detailed Description

Definition at line 12 of file CheckSum.h.


Constructor & Destructor Documentation

CheckSum::CheckSum ( ) [inline]

Definition at line 19 of file CheckSum.h.

References Clear().

    {
        Clear();
    }

Member Function Documentation

void CheckSum::Add ( unsigned int  w)
void CheckSum::Add ( unsigned char *  b,
unsigned int  length 
)
void CheckSum::Add ( unsigned char  b)
void CheckSum::Add ( unsigned short  w)
void CheckSum::Clear ( ) [inline]

Definition at line 24 of file CheckSum.h.

References c1, c2, r, and sum.

Referenced by CheckSum().

    {
        sum = 0;
        r = 55665;
        c1 = 52845;
        c2 = 22719;
    }
unsigned int CheckSum::Get ( ) [inline]

Definition at line 41 of file CheckSum.h.

References sum.

    {
        return sum;
    }

Member Data Documentation

unsigned short CheckSum::c1 [protected]

Definition at line 48 of file CheckSum.h.

Referenced by Clear().

unsigned short CheckSum::c2 [protected]

Definition at line 49 of file CheckSum.h.

Referenced by Clear().

unsigned short CheckSum::r [protected]

Definition at line 47 of file CheckSum.h.

Referenced by Clear().

unsigned int CheckSum::sum [protected]

Definition at line 50 of file CheckSum.h.

Referenced by Clear(), and Get().


The documentation for this class was generated from the following file:

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