CellMutationStateRegistry Class Reference

#include <CellMutationStateRegistry.hpp>

Collaboration diagram for CellMutationStateRegistry:
Collaboration graph
[legend]

List of all members.

Public Member Functions

template<class SUBCLASS >
boost::shared_ptr
< AbstractCellMutationState
Get ()
const std::vector
< boost::shared_ptr
< AbstractCellMutationState > > & 
rGetAllMutationStates ()
void Clear ()
CellMutationStateRegistryTakeOwnership ()
void SpecifyOrdering (const std::vector< boost::shared_ptr< AbstractCellMutationState > > &rOrdering)
bool HasOrderingBeenSpecified ()

Static Public Member Functions

static CellMutationStateRegistryInstance ()

Private Member Functions

 CellMutationStateRegistry ()
 CellMutationStateRegistry (const CellMutationStateRegistry &)
CellMutationStateRegistryoperator= (const CellMutationStateRegistry &)
template<class Archive >
void serialize (Archive &archive, const unsigned int version)

Private Attributes

std::vector< boost::shared_ptr
< AbstractCellMutationState > > 
mMutationStates
bool mOrderingHasBeenSpecified

Static Private Attributes

static CellMutationStateRegistrympInstance = NULL

Friends

class boost::serialization::access

Detailed Description

A singleton registry of available mutation states.

Definition at line 45 of file CellMutationStateRegistry.hpp.


Constructor & Destructor Documentation

CellMutationStateRegistry::CellMutationStateRegistry (  )  [private]

Default constructor.

Definition at line 55 of file CellMutationStateRegistry.cpp.

CellMutationStateRegistry::CellMutationStateRegistry ( const CellMutationStateRegistry  )  [private]

Copy constructor.


Member Function Documentation

void CellMutationStateRegistry::Clear (  ) 
template<class SUBCLASS >
boost::shared_ptr< AbstractCellMutationState > CellMutationStateRegistry::Get ( void   )  [inline]

The main interface to this class: get a particular mutation state object. Use like: boost::shared_ptr<AbstractCellMutationState> p_state( CellMutationStateRegistry::Instance()->Get<WildTypeCellMutationState>());

Definition at line 144 of file CellMutationStateRegistry.hpp.

References mMutationStates, and mOrderingHasBeenSpecified.

bool CellMutationStateRegistry::HasOrderingBeenSpecified (  ) 
Returns:
whether an ordering has been specified.

Definition at line 87 of file CellMutationStateRegistry.cpp.

References mOrderingHasBeenSpecified.

CellMutationStateRegistry * CellMutationStateRegistry::Instance (  )  [static]
CellMutationStateRegistry& CellMutationStateRegistry::operator= ( const CellMutationStateRegistry  )  [private]

Overloaded assignment operator.

const std::vector< boost::shared_ptr< AbstractCellMutationState > > & CellMutationStateRegistry::rGetAllMutationStates (  ) 

Get a list of the mutation states registered.

Definition at line 44 of file CellMutationStateRegistry.cpp.

References mMutationStates.

template<class Archive >
void CellMutationStateRegistry::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Archive the member variables.

Parameters:
archive the archive
version the current version of this class

Definition at line 136 of file CellMutationStateRegistry.hpp.

References mMutationStates, and mOrderingHasBeenSpecified.

void CellMutationStateRegistry::SpecifyOrdering ( const std::vector< boost::shared_ptr< AbstractCellMutationState > > &  rOrdering  ) 

Specify the ordering in which mutation states should be returned by rGetAllMutationStates(). The provided ordering must include all mutation states in the registry. Once an ordering has been specified attempts to get a mutation state which is not in the ordering will throw an exception.

Parameters:
rOrdering vector of mutation states in the desired order

Definition at line 67 of file CellMutationStateRegistry.cpp.

References mMutationStates, and mOrderingHasBeenSpecified.

CellMutationStateRegistry * CellMutationStateRegistry::TakeOwnership (  ) 

Take ownership of the current registry. Calling Instance after this will create a new registry. The caller takes responsibility for freeing the returned registry when finished with it.

This method is intended for use by TissueSimulation, so that we can have multiple concurrent simulations, each with their own registry.

Definition at line 61 of file CellMutationStateRegistry.cpp.

References mpInstance.


Friends And Related Function Documentation

friend class boost::serialization::access [friend]

Needed for serialization.

Definition at line 128 of file CellMutationStateRegistry.hpp.


Member Data Documentation

std::vector<boost::shared_ptr<AbstractCellMutationState> > CellMutationStateRegistry::mMutationStates [private]

The mutation states in the registry.

Definition at line 122 of file CellMutationStateRegistry.hpp.

Referenced by Clear(), Get(), rGetAllMutationStates(), serialize(), and SpecifyOrdering().

Whether an ordering has been set up

Definition at line 125 of file CellMutationStateRegistry.hpp.

Referenced by Clear(), Get(), HasOrderingBeenSpecified(), serialize(), and SpecifyOrdering().

A pointer to the singleton instance of this class.

Definition at line 117 of file CellMutationStateRegistry.hpp.

Referenced by Instance(), and TakeOwnership().


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

Generated by  doxygen 1.6.2