Gaudi Framework, version v23r6

Home   Generated: Wed Jan 30 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SmartDataObjectPtr.cpp
Go to the documentation of this file.
1 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/src/Lib/SmartDataObjectPtr.cpp,v 1.5 2003/06/25 15:59:40 mato Exp $
2 // ====================================================================
3 // SmartDataObjectPtr.cpp
4 // --------------------------------------------------------------------
5 //
6 // Package :
7 //
8 // Author : Markus Frank
9 //
10 // ====================================================================
11 #define GAUDIKERNEL_SMARTDATAOBJECTPTR_CPP 1
12 
13 // Framework include files
14 #include "GaudiKernel/DataObject.h"
17 
20 }
21 
24 }
25 
28  m_path = copy.m_path;
29  m_pRegistry = copy.m_pRegistry;
31  return *this;
32 }
33 
37  if ( 0 != m_dataProvider && 0 != pRegistry ) {
38  status = m_dataProvider->retrieveObject(pRegistry, path, refpObject);
39  }
40  return status;
41 }
42 
46  if ( 0 != m_dataProvider ) {
47  status = m_dataProvider->retrieveObject(fullPath, refpObject);
48  }
49  return status;
50 }
51 
55  if ( 0 != m_dataProvider && 0 != pDirectory ) {
56  status = m_dataProvider->findObject(pDirectory, path, refpObject);
57  }
58  return status;
59 }
60 
64  if ( 0 != m_dataProvider ) {
65  status = m_dataProvider->findObject(fullPath, refpObject);
66  }
67  return status;
68 }
69 
70 
74  if ( 0 != m_dataProvider && 0 != pRegistry ) {
75  status = m_dataProvider->updateObject(pRegistry);
76  }
77  return status;
78 }
79 
83  if ( 0 != m_dataProvider ) {
84  status = m_dataProvider->updateObject(fullPath);
85  }
86  return status;
87 }
88 
95  DataObject* pObj = 0;
97  if ( m_status.isSuccess() ) {
98  m_pRegistry = pObj->registry();
99  m_path = "";
100  }
101  return pObj;
102 }
103 
110  DataObject* pObj = 0;
111  m_status = (0==m_pRegistry) ? find(m_path,pObj) : find(m_pRegistry,m_path,pObj);
112  if ( m_status.isSuccess() ) {
113  m_pRegistry = pObj->registry();
114  m_path = "";
115  }
116  return pObj;
117 }
118 
125  DataObject* pObj = accessData(); // Have to load AND update if not present.
126  if ( m_status.isSuccess() ) {
128  if ( !m_status.isSuccess() ) pObj = 0;
129  }
130  return pObj;
131 }
132 
146  if ( 0 != object_1.accessData() ) { // Test existence of the first object
147  if ( 0 != object_2.accessData() ) { // Test existence of the second object
148  return true; // Fine: Both objects exist
149  }
150  }
151  return false; // Tough luck: One is missing.
152 }
153 
171  if ( 0 != object_1.accessData() ) { // Test existence of the first object
172  return true;
173  }
174  if ( 0 != object_2.accessData() ) { // Test existence of the second object
175  return true;
176  }
177  return false; // Tough luck: Both are missing.
178 }
179 

Generated at Wed Jan 30 2013 17:13:40 for Gaudi Framework, version v23r6 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004