SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
CheckSum Class Reference

Generates and validates checksums. More...

`#include <slikenet/CheckSum.h>`

## Public Member Functions

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

## Protected Attributes

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

## Detailed Description

Generates and validates checksums.

Definition at line 27 of file CheckSum.h.

## Constructor & Destructor Documentation

CheckSum::CheckSum | ( |  | ) |

inline

Default constructor.

Definition at line 34 of file CheckSum.h.

References Clear().

## Member Function Documentation

void CheckSum::Add | ( | unsigned int | w | ) |

Definition at line 33 of file CheckSum.cpp.

Referenced by Add().

void CheckSum::Add | ( | unsigned short | w | ) |

Definition at line 60 of file CheckSum.cpp.

References Add().

void CheckSum::Add | ( | unsigned char * | b,
|  | unsigned int | length
| ) |  |

Definition at line 106 of file CheckSum.cpp.

References Add().

void CheckSum::Add | ( | unsigned char | b | ) |

Definition at line 87 of file CheckSum.cpp.

References c1, c2, r, and sum.

void CheckSum::Clear | ( |  | ) |

inline

Definition at line 39 of file CheckSum.h.

References c1, c2, r, and sum.

Referenced by CheckSum().

unsigned int CheckSum::Get | ( |  | ) |

inline

Definition at line 56 of file CheckSum.h.

References sum.

## Member Data Documentation

unsigned short CheckSum::c1

protected

Definition at line 63 of file CheckSum.h.

Referenced by Add(), and Clear().

unsigned short CheckSum::c2

protected

Definition at line 64 of file CheckSum.h.

Referenced by Add(), and Clear().

unsigned short CheckSum::r

protected

Definition at line 62 of file CheckSum.h.

Referenced by Add(), and Clear().

unsigned int CheckSum::sum

protected

Definition at line 65 of file CheckSum.h.

Referenced by Add(), Clear(), and Get().

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

- Source/include/slikenet/CheckSum.h
- Source/src/CheckSum.cpp