ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
SG::IAuxElement Class Reference

Flag that a class may have auxiliary data associated with it. More...

#include <IAuxElement.h>

Inheritance diagram for SG::IAuxElement:
Collaboration diagram for SG::IAuxElement:

Public Member Functions

 IAuxElement ()
 Default constructor. More...
 
 IAuxElement (size_t index)
 Constructor. More...
 
size_t index () const
 Return the index of this element within its container. More...
 

Protected Member Functions

bool noPrivateData () const
 True if this element has no private data. More...
 
bool havePrivateData () const
 True if this element currently has private data. More...
 
bool hadPrivateData () const
 True if this element had private data before it was added to its current container. More...
 

Private Types

enum  PrivateStoreState : uint8_t { PrivateStoreState::NO_PRIVATE = 0, PrivateStoreState::HAVE_PRIVATE = 1, PrivateStoreState::HAD_PRIVATE = 2 }
 The current private data state. More...
 

Private Member Functions

void setIndex (size_t index)
 Set the index of this element within its container. More...
 
void setNoPrivateData ()
 Record that this element does not have private data. More...
 
void setHavePrivateData ()
 Record that this element currently has private data. More...
 
void setHadPrivateData ()
 Record that this element used to have private data. More...
 

Private Attributes

size_t m_index
 The index of this element within its container. More...
 
PrivateStoreState m_privateStoreState
 

Friends

class SG::ConstAuxElement
 
class SG::AuxElement
 

Detailed Description

Flag that a class may have auxiliary data associated with it.

This this class really exists only to flag that a class may have auxiliary data associated with it. SG::AuxElement derives from this, but one should use this class for tests rather than SG::AuxElement to avoid dependency issues.

This is an ‘interface’ in the sense that it identifies a group of classes, but it defines no functionality itself. In fact, this class should not have a virtual table.

It turns out, however, that ROOT's branch splitting in TBranchElement can get confused in the case of an empty base class deriving from another base class. We can work around this by moving some of the data members from AuxElement here (even though they are transient).

Definition at line 50 of file IAuxElement.h.

Member Enumeration Documentation

◆ PrivateStoreState

enum SG::IAuxElement::PrivateStoreState : uint8_t
strongprivate

The current private data state.

Enumerator
NO_PRIVATE 
HAVE_PRIVATE 
HAD_PRIVATE 

Definition at line 131 of file IAuxElement.h.

132  {
133  NO_PRIVATE = 0,
134  HAVE_PRIVATE = 1,
135  HAD_PRIVATE = 2,
136  };

Constructor & Destructor Documentation

◆ IAuxElement() [1/2]

SG::IAuxElement::IAuxElement ( )

Default constructor.

For an element not in a container.

◆ IAuxElement() [2/2]

SG::IAuxElement::IAuxElement ( size_t  index)

Constructor.

Parameters
indexThe index of this element in its container.

Member Function Documentation

◆ hadPrivateData()

bool SG::IAuxElement::hadPrivateData ( ) const
protected

True if this element had private data before it was added to its current container.

◆ havePrivateData()

bool SG::IAuxElement::havePrivateData ( ) const
protected

True if this element currently has private data.

◆ index()

size_t SG::IAuxElement::index ( ) const

Return the index of this element within its container.

◆ noPrivateData()

bool SG::IAuxElement::noPrivateData ( ) const
protected

True if this element has no private data.

◆ setHadPrivateData()

void SG::IAuxElement::setHadPrivateData ( )
private

Record that this element used to have private data.

◆ setHavePrivateData()

void SG::IAuxElement::setHavePrivateData ( )
private

Record that this element currently has private data.

◆ setIndex()

void SG::IAuxElement::setIndex ( size_t  index)
private

Set the index of this element within its container.

◆ setNoPrivateData()

void SG::IAuxElement::setNoPrivateData ( )
private

Record that this element does not have private data.

Friends And Related Function Documentation

◆ SG::AuxElement

friend class SG::AuxElement
friend

Definition at line 99 of file IAuxElement.h.

◆ SG::ConstAuxElement

friend class SG::ConstAuxElement
friend

Definition at line 98 of file IAuxElement.h.

Member Data Documentation

◆ m_index

size_t SG::IAuxElement::m_index
private

The index of this element within its container.

Should be 0 if this object is not within a container.

Definition at line 128 of file IAuxElement.h.

◆ m_privateStoreState

PrivateStoreState SG::IAuxElement::m_privateStoreState
private

Definition at line 137 of file IAuxElement.h.


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