Panda3D

Loading...
Searching...
No Matches
checksumHashGenerator.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file checksumHashGenerator.h
10 * @author drose
11 * @date 2001-05-14
12 */
13
14#ifndef CHECKSUMHASHGENERATOR_H
15#define CHECKSUMHASHGENERATOR_H
16
17#include "pandabase.h"
18
19#include "hashGeneratorBase.h"
20
21/**
22 * This is a specific kind of HashGenerator that simply adds up all of the
23 * ints. Nothing fancy, and pretty quick.
24 */
25 class EXPCL_PANDA_EXPRESS ChecksumHashGenerator : public HashGeneratorBase {
26 public:
27 INLINE void add_int(long num);
28 INLINE void add_bool(bool flag);
29 INLINE void add_fp(float num, float threshold);
30 INLINE void add_fp(double num, double threshold);
31 INLINE void add_pointer(void *ptr);
32 void add_string(const std::string &str);
33};
34
35#include "checksumHashGenerator.I"
36
37#endif
checksumHashGenerator.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ChecksumHashGenerator
This is a specific kind of HashGenerator that simply adds up all of the ints.
Definition checksumHashGenerator.h:25
ChecksumHashGenerator::add_int
void add_int(long num)
Adds another integer to the hash so far.
Definition checksumHashGenerator.I:28
ChecksumHashGenerator::add_pointer
void add_pointer(void *ptr)
Adds a pointer, derived simply by casting the pointer to an integer.
Definition checksumHashGenerator.I:63
ChecksumHashGenerator::add_string
void add_string(const std::string &str)
Adds a string to the hash, by breaking it down into a sequence of integers.
Definition checksumHashGenerator.cxx:20
ChecksumHashGenerator::add_fp
void add_fp(float num, float threshold)
Adds a floating-point number, first converting it to fixed point by dividing it by the indicated thre...
Definition checksumHashGenerator.I:45
ChecksumHashGenerator::add_bool
void add_bool(bool flag)
Adds a boolean flag.
Definition checksumHashGenerator.I:36
hashGeneratorBase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.