#include "GaudiKernel/Kernel.h"#include "GaudiKernel/StatusCode.h"#include <ostream>Include dependency graph for IInterface.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Classes | |
| class | InterfaceID |
| Interface ID class. More... | |
| class | IInterface |
| Definition of the basic interface. More... | |
Functions | |
| template<class I> | |
| bool | isValidInterface (I *i) |
| Templated function that throws an exception if the version if the interface implemented by the object behind the interface is incompatible. | |
| std::ostream & | operator<< (std::ostream &s, const InterfaceID &id) |
| ostream operator for InterfaceID. Needed by PluginSvc | |
| template<class DEST, class SRC> | |
| DEST ** | pp_cast (SRC **ptr) |
| Small function to be used instead of the construct (void**)&pointer, which produces, on gcc 4.1 optimized, the warning <quote>warning: dereferencing type-punned pointer will break strict-aliasing rules</quote> The assempler code produced is equivalent to the one with the direct cast. | |
Variables | |
| static const InterfaceID | IID_IInterface (1, 0, 0) |
| Typedef for backward compatibility on existing code. | |
| bool isValidInterface | ( | I * | i | ) |
Templated function that throws an exception if the version if the interface implemented by the object behind the interface is incompatible.
This is the case if the major version differs or that the minor version of the client is bigger than of the implementer.
Definition at line 133 of file IInterface.h.
00133 { 00134 void* ii; 00135 StatusCode sc = i->queryInterface( I::interfaceID(), &ii); 00136 return sc.isSuccess(); 00137 }
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const InterfaceID & | id | |||
| ) | [inline] |
| DEST** pp_cast | ( | SRC ** | ptr | ) | [inline] |
Small function to be used instead of the construct (void**)&pointer, which produces, on gcc 4.1 optimized, the warning <quote>warning: dereferencing type-punned pointer will break strict-aliasing rules</quote> The assempler code produced is equivalent to the one with the direct cast.
The function can be used als to replace the construct (IInterface *&)m_MySvc. Replacement rules:
(void**)&pointer | pp_cast<void>(&pointer) |
(IInterface *&)m_mySvc | *pp_cast<IInterface>(&m_mySvc) |
Definition at line 156 of file IInterface.h.
const InterfaceID IID_IInterface(1, 0, 0) [static] |
Typedef for backward compatibility on existing code.
1.4.7