it_bus/integer_map.h

00001 #ifndef _IT_BUS_INTEGER_HASHMAP_H_
00002 #define _IT_BUS_INTEGER_HASHMAP_H_
00003 
00004 //      @Copyright 2003 IONA Technologies, Plc. All Rights Reserved.
00005 //
00006 
00007 #include <it_dsa/hash_map.h>
00008 #include <it_bus/types.h>
00009 
00010 #include <it_bus/api_defines.h>
00011 
00012 namespace IT_Bus
00013 {
00014     class IntHash;
00015     class IntEq;
00016     
00017     template <class T>
00018         class IntegerHashMap : public IT_HashMap<IT_Bus::Int, T, IntHash, IntEq>
00019         {
00020         };
00021     
00022     class IntHash
00023     {
00024       public:
00025         IntHash(){}
00026         ~IntHash(){}
00027         
00028         size_t
00029         operator()(const IT_Bus::Int& in);
00030     };
00031     
00032     inline size_t
00033         IntHash::operator() (
00034             const IT_Bus::Int& in
00035         )
00036         {
00037             return in;
00038         }
00039     
00040     class IntEq
00041     {
00042       public:
00043         IntEq(){}
00044         ~IntEq(){}
00045         
00046         IT_Bus::Boolean
00047         operator()(const IT_Bus::Int& in1, const IT_Bus::Int& in2);
00048     };
00049     
00050     inline IT_Bus::Boolean
00051         IntEq::operator() (
00052             const IT_Bus::Int& in1,
00053             const IT_Bus::Int& in2
00054         )
00055         {
00056             return (in1 == in2);
00057         }
00058 }
00059 
00060 #endif 

Generated on Tue Mar 20 15:27:41 2007 for Artix by  doxygen 1.5.1-p1