Panda3D

checksumHashGenerator.cxx
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.cxx
10 * @author drose
11 * @date 2001-05-14
12 */
13
14 #include "checksumHashGenerator.h"
15
16 /**
17 * Adds a string to the hash, by breaking it down into a sequence of integers.
18 */
19 void ChecksumHashGenerator::
20 add_string(const std::string &str) {
21 add_int(str.length());
22 std::string::const_iterator si;
23 for (si = str.begin(); si != str.end(); ++si) {
24 add_int(*si);
25 }
26 }
checksumHashGenerator.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ChecksumHashGenerator::add_int
void add_int(long num)
Adds another integer to the hash so far.
Definition: checksumHashGenerator.I:28
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