CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Private Attributes
edm::ParentContext Class Reference

#include <ParentContext.h>

Classes

union  Parent
 

Public Types

enum  Type {
  Type::kGlobal, Type::kInternal, Type::kModule, Type::kPlaceInPath,
  Type::kStream, Type::kInvalid
}
 

Public Member Functions

GlobalContext const * globalContext () const
 
InternalContext const * internalContext () const
 
ModuleCallingContext const * moduleCallingContext () const
 
 ParentContext ()
 
 ParentContext (GlobalContext const *)
 
 ParentContext (InternalContext const *)
 
 ParentContext (ModuleCallingContext const *)
 
 ParentContext (PlaceInPathContext const *)
 
 ParentContext (StreamContext const *)
 
PlaceInPathContext const * placeInPathContext () const
 
StreamContext const * streamContext () const
 
Type type () const
 

Private Attributes

union edm::ParentContext::Parent parent_
 
Type type_
 

Detailed Description

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

Usage:

Definition at line 27 of file ParentContext.h.

Member Enumeration Documentation

Enumerator
kGlobal 
kInternal 
kModule 
kPlaceInPath 
kStream 
kInvalid 

Definition at line 30 of file ParentContext.h.

30  {
31  kGlobal,
32  kInternal,
33  kModule,
34  kPlaceInPath,
35  kStream,
36  kInvalid
37  };

Constructor & Destructor Documentation

edm::ParentContext::ParentContext ( )

Definition at line 14 of file ParentContext.cc.

References edm::ParentContext::Parent::global, and parent_.

14  :
16  parent_.global = nullptr;
17  }
union edm::ParentContext::Parent parent_
GlobalContext const * global
Definition: ParentContext.h:58
edm::ParentContext::ParentContext ( GlobalContext const *  global)

Definition at line 19 of file ParentContext.cc.

References edm::ParentContext::Parent::global, and parent_.

19  :
21  parent_.global = global;
22  }
union edm::ParentContext::Parent parent_
GlobalContext const * global
Definition: ParentContext.h:58
edm::ParentContext::ParentContext ( InternalContext const *  internal)

Definition at line 24 of file ParentContext.cc.

References edm::ParentContext::Parent::internal, and parent_.

24  :
26  parent_.internal = internal;
27  }
union edm::ParentContext::Parent parent_
InternalContext const * internal
Definition: ParentContext.h:59
edm::ParentContext::ParentContext ( ModuleCallingContext const *  module)

Definition at line 29 of file ParentContext.cc.

References edm::ParentContext::Parent::module, python.rootplot.argparse::module, and parent_.

29  :
32  }
ModuleCallingContext const * module
Definition: ParentContext.h:60
union edm::ParentContext::Parent parent_
edm::ParentContext::ParentContext ( PlaceInPathContext const *  placeInPath)

Definition at line 34 of file ParentContext.cc.

References parent_, and edm::ParentContext::Parent::placeInPath.

34  :
36  parent_.placeInPath = placeInPath;
37  }
union edm::ParentContext::Parent parent_
PlaceInPathContext const * placeInPath
Definition: ParentContext.h:61
edm::ParentContext::ParentContext ( StreamContext const *  stream)

Definition at line 39 of file ParentContext.cc.

References parent_, and edm::ParentContext::Parent::stream.

39  :
41  parent_.stream = stream;
42  }
union edm::ParentContext::Parent parent_
StreamContext const * stream
Definition: ParentContext.h:62

Member Function Documentation

GlobalContext const * edm::ParentContext::globalContext ( ) const

Definition at line 72 of file ParentContext.cc.

References edm::hlt::Exception, edm::ParentContext::Parent::global, kGlobal, edm::errors::LogicError, parent_, and type_.

Referenced by edm::ModuleCallingContext::globalContext(), and edm::operator<<().

72  {
73  if(type_ != Type::kGlobal) {
75  << "ParentContext::globalContext called for incorrect type of context";
76  }
77  return parent_.global;
78  }
union edm::ParentContext::Parent parent_
GlobalContext const * global
Definition: ParentContext.h:58
InternalContext const * edm::ParentContext::internalContext ( ) const

Definition at line 81 of file ParentContext.cc.

References edm::hlt::Exception, edm::ParentContext::Parent::internal, kInternal, edm::errors::LogicError, parent_, and type_.

Referenced by edm::ModuleCallingContext::internalContext(), and edm::operator<<().

81  {
82  if(type_ != Type::kInternal) {
84  << "ParentContext::internalContext called for incorrect type of context";
85  }
86  return parent_.internal;
87  }
union edm::ParentContext::Parent parent_
InternalContext const * internal
Definition: ParentContext.h:59
ModuleCallingContext const * edm::ParentContext::moduleCallingContext ( ) const

Definition at line 45 of file ParentContext.cc.

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

Referenced by edm::ModuleCallingContext::moduleCallingContext(), and edm::operator<<().

45  {
46  if(type_ != Type::kModule) {
48  << "ParentContext::moduleCallingContext called for incorrect type of context";
49  }
50  return parent_.module;
51  }
ModuleCallingContext const * module
Definition: ParentContext.h:60
union edm::ParentContext::Parent parent_
PlaceInPathContext const * edm::ParentContext::placeInPathContext ( ) const

Definition at line 54 of file ParentContext.cc.

References edm::hlt::Exception, kPlaceInPath, edm::errors::LogicError, parent_, edm::ParentContext::Parent::placeInPath, and type_.

Referenced by edm::operator<<(), and edm::ModuleCallingContext::placeInPathContext().

54  {
55  if(type_ != Type::kPlaceInPath) {
57  << "ParentContext::placeInPathContext called for incorrect type of context";
58  }
59  return parent_.placeInPath;
60  }
union edm::ParentContext::Parent parent_
PlaceInPathContext const * placeInPath
Definition: ParentContext.h:61
StreamContext const * edm::ParentContext::streamContext ( ) const

Definition at line 63 of file ParentContext.cc.

References edm::hlt::Exception, kStream, edm::errors::LogicError, parent_, edm::ParentContext::Parent::stream, and type_.

Referenced by edm::operator<<(), and edm::ModuleCallingContext::streamContext().

63  {
64  if(type_ != Type::kStream) {
66  << "ParentContext::streamContext called for incorrect type of context";
67  }
68  return parent_.stream;
69  }
union edm::ParentContext::Parent parent_
StreamContext const * stream
Definition: ParentContext.h:62
Type edm::ParentContext::type ( ) const
inline

Definition at line 46 of file ParentContext.h.

References type_.

Referenced by cuy.ValElement::__init__(), edm::operator<<(), and edm::ModuleCallingContext::type().

46 { return type_; }

Member Data Documentation

union edm::ParentContext::Parent edm::ParentContext::parent_
private
Type edm::ParentContext::type_
private