it_bus/string_hash.h

00001 #ifndef _IT_BUS_STRING_HASH_H_
00002 #define _IT_BUS_STRING_HASH_H_
00003 
00004 // @Copyright 2004 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #include <it_bus/types.h>
00008 
00009 
00010 // StringHash and StringEq are functors made for use with the
00011 // IT_HashMap template class.
00012 //
00013 
00014 namespace IT_Bus
00015 {
00016     class IT_AFC_API StringHash
00017     {
00018     public:
00019         StringHash() {}
00020         ~StringHash() {}
00021 
00022         size_t
00023         operator()(
00024             const IT_Bus::String& str
00025         );
00026     };
00027 
00028     class IT_AFC_API StringEq
00029     {
00030     public:
00031         StringEq() {}
00032         ~StringEq() {}
00033 
00034         IT_Bool
00035         operator()(
00036             const IT_Bus::String& s1,
00037             const IT_Bus::String& s2
00038         );
00039     };
00040 }
00041 
00042 inline IT_Bool
00043 IT_Bus::StringEq::operator()(
00044     const IT_Bus::String& s1,
00045     const IT_Bus::String& s2
00046 )
00047 {
00048     return s1 == s2;
00049 }
00050 
00051 #endif  

Generated on Thu Sep 7 11:39:05 2006 for Artix by  doxygen 1.4.7