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 #ifndef _SECSTRING_H
00024 #define _SECSTRING_H
00025
00026 #ifdef HAVE_CONFIG_H
00027 # include <config.h>
00028 #endif
00029
00030 #ifdef HAVE_STRING_H
00031 # include <string.h>
00032 #endif
00033
00034 #ifdef HAVE_MEMORY
00035 # include <memory>
00036 #endif
00037
00038 #ifdef HAVE_STRING
00039 # include <string>
00040 #endif
00041
00050 namespace YAPET {
00051 namespace UI {
00052
00059 template <class T>
00060 class secallocator: public std::allocator<T> {
00061 public:
00062 void deallocate (typename std::allocator<T>::pointer p,
00063 typename std::allocator<T>::size_type n) {
00064 memset (p, '0', n*sizeof (std::allocator<T>::value_type) );
00065 std::allocator<T>::deallocate (p, n);
00066 }
00067
00068 };
00069
00076 typedef std::basic_string<char, std::char_traits<char>, secallocator<char> > secstring;
00077
00078 }
00079 }
00080 #endif // _SECSTRING_H