Centralized factory for creating filters. More...
#include <FilterFactory.h>
Static Public Member Functions | |
static Filter * | create (const char *name, ClusterMaker *clusterMaker) |
Method to instantiate a suitable filter. | |
static void | displayList (std::ostream &os) |
Method to display the list of filters available. | |
Private Member Functions | |
FilterFactory () | |
The default constructor. | |
~FilterFactory () | |
The destructor. |
Centralized factory for creating filters.
This is a centralized helper class that can be used to create new instances of various filters. This class provides a convenient FilterFactory::create() method for this purpose. In addition, it also provides a mechanism to list all the known filters.
A set of filters (stored in the FilterChain class) are run on all entries in a FASTA file prior to commencement of the core clustering operation. The filters perform various validation operations to ensure ESTs are good prior to clustering. Filtering ensures that the overall quality of clustering provided by PEACE is good.
Each filter object in the chain implements a specific type of filteration operation and ultimately returns an integer indicating the cluster to which an EST is to be assigned. If the cluster ID is -1, then that indicates that the EST must be subjected to regular clustering operations.
Definition at line 65 of file FilterFactory.h.
FilterFactory::FilterFactory | ( | ) | [inline, private] |
The default constructor.
The default constructor has is private in order to ensure that this class is never instantiated. Instead, the static methods in this class must be directly used to instantiate a filter.
Definition at line 105 of file FilterFactory.h.
FilterFactory::~FilterFactory | ( | ) | [inline, private] |
The destructor.
The destructor is private to ensure that objects of this class are never deleted.
Definition at line 112 of file FilterFactory.h.
Filter * FilterFactory::create | ( | const char * | name, | |
ClusterMaker * | clusterMaker | |||
) | [static] |
Method to instantiate a suitable filter.
This method must be used to instantiate a suitable filter instance. This method uses the name (parameter) to suitably instantiate a filter. If the name is not valid, then this method returns NULL.
[in] | name | The name of the filter to be instantiated. |
[in] | clusterMaker | The top-level cluster maker that has been specified by the user. The cluster maker encapsulates the EST analyzer object specified by the user. The filters can use the clusterMaker to perform any special processing they may need. |
Definition at line 58 of file FilterFactory.cpp.
Referenced by MatrixFileAnalyzer::parseESTCount(), and FilterChain::setupChain().
void FilterFactory::displayList | ( | std::ostream & | os | ) | [static] |
Method to display the list of filters available.
This method is typically used to display the list of filters currently available. This method is typically used in the main() method when displaying usage information.
[out] | os | The output stream to which the list of filter names must be written. |
Definition at line 43 of file FilterFactory.cpp.
References arg_parser::BOOLEAN, and arg_parser::STRING.
Referenced by showUsage().