00001
00002 #ifndef Address_H
00003 #define Address_H 1
00004
00005
00006
00007 #include <string>
00008 #include <vector>
00009 #include "GaudiKernel/StatusCode.h"
00010 #include "GaudiKernel/GenericAddress.h"
00011
00012
00013
00014 class IDataDirectory;
00015
00016
00017
00018 extern unsigned const char SICB_StorageType;
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 class Address : public GenericAddress {
00032 public:
00033
00034
00036 class Entry {
00037 public:
00038 int m_id;
00039 int* m_ptr;
00040 void* m_obj;
00041 Entry(int id, int* ptr, void* obj) : m_id(id), m_ptr(ptr), m_obj(obj) {
00042 }
00043 int id() {
00044 return m_id;
00045 }
00046 int* pointer() {
00047 return m_ptr;
00048 }
00049 template <class TYPE> void loadPointer(TYPE*& pObject) {
00050 pObject = static_cast<TYPE*>(m_obj);
00051 }
00052 };
00053 typedef std::vector<Entry> References;
00054
00055 protected:
00056 References m_refs;
00057 int m_recid;
00058 public:
00060 StatusCode validate();
00062 Address(const CLID& cl, const std::string& fname, int recid, const std::string& bank);
00064 Address(const GenericLink& link);
00066 Address(const GenericLink* link);
00068 virtual ~Address() {
00069 }
00070 };
00071
00072
00073 #endif // Address_H