#include <AbstractCellMutationState.hpp>
Inherited by ApcOneHitCellMutationState, ApcTwoHitCellMutationState, BetaCateninOneHitCellMutationState, LabelledCellMutationState, and WildTypeCellMutationState.
Public Member Functions | |
AbstractCellMutationState (unsigned colour) | |
virtual | ~AbstractCellMutationState () |
template<class SUBCLASS > | |
bool | IsType () const |
bool | IsSame (AbstractCellMutationState *pOther) |
bool | IsSame (boost::shared_ptr< AbstractCellMutationState > pOther) |
void | IncrementCellCount () |
void | DecrementCellCount () |
unsigned | GetCellCount () const |
unsigned | GetColour () const |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
AbstractCellMutationState () | |
Private Attributes | |
unsigned | mCellCount |
unsigned | mColour |
Friends | |
class | boost::serialization::access |
Base class for cell mutation states.
Each TissueCell has a (shared pointer to a) mutation state instance, which will be an instance of a subclass of this class. When setting up a TissueSimulation, the user must specify a list of AbstractCellMutationState instances, which represent the possible mutations that can occur in the simulation (including WildTypeCellMutationState). This provides a registry of available mutation states, and cells will point to one of these objects.
The mutation state objects keep track of the number of cells in a given mutation state, as well as what colour should be used by the visualizer to display cells in each state.
Definition at line 48 of file AbstractCellMutationState.hpp.
AbstractCellMutationState::AbstractCellMutationState | ( | ) | [private] |
Default constructor needs to be defined for archiving, but never actually used, since subclasses call the normal constructor.
Definition at line 34 of file AbstractCellMutationState.cpp.
AbstractCellMutationState::AbstractCellMutationState | ( | unsigned | colour | ) |
Constructor.
colour | what colour cells with this mutation state should be in the visualizer |
Definition at line 40 of file AbstractCellMutationState.cpp.
AbstractCellMutationState::~AbstractCellMutationState | ( | ) | [virtual] |
Virtual destructor, to make this class polymorphic.
Definition at line 46 of file AbstractCellMutationState.cpp.
void AbstractCellMutationState::DecrementCellCount | ( | ) |
Decrement mCellCount.
Definition at line 67 of file AbstractCellMutationState.cpp.
References mCellCount.
unsigned AbstractCellMutationState::GetCellCount | ( | ) | const |
unsigned AbstractCellMutationState::GetColour | ( | ) | const |
void AbstractCellMutationState::IncrementCellCount | ( | ) |
Increment mCellCount.
Definition at line 62 of file AbstractCellMutationState.cpp.
References mCellCount.
bool AbstractCellMutationState::IsSame | ( | boost::shared_ptr< AbstractCellMutationState > | pOther | ) |
Determine whether this mutation state is the same as another.
pOther | the mutation state to compare against. |
Definition at line 57 of file AbstractCellMutationState.cpp.
References IsSame().
bool AbstractCellMutationState::IsSame | ( | AbstractCellMutationState * | pOther | ) |
Determine whether this mutation state is the same as another.
pOther | the mutation state to compare against. |
Definition at line 50 of file AbstractCellMutationState.cpp.
Referenced by IsSame().
bool AbstractCellMutationState::IsType | ( | ) | const [inline] |
For convenience, wrap the dynamic_cast test for whether an instance is of a particular subclass.
This should be called like: bool healthy = p_mutation_state->IsType<HealthyMutationState>();
Definition at line 107 of file AbstractCellMutationState.hpp.
void AbstractCellMutationState::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive the member variables.
archive | the archive | |
version | the current version of this class |
Reimplemented in ApcOneHitCellMutationState, ApcTwoHitCellMutationState, BetaCateninOneHitCellMutationState, LabelledCellMutationState, and WildTypeCellMutationState.
Definition at line 71 of file AbstractCellMutationState.hpp.
References mCellCount, and mColour.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented in ApcOneHitCellMutationState, ApcTwoHitCellMutationState, BetaCateninOneHitCellMutationState, LabelledCellMutationState, and WildTypeCellMutationState.
Definition at line 63 of file AbstractCellMutationState.hpp.
The number of cells with this mutation state.
Definition at line 55 of file AbstractCellMutationState.hpp.
Referenced by DecrementCellCount(), GetCellCount(), IncrementCellCount(), and serialize().
unsigned AbstractCellMutationState::mColour [private] |
Colour for use by visualizer.
Definition at line 60 of file AbstractCellMutationState.hpp.
Referenced by GetColour(), and serialize().