00001 #ifndef CLUSTER_MAKER_FACTORY_H 00002 #define CLUSTER_MAKER_FACTORY_H 00003 00004 //-------------------------------------------------------------------- 00005 // 00006 // This file is part of PEACE. 00007 // 00008 // PEACE is free software: you can redistribute it and/or modify it 00009 // under the terms of the GNU General Public License as published by 00010 // the Free Software Foundation, either version 3 of the License, or 00011 // (at your option) any later version. 00012 // 00013 // PEACE is distributed in the hope that it will be useful, but 00014 // WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 // General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU General Public License 00019 // along with PEACE. If not, see <http://www.gnu.org/licenses/>. 00020 // 00021 // Miami University makes no representations or warranties about the 00022 // suitability of the software, either express or implied, including 00023 // but not limited to the implied warranties of merchantability, 00024 // fitness for a particular purpose, or non-infringement. Miami 00025 // University shall not be liable for any damages suffered by licensee 00026 // as a result of using, result of using, modifying or distributing 00027 // this software or its derivatives. 00028 // 00029 // By using or copying this Software, Licensee agrees to abide by the 00030 // intellectual property laws, and all other applicable laws of the 00031 // U.S., and the terms of GNU General Public License (version 3). 00032 // 00033 // Authors: Dhananjai M. Rao raodm@muohio.edu 00034 // 00035 //--------------------------------------------------------------------- 00036 00037 #include <iostream> 00038 00039 // For declaration to make compiler happy. 00040 class ClusterMaker; 00041 class ESTAnalyzer; 00042 00043 class ClusterMakerFactory { 00044 public: 00045 /** Method to instantiate a suitable Cluster Maker object. 00046 00047 This method must be used to instantiate a suitable cluster 00048 maker instance. This method uses the name (parameter) to 00049 suitably instantiate an cluster maker. If the name is not 00050 valid, then this method returns NULL. 00051 00052 \param[in] name The name of the cluster maker to be 00053 instantiated. 00054 00055 \param[in,out] analyzer The EST analyzer to be used by this 00056 ClusterMaker for generating similarity metrics between two 00057 given ESTs. If this parameter is NULL, this method prints an 00058 error message and returns NULL. 00059 00060 \param[in] refESTidx The reference EST index value to be used 00061 when instantiating a cluster maker. Index values start from 0 00062 (zero). If this value is negative then this method returns 00063 NULL. 00064 00065 \param[in] outputFileName The target file to which the 00066 analysis report is to be written (if any). If this parameter 00067 is the empty string (""), then the output is written to 00068 standard output. 00069 */ 00070 static ClusterMaker* create(const char* name, ESTAnalyzer *analyzer, 00071 const int refESTidx, 00072 const std::string& outputFileName); 00073 00074 /** Method to display the list of cluster makers available. 00075 00076 This method is typically used to display the list of cluster 00077 makers currently compiled into the program. This method is 00078 typically used in the main() method when displaying usage 00079 information. 00080 00081 \param[out] os The output stream to which the list of EST 00082 names must be written. 00083 */ 00084 static void displayList(std::ostream& os); 00085 00086 protected: 00087 // Currently this class has no protected members. 00088 00089 private: 00090 /** The default constructor. 00091 00092 The default constructor has is private in order to ensure that 00093 this class is never instantiated. Instead, the static methods 00094 in this class must be directly used to instantiate a cluster 00095 maker. 00096 */ 00097 ClusterMakerFactory() {} 00098 00099 /** The destructor. 00100 00101 The destructor is private to ensure that objects of this class 00102 are never deleted. 00103 */ 00104 ~ClusterMakerFactory() {} 00105 }; 00106 00107 00108 #endif