LDMX Software
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
framework::Bus::Passenger< BaggageType > Class Template Reference

A bus passenger. More...

Classes

class  DeleteObjectStatus
 Empty class to access protected status bit. More...
 
struct  the_type
 A simple, empty struct to allow us to pass the type of baggage to functions as a parameter. More...
 

Public Member Functions

 Passenger ()
 Constructor.
 
virtual ~Passenger ()
 Destructor.
 
virtual TBranch * attach (TTree *tree, const std::string &branch_name, bool can_create)
 Attach this passenger to the input tree.
 
const BaggageType & get () const
 Get the object this passenger is carrying.
 
void update (const BaggageType &updated_obj)
 Update this passenger's baggage.
 
virtual void clear ()
 Reset the object we are carrying to an undefined state.
 
virtual void stream (std::ostream &s) const
 Stream the passenger's object to the input ostream.
 
- Public Member Functions inherited from framework::Bus::Seat
virtual ~Seat ()
 Destructor.
 

Private Member Functions

template<typename T >
TBranch * attach (the_type< T > t, TTree *tree, const std::string &branch_name, bool can_create)
 Attach to a (potentially) new branch on the input tree.
 
TBranch * attachBasic (TTree *tree, const std::string &branch_name, bool can_create)
 Attach a basic type.
 
TBranch * attach (the_type< bool > t, TTree *tree, const std::string &branch_name, bool can_create)
 Specialization for bools.
 
TBranch * attach (the_type< short > t, TTree *tree, const std::string &branch_name, bool can_create)
 Specialization for shorts.
 
TBranch * attach (the_type< int > t, TTree *tree, const std::string &branch_name, bool can_create)
 Specialization for ints.
 
TBranch * attach (the_type< long > t, TTree *tree, const std::string &branch_name, bool can_create)
 Specialization for longs.
 
TBranch * attach (the_type< float > t, TTree *tree, const std::string &branch_name, bool can_create)
 Specialization for floats.
 
TBranch * attach (the_type< double > t, TTree *tree, const std::string &branch_name, bool can_create)
 Specialization for doubles.
 
void clear (the_type< bool > t)
 Clear bool by setting it to false.
 
void clear (the_type< short > t)
 Clear short by setting it to the minimum defined by the compiler.
 
void clear (the_type< int > t)
 Clear int by setting it to the minimum defined by the compiler.
 
void clear (the_type< long > t)
 Clear long by setting it to the minimum defined by the compiler.
 
void clear (the_type< float > t)
 Clear float by setting it to the minimum defined by the compiler.
 
void clear (the_type< double > t)
 Clear double by setting it to the minimum defined by the compiler.
 
template<typename T >
void clear (the_type< T > t)
 Clear a general class by calling its 'Clear' method.
 
template<typename Content >
void clear (the_type< std::vector< Content > > t)
 Clear a vector by calling the std::vector::clear method.
 
template<typename Key , typename Val >
void clear (the_type< std::map< Key, Val > > t)
 Clear a map by calling the std::map::clear method.
 
template<typename T >
void post_update (the_type< T > t)
 In general, don't do anything after an object has been updated.
 
template<typename T >
void stream (the_type< T > t, std::ostream &s) const
 For std::vector, use the sort method after the contents are updated.
 
template<typename Content >
void stream (the_type< std::vector< Content > > t, std::ostream &s) const
 Stream a vector of objects by looping through them.
 
template<typename Key , typename Val >
void stream (the_type< std::map< Key, Val > > t, std::ostream &s) const
 Stream a map of objects by looping through them.
 

Private Attributes

BaggageType * baggage_
 A pointer to the baggage we own and created.
 

Friends

std::ostream & operator<< (std::ostream &s, const framework::Bus::Passenger< BaggageType > &p)
 Stream this object to the output stream.
 

Detailed Description

template<typename BaggageType>
class framework::Bus::Passenger< BaggageType >

A bus passenger.

We store the bus passenger's baggage as a dynamically created object. This is necessary so that we can interface with the ROOT TTree.

Here we do all the heavy lifting of carrying a certain type of object with specializations for clearing, sorting, and printing.

Note
Printing specialization is possible if we include the requirement that all event objects must define the 'operator<<' method.

Core Functions

  1. Define the type of "baggage" that is being carried on the event bus
  2. "Attach" the baggage to a output or input TTree for writing or reading
  3. "Update" the contents of the baggage
  4. "Clear" the baggage to a default or empty state at the end of each event
  5. "Print" the baggage to a ostream (via the operator<<)

Basic Structure

The method of specializing the clear, post_update, and attach methods to the different types of passenger's baggage is derived from a helpful blog post. Basically, the idea is to add a parameter input into the functions that "stores" the type that we are currently carrying. This allows the compiler to choose the best method from the overloaded functions by matching the types of parameters.

Possible Types

Template Parameters

in] BaggageType the type of object that this passenger carries

Definition at line 287 of file Bus.h.

Constructor & Destructor Documentation

◆ Passenger()

template<typename BaggageType >
framework::Bus::Passenger< BaggageType >::Passenger ( )
inline

Constructor.

Dynamically create a default constructed instance of our baggage.

Note
This requires that all of the BaggageTypes are default-constructible. This is a simple requirement because ROOT dictionary generation already requires a default constructor to be defined.

Definition at line 299 of file Bus.h.

299: Seat(), baggage_{new BaggageType} {}
BaggageType * baggage_
A pointer to the baggage we own and created.
Definition Bus.h:790

◆ ~Passenger()

template<typename BaggageType >
virtual framework::Bus::Passenger< BaggageType >::~Passenger ( )
inlinevirtual

Destructor.

Clean up after ourselves by deleting the object we created earlier in the constructor.

Note
Because the baggage_ member variable may be attached to a TTree, this object needs to be destructed carefully. The TTree assumes that the object we attach to it is valid until we either destruct the TTree or reset its addresses. As such, if we want to destruct a Passenger, we need to know that its baggage is either not attached to a TTree or the TTree it was attached to has stopped looking at it (either by deletion or reset).

Definition at line 318 of file Bus.h.

318{ delete baggage_; }

References framework::Bus::Passenger< BaggageType >::baggage_.

Member Function Documentation

◆ attach() [1/8]

template<typename BaggageType >
TBranch * framework::Bus::Passenger< BaggageType >::attach ( the_type< bool >  t,
TTree *  tree,
const std::string &  branch_name,
bool  can_create 
)
inlineprivate

Specialization for bools.

See also
attachBasic for the actual implementation
Parameters
tUnused, only helping compiler choose the correct method
[in]treepointer to TTree to attach to
[in]branch_namename of branch we should attach to
[in]can_createallow us to create a branch on tree if needed
Returns
pointer to branch that we attached to (maybe be null)

Definition at line 544 of file Bus.h.

545 {
546 return attachBasic(tree, branch_name, can_create);
547 }
TBranch * attachBasic(TTree *tree, const std::string &branch_name, bool can_create)
Attach a basic type.
Definition Bus.h:513

References framework::Bus::Passenger< BaggageType >::attachBasic().

◆ attach() [2/8]

template<typename BaggageType >
TBranch * framework::Bus::Passenger< BaggageType >::attach ( the_type< double >  t,
TTree *  tree,
const std::string &  branch_name,
bool  can_create 
)
inlineprivate

Specialization for doubles.

See also
attachBasic for the actual implementation
Parameters
tUnused, only helping compiler choose the correct method
[in]treepointer to TTree to attach to
[in]branch_namename of branch we should attach to
[in]can_createallow us to create a branch on tree if needed
Returns
pointer to branch that we attached to (maybe be null)

Definition at line 624 of file Bus.h.

625 {
626 return attachBasic(tree, branch_name, can_create);
627 }

References framework::Bus::Passenger< BaggageType >::attachBasic().

◆ attach() [3/8]

template<typename BaggageType >
TBranch * framework::Bus::Passenger< BaggageType >::attach ( the_type< float >  t,
TTree *  tree,
const std::string &  branch_name,
bool  can_create 
)
inlineprivate

Specialization for floats.

See also
attachBasic for the actual implementation
Parameters
tUnused, only helping compiler choose the correct method
[in]treepointer to TTree to attach to
[in]branch_namename of branch we should attach to
[in]can_createallow us to create a branch on tree if needed
Returns
pointer to branch that we attached to (maybe be null)

Definition at line 608 of file Bus.h.

609 {
610 return attachBasic(tree, branch_name, can_create);
611 }

References framework::Bus::Passenger< BaggageType >::attachBasic().

◆ attach() [4/8]

template<typename BaggageType >
TBranch * framework::Bus::Passenger< BaggageType >::attach ( the_type< int >  t,
TTree *  tree,
const std::string &  branch_name,
bool  can_create 
)
inlineprivate

Specialization for ints.

See also
attachBasic for the actual implementation
Parameters
tUnused, only helping compiler choose the correct method
[in]treepointer to TTree to attach to
[in]branch_namename of branch we should attach to
[in]can_createallow us to create a branch on tree if needed
Returns
pointer to branch that we attached to (maybe be null)

Definition at line 576 of file Bus.h.

577 {
578 return attachBasic(tree, branch_name, can_create);
579 }

References framework::Bus::Passenger< BaggageType >::attachBasic().

◆ attach() [5/8]

template<typename BaggageType >
TBranch * framework::Bus::Passenger< BaggageType >::attach ( the_type< long >  t,
TTree *  tree,
const std::string &  branch_name,
bool  can_create 
)
inlineprivate

Specialization for longs.

See also
attachBasic for the actual implementation
Parameters
tUnused, only helping compiler choose the correct method
[in]treepointer to TTree to attach to
[in]branch_namename of branch we should attach to
[in]can_createallow us to create a branch on tree if needed
Returns
pointer to branch that we attached to (maybe be null)

Definition at line 592 of file Bus.h.

593 {
594 return attachBasic(tree, branch_name, can_create);
595 }

References framework::Bus::Passenger< BaggageType >::attachBasic().

◆ attach() [6/8]

template<typename BaggageType >
TBranch * framework::Bus::Passenger< BaggageType >::attach ( the_type< short >  t,
TTree *  tree,
const std::string &  branch_name,
bool  can_create 
)
inlineprivate

Specialization for shorts.

See also
attachBasic for the actual implementation
Parameters
tUnused, only helping compiler choose the correct method
[in]treepointer to TTree to attach to
[in]branch_namename of branch we should attach to
[in]can_createallow us to create a branch on tree if needed
Returns
pointer to branch that we attached to (maybe be null)

Definition at line 560 of file Bus.h.

561 {
562 return attachBasic(tree, branch_name, can_create);
563 }

References framework::Bus::Passenger< BaggageType >::attachBasic().

◆ attach() [7/8]

template<typename BaggageType >
template<typename T >
TBranch * framework::Bus::Passenger< BaggageType >::attach ( the_type< T >  t,
TTree *  tree,
const std::string &  branch_name,
bool  can_create 
)
inlineprivate

Attach to a (potentially) new branch on the input tree.

This is the attachment mechanism used for all non-basic types. The specializations for the basic types (BSILFD - bool, short, int, long, float, double) use attachBasic which is slightly different in its branching.

See also
TBranchElement::SetObject for attaching an object to a branch that already exists
TTree::Branch for creating a new branch

With complicated objects like most of our event bus baggage, ROOT is able to deduce the type as long as we load a ROOT dictionary with all of the classes defined inside of it.

Parameters
tUnused, only helping compiler choose the correct method
[in]treepointer to TTree to attach to
[in]branch_namename of branch we should attach to
[in]can_createallow us to create a branch on tree if needed
Returns
pointer to branch that we attached to (maybe be null)

If the branch already exists, we need to explicitly remind ROOT that we own the object we are going to pass and it shouldn't try to delete it. Then we set the branch object to our baggage_.

Idk why this is necessary. The docs say that you can tell ROOT you own an object by using a non-null pointer passed to SetObject (or its descendent SetAddress); however, in the implementation of TBranchElement::SetAddressImpl, the kDeleteObject status bit is merely tested and the validity of the passed reference is never checked. This means the bits value is leftover from however the branch was initialized which when reading is ROOT-owned objects.

If the branch doesn't already exist and we are allowed to make one, we make a new one passing our baggage.

Definition at line 458 of file Bus.h.

459 {
460 TBranch* branch = tree->GetBranch(branch_name.c_str());
461 if (branch) {
475 if (dynamic_cast<TBranchElement*>(branch)) {
476 branch->SetBit(DeleteObjectStatus::bit(), false);
477 }
478 branch->SetObject(baggage_);
479 } else if (can_create) {
484 branch = tree->Branch(branch_name.c_str(), baggage_, 100000, 3);
485 }
486 return branch;
487 }

References framework::Bus::Passenger< BaggageType >::baggage_.

◆ attach() [8/8]

template<typename BaggageType >
virtual TBranch * framework::Bus::Passenger< BaggageType >::attach ( TTree *  tree,
const std::string &  branch_name,
bool  can_create 
)
inlinevirtual

Attach this passenger to the input tree.

Now we know what type of object this passenger is carrying, so we can attach it to the tree.

If the 'can_create' parameter is true and a branch of the input name doesn't exist on the tree, we create a new branch of the input branch name. If this parameter is false, we simply return the nullptr signifying that this branch doesn't exist.

See also
attach(the_type<T>,TTree*,const std::string&,bool) for how we attach to higher-level classes
attachBasic(TTree*,const std::string&,bool) for how we attach to basic types
Parameters
[in]treepointer to TTree to attach to
[in]branch_namename of branch we should attach to
[in]can_createallow us to create a branch on tree if needed
Returns
pointer to branch that we attached to (maybe be null)

Implements framework::Bus::Seat.

Definition at line 343 of file Bus.h.

344 {
345 return attach(the_type<BaggageType>{}, tree, branch_name, can_create);
346 }
virtual TBranch * attach(TTree *tree, const std::string &branch_name, bool can_create)
Attach this passenger to the input tree.
Definition Bus.h:343

References framework::Bus::Passenger< BaggageType >::attach().

Referenced by framework::Bus::Passenger< BaggageType >::attach().

◆ attachBasic()

template<typename BaggageType >
TBranch * framework::Bus::Passenger< BaggageType >::attachBasic ( TTree *  tree,
const std::string &  branch_name,
bool  can_create 
)
inlineprivate

Attach a basic type.

We assume that the current baggage is one of BSILFD bool, short, int, long, float, double

We need this attaching mechanism to be different from the higher-level objects because TTree requires different inputs and returns different outputs for the basic types.

See also
TBranch::SetAddress for attaching a basic type to a branch that already exists
TTree::Branch for creating a new branch
typeid for identifying the type of an object
Parameters
[in]treepointer to TTree to attach to
[in]branch_namename of branch we should attach to
[in]can_createallow us to create a branch on tree if needed
Returns
pointer to branch that we attached to (maybe be null)

Definition at line 513 of file Bus.h.

514 {
515 TBranch* branch = tree->GetBranch(branch_name.c_str());
516 if (branch) {
517 // branch already exists
518 // set the object the branch should read/write from/to
519 branch->SetAddress(baggage_);
520 } else if (can_create) {
521 static const std::map<std::string, std::string> cpp_to_root_type_name =
522 {{"b", "O"}, {"s", "S"}, {"i", "I"},
523 {"l", "L"}, {"f", "F"}, {"d", "D"}};
524 // branch doesnt exist and we are allowed to make a new one
525 std::string cpp_type = typeid(*baggage_).name();
526 branch = tree->Branch(
527 branch_name.c_str(), baggage_,
528 (branch_name + "/" + cpp_to_root_type_name.at(cpp_type)).c_str());
529 }
530 return branch;
531 }

References framework::Bus::Passenger< BaggageType >::baggage_.

Referenced by framework::Bus::Passenger< BaggageType >::attach(), framework::Bus::Passenger< BaggageType >::attach(), framework::Bus::Passenger< BaggageType >::attach(), framework::Bus::Passenger< BaggageType >::attach(), framework::Bus::Passenger< BaggageType >::attach(), and framework::Bus::Passenger< BaggageType >::attach().

◆ clear() [1/10]

template<typename BaggageType >
virtual void framework::Bus::Passenger< BaggageType >::clear ( )
inlinevirtual

Reset the object we are carrying to an undefined state.

We call the overloaded, templated clear method that allows the compiler to deduce which implementation to use depending on the type of baggage we are carrying.

Implements framework::Bus::Seat.

Definition at line 377 of file Bus.h.

377{ clear(the_type<BaggageType>{}); }
virtual void clear()
Reset the object we are carrying to an undefined state.
Definition Bus.h:377

References framework::Bus::Passenger< BaggageType >::clear().

Referenced by framework::Bus::Passenger< BaggageType >::clear().

◆ clear() [2/10]

template<typename BaggageType >
void framework::Bus::Passenger< BaggageType >::clear ( the_type< bool >  t)
inlineprivate

Clear bool by setting it to false.

Parameters
tUnused, only helping compiler choose the correct method

Definition at line 634 of file Bus.h.

634{ *baggage_ = false; }

References framework::Bus::Passenger< BaggageType >::baggage_.

◆ clear() [3/10]

template<typename BaggageType >
void framework::Bus::Passenger< BaggageType >::clear ( the_type< double >  t)
inlineprivate

Clear double by setting it to the minimum defined by the compiler.

Parameters
tUnused, only helping compiler choose the correct method

Definition at line 672 of file Bus.h.

672 {
673 *baggage_ = std::numeric_limits<BaggageType>::min();
674 }

References framework::Bus::Passenger< BaggageType >::baggage_.

◆ clear() [4/10]

template<typename BaggageType >
void framework::Bus::Passenger< BaggageType >::clear ( the_type< float >  t)
inlineprivate

Clear float by setting it to the minimum defined by the compiler.

Parameters
tUnused, only helping compiler choose the correct method

Definition at line 664 of file Bus.h.

664 {
665 *baggage_ = std::numeric_limits<BaggageType>::min();
666 }

References framework::Bus::Passenger< BaggageType >::baggage_.

◆ clear() [5/10]

template<typename BaggageType >
void framework::Bus::Passenger< BaggageType >::clear ( the_type< int >  t)
inlineprivate

Clear int by setting it to the minimum defined by the compiler.

Parameters
tUnused, only helping compiler choose the correct method

Definition at line 648 of file Bus.h.

648 {
649 *baggage_ = std::numeric_limits<BaggageType>::min();
650 }

References framework::Bus::Passenger< BaggageType >::baggage_.

◆ clear() [6/10]

template<typename BaggageType >
void framework::Bus::Passenger< BaggageType >::clear ( the_type< long >  t)
inlineprivate

Clear long by setting it to the minimum defined by the compiler.

Parameters
tUnused, only helping compiler choose the correct method

Definition at line 656 of file Bus.h.

656 {
657 *baggage_ = std::numeric_limits<BaggageType>::min();
658 }

References framework::Bus::Passenger< BaggageType >::baggage_.

◆ clear() [7/10]

template<typename BaggageType >
void framework::Bus::Passenger< BaggageType >::clear ( the_type< short >  t)
inlineprivate

Clear short by setting it to the minimum defined by the compiler.

Parameters
tUnused, only helping compiler choose the correct method

Definition at line 640 of file Bus.h.

640 {
641 *baggage_ = std::numeric_limits<BaggageType>::min();
642 }

References framework::Bus::Passenger< BaggageType >::baggage_.

◆ clear() [8/10]

template<typename BaggageType >
template<typename Key , typename Val >
void framework::Bus::Passenger< BaggageType >::clear ( the_type< std::map< Key, Val > >  t)
inlineprivate

Clear a map by calling the std::map::clear method.

Parameters
tUnused, only helping compiler choose the correct method

Definition at line 705 of file Bus.h.

705 {
706 baggage_->clear();
707 }

References framework::Bus::Passenger< BaggageType >::baggage_.

◆ clear() [9/10]

template<typename BaggageType >
template<typename Content >
void framework::Bus::Passenger< BaggageType >::clear ( the_type< std::vector< Content > >  t)
inlineprivate

Clear a vector by calling the std::vector::clear method.

Parameters
tUnused, only helping compiler choose the correct method

Definition at line 696 of file Bus.h.

696 {
697 baggage_->clear();
698 }

References framework::Bus::Passenger< BaggageType >::baggage_.

◆ clear() [10/10]

template<typename BaggageType >
template<typename T >
void framework::Bus::Passenger< BaggageType >::clear ( the_type< T >  t)
inlineprivate

Clear a general class by calling its 'Clear' method.

Note
The capitalization of 'Clear' is a relic of when the event bus objects needed to inherit from TObject. We could simplify this code by renaming the 'Clear' method to 'clear' which would match std::vector and std::map.
Parameters
tUnused, only helping compiler choose the correct method

Definition at line 687 of file Bus.h.

687 {
688 baggage_->Clear();
689 }

References framework::Bus::Passenger< BaggageType >::baggage_.

◆ get()

template<typename BaggageType >
const BaggageType & framework::Bus::Passenger< BaggageType >::get ( ) const
inline

Get the object this passenger is carrying.

Returns
const reference to the object

Definition at line 352 of file Bus.h.

352{ return *baggage_; }

References framework::Bus::Passenger< BaggageType >::baggage_.

◆ post_update()

template<typename BaggageType >
template<typename T >
void framework::Bus::Passenger< BaggageType >::post_update ( the_type< T >  t)
inlineprivate

In general, don't do anything after an object has been updated.

Parameters
tUnused, only helping compiler choose the correct method

Definition at line 715 of file Bus.h.

715{}

Referenced by framework::Bus::Passenger< BaggageType >::update().

◆ stream() [1/4]

template<typename BaggageType >
virtual void framework::Bus::Passenger< BaggageType >::stream ( std::ostream &  s) const
inlinevirtual

Stream the passenger's object to the input ostream.

We call the overloaded, templated stream method that allows the compiler to deduce which implementation to use depending on the type of baggage we are carrying.

Implements framework::Bus::Seat.

Definition at line 386 of file Bus.h.

386 {
387 stream(the_type<BaggageType>{}, s);
388 }
virtual void stream(std::ostream &s) const
Stream the passenger's object to the input ostream.
Definition Bus.h:386

References framework::Bus::Passenger< BaggageType >::stream().

Referenced by framework::Bus::Passenger< BaggageType >::stream().

◆ stream() [2/4]

template<typename BaggageType >
template<typename Key , typename Val >
void framework::Bus::Passenger< BaggageType >::stream ( the_type< std::map< Key, Val > >  t,
std::ostream &  s 
) const
inlineprivate

Stream a map of objects by looping through them.

Note
Here is where we require that all event objects used as a key or value in a map need the 'operator<<' defined.
Parameters
tUnused, only helping compiler choose the correct method
sostream to write to

Definition at line 777 of file Bus.h.

777 {
778 s << baggage_->size();
779 /*
780 s << "{ ";
781 for (auto const& [k, v] : *baggage_) {
782 s << k << " -> " << v << " ";
783 }
784 s << "}";
785 */
786 }

References framework::Bus::Passenger< BaggageType >::baggage_.

◆ stream() [3/4]

template<typename BaggageType >
template<typename Content >
void framework::Bus::Passenger< BaggageType >::stream ( the_type< std::vector< Content > >  t,
std::ostream &  s 
) const
inlineprivate

Stream a vector of objects by looping through them.

Note
Here is where we require that all event objects inside a vector need the 'operator<<' defined.
Parameters
tUnused, only helping compiler choose the correct method
sostream to write to

Definition at line 757 of file Bus.h.

757 {
758 s << baggage_->size();
759 /*
760 s << "[ ";
761 for (auto const& entry : *baggage_) s << entry << " ";
762 s << "]";
763 */
764 }

References framework::Bus::Passenger< BaggageType >::baggage_.

◆ stream() [4/4]

template<typename BaggageType >
template<typename T >
void framework::Bus::Passenger< BaggageType >::stream ( the_type< T >  t,
std::ostream &  s 
) const
inlineprivate

For std::vector, use the sort method after the contents are updated.

Note
This is where we require that any contents of vectors have the operator< defined.
Parameters
tUnused, only helping compiler choose the correct method template <typename Content> void post_update(the_type<std::vector<Content>> t) { std::sort(baggage_->begin(), baggage_->end()); } Stream a basic type that has its own definition of 'operator<<'.
Note
Here is where we require that all event bus objects (not inside a vector or map) need the 'operatore<<' defined.
Parameters
tUnused, only helping compiler choose the correct method
sostream to write to

Definition at line 743 of file Bus.h.

743 {
744 // s << *baggagage_;
745 }

◆ update()

template<typename BaggageType >
void framework::Bus::Passenger< BaggageType >::update ( const BaggageType &  updated_obj)
inline

Update this passenger's baggage.

See also
post_update to allow the different types to take actions after the baggage is updated. For example, the vector specialization of post_update uses this opportunity to sort the list of objects.
Parameters
[in]updated_objBaggageType to copy into our object

Definition at line 365 of file Bus.h.

365 {
366 *baggage_ = updated_obj;
367 post_update(the_type<BaggageType>());
368 }
void post_update(the_type< T > t)
In general, don't do anything after an object has been updated.
Definition Bus.h:715

References framework::Bus::Passenger< BaggageType >::baggage_, and framework::Bus::Passenger< BaggageType >::post_update().

Friends And Related Symbol Documentation

◆ operator<<

template<typename BaggageType >
std::ostream & operator<< ( std::ostream &  s,
const framework::Bus::Passenger< BaggageType > &  p 
)
friend

Stream this object to the output stream.

May contain newlines if large object.

See also
stream for detailed implementation
Parameters
[in]sostream to write to
[in]pPassenger to write out
Returns
modified ostream

Definition at line 400 of file Bus.h.

401 {
402 p.stream(s);
403 return s;
404 }

Member Data Documentation

◆ baggage_

template<typename BaggageType >
BaggageType* framework::Bus::Passenger< BaggageType >::baggage_
private

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