sipxportlib  Version 3.3
UtlCrc32.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 
12 #ifndef _UrlCrc32_h_
13 #define _UrlCrc32_h_
14 
15 // SYSTEM INCLUDES
16 // APPLICATION INCLUDES
17 #include "os/OsDefs.h"
18 #include "utl/UtlString.h"
19 
20 // DEFINES
21 // MACROS
22 // EXTERNAL FUNCTIONS
23 // EXTERNAL VARIABLES
24 // CONSTANTS
25 // STRUCTS
26 // TYPEDEFS
27 // FORWARD DECLARATIONS
28 
32 class UtlCrc32
33 {
34 /* //////////////////////////// PUBLIC //////////////////////////////////// */
35 public:
36 
40  UtlCrc32() ;
41 
42 /* ============================ CREATORS ================================== */
43 
44 /* ============================ MANIPULATORS ============================== */
45 
49  void reset() ;
50 
54  void calc(unsigned char ch) ;
55 
59  void calc(unsigned char* pData, size_t nData) ;
60 
64  void calc(const UtlString& data) ;
65 
66 /* ============================ ACCESSORS ================================= */
67 
71  unsigned long getValue() const ;
72 
73 /* ============================ INQUIRY =================================== */
74 
75 /* //////////////////////////// PROTECTED ///////////////////////////////// */
76 protected:
77  unsigned long mCrc ;
78 
79 /* //////////////////////////// PRIVATE /////////////////////////////////// */
80 private:
81 
82  UtlCrc32(const UtlCrc32& rUtlCrc32);
83  //:Copy constructor (not implemented for this class)
84 
85  UtlCrc32& operator=(const UtlCrc32& rhs);
86  //:Assignment operator (not implemented for this class)
87 
88 };
89 
90 /* ============================ INLINE METHODS ============================ */
91 
92 #endif // _UrlCrc32_h_
unsigned long getValue() const
Definition: UtlCrc32.cpp:145
unsigned long mCrc
Definition: UtlCrc32.h:77
Definition: UtlString.h:48
void reset()
Definition: UtlCrc32.cpp:117
Definition: UtlCrc32.h:32
UtlCrc32()
Definition: UtlCrc32.cpp:110
void calc(unsigned char ch)
Definition: UtlCrc32.cpp:123