eXpress “1.5”

BundleTable Class Reference

The BundleTable class keeps track of the Bundle objects for a given run. More...

#include <bundles.h>

List of all members.

Public Member Functions

 BundleTable ()
 BundleTable Constructor.
 ~BundleTable ()
 BundleTable deconstructor.
const BundleSet & bundles () const
 A member function that returns the set of current Bundle objects.
size_t size () const
 An accessor for the current number of Bundles.
Bundlecreate_bundle (Target *targ)
 A member function that creates a new Bundle, initially containing only the single given Target.
Bundlemerge (Bundle *b1, Bundle *b2)
 A member function that merges two Bundle objects into one.
void collapse ()
 Collapses the merge tree so that all targets are placed in the target list of the root node and all other nodes are deleted.
bool threadsafe_mode () const
 Accessor for whether or not the BundleTable is in threadsafe mode.
void threadsafe_mode (bool mode)
 Mutator for threadsafe mode.

Detailed Description

The BundleTable class keeps track of the Bundle objects for a given run.

It has the ability to create, delete, and merge bundles.

Author:
Adam Roberts
Date:
2011 Artistic License 2.0

Definition at line 168 of file bundles.h.


Constructor & Destructor Documentation

BundleTable::~BundleTable ( )

BundleTable deconstructor.

Deletes all Bundle objects.

Definition at line 91 of file bundles.cpp.


Member Function Documentation

const BundleSet& BundleTable::bundles ( ) const [inline]

A member function that returns the set of current Bundle objects.

The returned object does not outlive this.

Returns:
A reference to the unordered_set containing all current Bundle objects.

Definition at line 203 of file bundles.h.

Bundle * BundleTable::create_bundle ( Target targ)

A member function that creates a new Bundle, initially containing only the single given Target.

Parameters:
targa pointer to the only Target initially contained in the Bundle
Returns:
A pointer to the new Bundle object

Definition at line 104 of file bundles.cpp.

Bundle * BundleTable::merge ( Bundle b1,
Bundle b2 
)

A member function that merges two Bundle objects into one.

The Targets are all moved to the larger bundles and the other is deleted.

Parameters:
b1a pointer to one of the Bundle objects to merge.
b2a pointer to the other Bundle object to merge.
Returns:
A pointer to the merged Bundle object.

Definition at line 110 of file bundles.cpp.

size_t BundleTable::size ( ) const [inline]

An accessor for the current number of Bundles.

Returns:
The current number of Bundles.

Definition at line 208 of file bundles.h.

bool BundleTable::threadsafe_mode ( ) const [inline]

Accessor for whether or not the BundleTable is in threadsafe mode.

Returns:
True if the BundleTable is in threadsafe mode.

Definition at line 233 of file bundles.h.

void BundleTable::threadsafe_mode ( bool  mode) [inline]

Mutator for threadsafe mode.

Parameters:
modebool specifying if threadsafe mode should be enabled (true) or disabled (false)

Definition at line 239 of file bundles.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables