CMS 3D CMS Logo

Sym.h

Go to the documentation of this file.
00001 #ifndef FWCore_Services_Sym_h
00002 #define FWCore_Services_Sym_h
00003 
00004 #include <iosfwd>
00005 #include <string>
00006 
00007 #include <dlfcn.h>
00008 
00009 struct Sym
00010 {
00011   typedef void* address_type;
00012 
00013   Sym(Dl_info const& info, void* addr) :
00014     name_(),
00015     library_(),
00016     id_(),
00017     addr_(reinterpret_cast<address_type>(addr))
00018   {
00019     
00020   }
00021 
00022 
00023 
00024   Sym() :
00025     name_(),
00026     library_(),
00027     id_(),
00028     addr_()
00029   {  }
00030 
00031   explicit Sym(int id) :
00032     name_(),
00033     library_(),
00034     id_(id),
00035     addr_()
00036   { }
00037   
00038   std::string  name_;
00039   std::string  library_;
00040   int          id_;
00041   address_type addr_;
00042 
00043   static int next_id_;
00044 
00045   bool 
00046   operator<(address_type b) const
00047   { return addr_ < b; }
00048 
00049   bool 
00050   operator<(const Sym& b) const
00051   { return addr_ < b.addr_; }
00052 };
00053 
00054 std::ostream&
00055 operator<< (std::ostream& os, Sym const& s);
00056 
00057 inline 
00058 bool 
00059 operator<(Sym::address_type a, const Sym& b)
00060 { return a < b.addr_; }
00061 
00062 
00063 #endif 

Generated on Tue Jun 9 17:36:40 2009 for CMSSW by  doxygen 1.5.4