CMS 3D CMS Logo

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
 
bool isAtEndTransition () 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 15 of file ParentContext.cc.

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

15  :
17  parent_.global = nullptr;
18  }
union edm::ParentContext::Parent parent_
GlobalContext const * global
Definition: ParentContext.h:60
edm::ParentContext::ParentContext ( GlobalContext const *  global)

Definition at line 20 of file ParentContext.cc.

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

20  :
22  parent_.global = global;
23  }
union edm::ParentContext::Parent parent_
GlobalContext const * global
Definition: ParentContext.h:60
edm::ParentContext::ParentContext ( InternalContext const *  internal)

Definition at line 25 of file ParentContext.cc.

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

25  :
27  parent_.internal = internal;
28  }
union edm::ParentContext::Parent parent_
InternalContext const * internal
Definition: ParentContext.h:61
edm::ParentContext::ParentContext ( ModuleCallingContext const *  module)

Definition at line 30 of file ParentContext.cc.

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

30  :
33  }
ModuleCallingContext const * module
Definition: ParentContext.h:62
union edm::ParentContext::Parent parent_
Definition: vlib.h:208
edm::ParentContext::ParentContext ( PlaceInPathContext const *  placeInPath)

Definition at line 35 of file ParentContext.cc.

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

35  :
37  parent_.placeInPath = placeInPath;
38  }
union edm::ParentContext::Parent parent_
PlaceInPathContext const * placeInPath
Definition: ParentContext.h:63
edm::ParentContext::ParentContext ( StreamContext const *  stream)

Definition at line 40 of file ParentContext.cc.

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

40  :
42  parent_.stream = stream;
43  }
union edm::ParentContext::Parent parent_
StreamContext const * stream
Definition: ParentContext.h:64

Member Function Documentation

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

Definition at line 73 of file ParentContext.cc.

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

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

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

Definition at line 82 of file ParentContext.cc.

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

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

82  {
83  if(type_ != Type::kInternal) {
85  << "ParentContext::internalContext called for incorrect type of context";
86  }
87  return parent_.internal;
88  }
union edm::ParentContext::Parent parent_
InternalContext const * internal
Definition: ParentContext.h:61
bool edm::ParentContext::isAtEndTransition ( ) const

Definition at line 91 of file ParentContext.cc.

References edm::ParentContext::Parent::global, isAtEndTransition(), edm::GlobalContext::isAtEndTransition(), edm::StreamContext::isAtEndTransition(), kGlobal, kModule, kPlaceInPath, kStream, edm::ParentContext::Parent::module, edm::ModuleCallingContext::parent(), parent_, edm::PlaceInPathContext::pathContext(), edm::ParentContext::Parent::placeInPath, edm::ParentContext::Parent::stream, edm::PathContext::streamContext(), and type_.

Referenced by isAtEndTransition(), and type().

91  {
92  switch(type_) {
93  case Type::kGlobal:
94  {
96  }
97  case Type::kModule:
98  {
100  }
101  case Type::kStream:
102  {
103  return parent_.stream->isAtEndTransition();
104  }
105  case Type::kPlaceInPath:
106  {
108  }
109  default:
110  break;
111  }
112  return false;
113  }
bool isAtEndTransition() const
Definition: GlobalContext.h:52
bool isAtEndTransition() const
ModuleCallingContext const * module
Definition: ParentContext.h:62
union edm::ParentContext::Parent parent_
StreamContext const * stream
Definition: ParentContext.h:64
ParentContext const & parent() const
PathContext const * pathContext() const
PlaceInPathContext const * placeInPath
Definition: ParentContext.h:63
bool isAtEndTransition() const
Definition: StreamContext.h:59
StreamContext const * streamContext() const
Definition: PathContext.h:38
GlobalContext const * global
Definition: ParentContext.h:60
ModuleCallingContext const * edm::ParentContext::moduleCallingContext ( ) const

Definition at line 46 of file ParentContext.cc.

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

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

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

Definition at line 55 of file ParentContext.cc.

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

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

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

Definition at line 64 of file ParentContext.cc.

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

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

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

Member Data Documentation

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