Belle II Software development
WithSharedMark< T > Class Template Reference

Mixin class to attach a mark that is shared among many instances. More...

#include <WithSharedMark.h>

Inheritance diagram for WithSharedMark< T >:

Public Member Functions

 WithSharedMark (const T &obj, bool *isMarked)
 Mixin class Wraps an object including r the mark is provided from a shared position.
 
bool isMarked () const
 Check if the object has been marked.
 
void mark (bool mark=true)
 Mark this object.
 
void unmark ()
 Unmark this object.
 

Private Types

using Super = ScalarToClass< T >
 Base class of the mixin.
 

Private Attributes

bool * m_isMarked
 Reference to the shared marks.
 

Detailed Description

template<class T>
class Belle2::TrackFindingCDC::WithSharedMark< T >

Mixin class to attach a mark that is shared among many instances.

Definition at line 21 of file WithSharedMark.h.

Member Typedef Documentation

◆ Super

using Super = ScalarToClass<T>
private

Base class of the mixin.

Definition at line 24 of file WithSharedMark.h.

Constructor & Destructor Documentation

◆ WithSharedMark()

WithSharedMark ( const T &  obj,
bool *  isMarked 
)
inline

Mixin class Wraps an object including r the mark is provided from a shared position.

Definition at line 28 of file WithSharedMark.h.

29 : Super(obj)
31 {
32 }
ScalarToClass< T > Super
Base class of the mixin.
bool * m_isMarked
Reference to the shared marks.
bool isMarked() const
Check if the object has been marked.

Member Function Documentation

◆ isMarked()

bool isMarked ( ) const
inline

Check if the object has been marked.

Definition at line 35 of file WithSharedMark.h.

36 {
37 return *m_isMarked;
38 }

◆ mark()

void mark ( bool  mark = true)
inline

Mark this object.

Definition at line 41 of file WithSharedMark.h.

42 {
44 }
void mark(bool mark=true)
Mark this object.

◆ unmark()

void unmark ( )
inline

Unmark this object.

Definition at line 47 of file WithSharedMark.h.

48 {
49 *m_isMarked = false;
50 }

Member Data Documentation

◆ m_isMarked

bool* m_isMarked
private

Reference to the shared marks.

Definition at line 54 of file WithSharedMark.h.


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