Key and Value can be registered in a pair. Addition, deletion, reference, and listing can be performed.
Since iterater is held inside, it is not thread safe. Please do not call the same instance from two or more threads. In order to make it thread safe, please inherit this class and carry out the override of a SeekTo function and the Get function. MyContentType.h in a CEHTTP source file will be consulted.
|key1|\0|value1|\0|key2|\0|value2|...|keyN|\0|valueN|\0|\0|
- A terminus is |\0|\0|
- and value permit \0
- Key does not permit \0.
MyHash |
---|
+GetBuffer : const void* |
+GetLength() : int |
+SeekToFirst() : char* |
+SeekToKey(in char* pszKey) : char* |
+SeekToKeyI(in char* pszKey) : char* |
+GetCurrentKey() : char* |
+ GetCurrentValue() char* |
+ SeekNext() char* |
+ Clear() void |
+ Set(in char* pszKey, in char* pszValue ) : int |
+ Del(in char* pszKey) : int |
+ GetValue(in char* pszKey ) char* |
+ GetValueI(in char* pszKey) : char* |
The pointer of the allocated memory is returned. With a Set(), a Del(), etc., this pointer becomes invalid.
The length of the memory pointer which the class has allocated is returned.
Internal iterater is set to a head.
The given key string is looked for and a corresponding value character sequence is returned. NULL is returned when there is no key string.
The given key string is looked for and a corresponding value character sequence is returned. NULL is returned when there is no key character sequence. This function does not distinguish a capital letter small letter.
Since the multi-byte character sequence is not taken into consideration, operation in that case is unfixed.
The present key string which internal iterater has pointed out is returned.
The present value string which internal iterater has pointed out is returned.
Internal iterater is advanced. NULL is returned when it is in the last end.
Free the memory.
A key and a value string are set. A value is overwritten when the key string is already set. In this case, since rearrangement of an internal memory is occurs, the pointer acquired by GetCurrentKey(), GetCurrentValue(), GetBuffer(), SeekToKey(), SeekToKeyI() becomes invalid. This function distinguishes a capital letter small letter.
The specified key string and its corresponding value character sequence are deleted. n this case, since rearrangement of an internal memory is occurs.
The specified key string is searched and a corresponding value character sequence is returned.
The specified key string is searched and a corresponding value character sequence is returned. This function does not distinguish a capital letter small letter.