![]() |
Abstract class that serves as template for Format Handlers. Formats must inherit from this class and will be handled by FormatManager. More...
#include <BaseFormatHandler.h>
Public Member Functions | |
| virtual int | CheckAlignment (std::istream *origin)=0 |
| Function to check if a file is in the implemented format. More... | |
| virtual Alignment * | LoadAlignment (const std::string &filename)=0 |
| Function to load a file in the current format and return an alignment object. More... | |
| virtual bool | SaveAlignment (const Alignment &alignment, std::ostream *output)=0 |
| Function to save a Alignment to a file. More... | |
| virtual bool | RecognizeOutputFormat (const std::string &FormatName) |
| Function that recognizes acronyms of the format. More... | |
| virtual | ~BaseFormatHandler ()=default |
| Class Destructor. More... | |
Public Attributes | |
| bool | canLoad = false |
| Bool tag that indicates whether or not this state can load an alignment in the corresponding format. More... | |
| bool | canSave = false |
| Bool tag that indicates whether or not this state can save an alignment in the corresponding format. More... | |
| std::string | name |
| String that contains a well known acronym to the format. More... | |
| std::string | extension |
| String that contains the main extension of the format. More... | |
Protected Attributes | |
| FormatHandling::FormatManager * | Machine |
| Pointer to the FormatManager that contains and manages this state. More... | |
Abstract class that serves as template for Format Handlers. Formats must inherit from this class and will be handled by FormatManager.
Each class should know how to:
Definition at line 52 of file BaseFormatHandler.h.
|
virtualdefault |
Class Destructor.
|
pure virtual |
Function to check if a file is in the implemented format.
| origin | File Handler to the file. |
Referenced by FormatHandling::FormatManager::getFormatFromFile().
Here is the caller graph for this function:
|
pure virtual |
Function to load a file in the current format and return an alignment object.
| filename | Filename of the file to load. |
Referenced by FormatHandling::FormatManager::loadAlignment().
Here is the caller graph for this function:
|
inlinevirtual |
Function that recognizes acronyms of the format.
| FormatName | acronym to recognize |
Definition at line 110 of file BaseFormatHandler.h.
References name.
Referenced by FormatHandling::FormatManager::getFormatFromToken().
Here is the caller graph for this function:
|
pure virtual |
Function to save a Alignment to a file.
| alignment | Alignment to save. |
| output | File Handler where to save the formatted alignment; |
Referenced by FormatHandling::FormatManager::saveAlignments().
Here is the caller graph for this function:| bool FormatHandling::BaseFormatHandler::canLoad = false |
Bool tag that indicates whether or not this state can load an alignment in the corresponding format.
Definition at line 57 of file BaseFormatHandler.h.
Referenced by FormatHandling::FormatManager::getInputFormatsAvailable().
| bool FormatHandling::BaseFormatHandler::canSave = false |
Bool tag that indicates whether or not this state can save an alignment in the corresponding format.
Definition at line 61 of file BaseFormatHandler.h.
Referenced by FormatHandling::FormatManager::getOutputFormatsAvailable().
| std::string FormatHandling::BaseFormatHandler::extension |
String that contains the main extension of the format.
Definition at line 71 of file BaseFormatHandler.h.
Referenced by trimAlManager::perform(), and FormatHandling::FormatManager::saveAlignments().
|
protected |
Pointer to the FormatManager that contains and manages this state.
Definition at line 124 of file BaseFormatHandler.h.
| std::string FormatHandling::BaseFormatHandler::name |
String that contains a well known acronym to the format.
Definition at line 66 of file BaseFormatHandler.h.
Referenced by FormatHandling::FormatManager::getFileFormatName(), FormatHandling::FormatManager::getInputFormatsAvailable(), FormatHandling::FormatManager::getOutputFormatsAvailable(), trimAlManager::perform(), RecognizeOutputFormat(), and FormatHandling::FormatManager::saveAlignments().