Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __PLCORE_CONTAINER_FUNCTIONS_H__
00025 #define __PLCORE_CONTAINER_FUNCTIONS_H__
00026 #pragma once
00027
00028
00029
00030
00031
00032 #include "PLCore/PLCore.h"
00033
00034
00035
00036
00037
00038 namespace PLCore {
00039
00040
00041
00042
00043
00044 class String;
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 class HashFunction {
00055
00056
00057
00058
00059
00060 public:
00061 static PLCORE_API uint32 Hash(const int32 &nKey);
00062 static PLCORE_API uint32 Hash(const uint32 &nKey);
00063 static PLCORE_API uint32 Hash(const int64 &nKey);
00064 static PLCORE_API uint32 Hash(const uint64 &nKey);
00065 static PLCORE_API uint32 Hash(const char *pszKey);
00066 static PLCORE_API uint32 Hash(const String &sKey);
00067
00068
00069 };
00070
00071
00072
00073
00074
00075 class CompareFunction {
00076
00077
00078
00079
00080
00081 public:
00082
00083 static PLCORE_API bool AreEqual(const int32 &nKey1, const int32 &nKey2);
00084 static PLCORE_API bool IsGreater(const int32 &nKey1, const int32 &nKey2);
00085
00086
00087 static PLCORE_API bool AreEqual(const uint32 &nKey1, const uint32 &nKey2);
00088 static PLCORE_API bool IsGreater(const uint32 &nKey1, const uint32 &nKey2);
00089
00090
00091 static PLCORE_API bool AreEqual(const int64 &nKey1, const int64 &nKey2);
00092 static PLCORE_API bool IsGreater(const int64 &nKey1, const int64 &nKey2);
00093
00094
00095 static PLCORE_API bool AreEqual(const uint64 &nKey1, const uint64 &nKey2);
00096 static PLCORE_API bool IsGreater(const uint64 &nKey1, const uint64 &nKey2);
00097
00098
00099 static PLCORE_API bool AreEqual(const float &fKey1, const float &fKey2);
00100 static PLCORE_API bool IsGreater(const float &fKey1, const float &fKey2);
00101
00102
00103 static PLCORE_API bool AreEqual(const char *pszKey1, const char *pszKey2);
00104 static PLCORE_API bool IsGreater(const char *pszKey1, const char *pszKey2);
00105
00106
00107 static PLCORE_API bool AreEqual(const String &sKey1, const String &sKey2);
00108 static PLCORE_API bool IsGreater(const String &sKey1, const String &sKey2);
00109
00110
00111 };
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121 class GrowFunction {
00122
00123
00124
00125
00126
00127 public:
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140 static PLCORE_API uint32 GetNewSize(uint32 nCurrentSize, uint32 nFreeSlots);
00141
00142
00143 };
00144
00145
00146
00147
00148
00149 }
00150
00151
00152 #endif // __PLCORE_CONTAINER_FUNCTIONS_H__