All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ToolHandleInfo Class Reference

General info and helper functions for toolhandles and arrays. More...

#include <GaudiKernel/ToolHandle.h>

Inheritance diagram for ToolHandleInfo:
Collaboration diagram for ToolHandleInfo:

Public Member Functions

virtual ~ToolHandleInfo ()
 
bool isPublic () const
 
bool createIf () const
 
const IInterfaceparent () const
 
const std::string toolComponentType (const IInterface *parent) const
 
const std::string toolParentName (const IInterface *parent) const
 

Protected Member Functions

 ToolHandleInfo (const IInterface *parent=0, bool createIf=true)
 

Private Attributes

const IInterfacem_parent
 
bool m_createIf
 

Detailed Description

General info and helper functions for toolhandles and arrays.

Definition at line 21 of file ToolHandle.h.

Constructor & Destructor Documentation

ToolHandleInfo::ToolHandleInfo ( const IInterface parent = 0,
bool  createIf = true 
)
inlineprotected

Definition at line 23 of file ToolHandle.h.

24  : m_parent(parent), m_createIf(createIf)
25  {}
bool createIf() const
Definition: ToolHandle.h:34
const IInterface * m_parent
Definition: ToolHandle.h:65
virtual ToolHandleInfo::~ToolHandleInfo ( )
inlinevirtual

Definition at line 28 of file ToolHandle.h.

28 {};

Member Function Documentation

bool ToolHandleInfo::createIf ( ) const
inline

Definition at line 34 of file ToolHandle.h.

34  {
35  return m_createIf;
36  }
bool ToolHandleInfo::isPublic ( ) const
inline

Definition at line 30 of file ToolHandle.h.

30  {
31  return !m_parent;
32  }
const IInterface * m_parent
Definition: ToolHandle.h:65
const IInterface* ToolHandleInfo::parent ( ) const
inline

Definition at line 38 of file ToolHandle.h.

38  {
39  return m_parent;
40  }
const IInterface * m_parent
Definition: ToolHandle.h:65
const std::string ToolHandleInfo::toolComponentType ( const IInterface parent) const
inline

Definition at line 45 of file ToolHandle.h.

45  {
46  return parent ? "PrivateTool" : "PublicTool";
47  }
const std::string ToolHandleInfo::toolParentName ( const IInterface parent) const
inline

Definition at line 49 of file ToolHandle.h.

49  {
50  if (parent) {
51  //SmartIF<INamedInterface> pNamed(const_cast<IInterface*>(parent));
52  //if (pNamed.isValid()) {
53  const INamedInterface* pNamed = dynamic_cast<const INamedInterface*>(parent);
54  if (pNamed) {
55  return pNamed->name();
56  } else {
57  return "";
58  }
59  } else {
60  return "ToolSvc";
61  }
62  }
virtual const std::string & name() const =0
Retrieve the name of the instance.
const IInterface * parent() const
Definition: ToolHandle.h:38
IInterface compliant class extending IInterface with the name() method.

Member Data Documentation

bool ToolHandleInfo::m_createIf
private

Definition at line 66 of file ToolHandle.h.

const IInterface* ToolHandleInfo::m_parent
private

Definition at line 65 of file ToolHandle.h.


The documentation for this class was generated from the following file: