vg
tools for working with variation graphs
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vg::GenomeStateCommand Struct Referenceabstract

#include <genome_state.hpp>

Inheritance diagram for vg::GenomeStateCommand:
vg::AppendHaplotypeCommand vg::DeleteHaplotypeCommand vg::InsertHaplotypeCommand vg::ReplaceLocalHaplotypeCommand vg::ReplaceSnarlHaplotypeCommand vg::SwapHaplotypesCommand

Public Member Functions

virtual ~GenomeStateCommand ()=default
 
virtual GenomeStateCommandexecute (GenomeState &state) const =0
 

Detailed Description

Represents a modification of a GenomeState. We use a command pattern to enable undo-ability. Applying a command always returns a command that will undo what you did.

Constructor & Destructor Documentation

◆ ~GenomeStateCommand()

virtual vg::GenomeStateCommand::~GenomeStateCommand ( )
virtualdefault

Member Function Documentation

◆ execute()

virtual GenomeStateCommand * vg::GenomeStateCommand::execute ( GenomeState state) const
pure virtual

Execute this command on the given state and return the reverse command. Generally ends up calling a command-type-specific method on the GenomeState that does the actual work.

Implemented in vg::InsertHaplotypeCommand, vg::DeleteHaplotypeCommand, vg::SwapHaplotypesCommand, vg::AppendHaplotypeCommand, vg::ReplaceSnarlHaplotypeCommand, and vg::ReplaceLocalHaplotypeCommand.


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