CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes
edm::ESParentContext Class Reference

#include <ESParentContext.h>

Classes

union  Parent
 

Public Types

enum  Type { Type::kModule, Type::kESModule, Type::kInvalid }
 

Public Member Functions

ESModuleCallingContext const * esmoduleCallingContext () const
 
 ESParentContext ()
 
 ESParentContext (ModuleCallingContext const *) noexcept
 
 ESParentContext (ESModuleCallingContext const *) noexcept
 
ModuleCallingContext const * moduleCallingContext () const
 
Type type () const noexcept
 

Private Attributes

union edm::ESParentContext::Parent parent_
 
Type type_
 

Detailed Description

Description: This is intended to be used as a member of ESModuleCallingContext.

Usage:

Definition at line 21 of file ESParentContext.h.

Member Enumeration Documentation

◆ Type

Enumerator
kModule 
kESModule 
kInvalid 

Definition at line 23 of file ESParentContext.h.

23 { kModule, kESModule, kInvalid };

Constructor & Destructor Documentation

◆ ESParentContext() [1/3]

edm::ESParentContext::ESParentContext ( )

Definition at line 11 of file ESParentContext.cc.

References edm::ESParentContext::Parent::esmodule, and parent_.

11 : type_(Type::kInvalid) { parent_.esmodule = nullptr; }
union edm::ESParentContext::Parent parent_
ESModuleCallingContext const * esmodule

◆ ESParentContext() [2/3]

edm::ESParentContext::ESParentContext ( ModuleCallingContext const *  module)
explicitnoexcept

Definition at line 13 of file ESParentContext.cc.

References callgraph::module.

13  : type_(Type::kModule) {
15  }
union edm::ESParentContext::Parent parent_
ModuleCallingContext const * module

◆ ESParentContext() [3/3]

edm::ESParentContext::ESParentContext ( ESModuleCallingContext const *  module)
explicitnoexcept

Definition at line 17 of file ESParentContext.cc.

References callgraph::module.

19  }
union edm::ESParentContext::Parent parent_
ESModuleCallingContext const * esmodule

Member Function Documentation

◆ esmoduleCallingContext()

ESModuleCallingContext const * edm::ESParentContext::esmoduleCallingContext ( ) const

Definition at line 29 of file ESParentContext.cc.

References edm::ESParentContext::Parent::esmodule, Exception, kESModule, edm::errors::LogicError, parent_, and type_.

Referenced by edm::ESModuleCallingContext::esmoduleCallingContext().

29  {
30  if (type_ != Type::kESModule) {
32  << "ESParentContext::esmoduleCallingContext called for incorrect type of context";
33  }
34  return parent_.esmodule;
35  }
union edm::ESParentContext::Parent parent_
ESModuleCallingContext const * esmodule

◆ moduleCallingContext()

ModuleCallingContext const * edm::ESParentContext::moduleCallingContext ( ) const

Definition at line 21 of file ESParentContext.cc.

References Exception, kModule, edm::errors::LogicError, edm::ESParentContext::Parent::module, parent_, and type_.

Referenced by edm::ESModuleCallingContext::moduleCallingContext().

21  {
22  if (type_ != Type::kModule) {
24  << "ESParentContext::moduleCallingContext called for incorrect type of context";
25  }
26  return parent_.module;
27  }
union edm::ESParentContext::Parent parent_
ModuleCallingContext const * module

◆ type()

Type edm::ESParentContext::type ( ) const
inlinenoexcept

Definition at line 29 of file ESParentContext.h.

References type_.

Referenced by edm::ESModuleCallingContext::type().

29 { return type_; }

Member Data Documentation

◆ parent_

union edm::ESParentContext::Parent edm::ESParentContext::parent_
private

◆ type_

Type edm::ESParentContext::type_
private