00001 #ifndef CLUSTER_MAKER_CPP 00002 #define CLUSTER_MAKER_CPP 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 "ClusterMaker.h" 00038 #include "Utilities.h" 00039 00040 // The static instance variables for command line arguments. 00041 00042 00043 // The common set of arguments for all EST analyzers 00044 arg_parser::arg_record ClusterMaker::commonArgsList[] = { 00045 {NULL, NULL, NULL, arg_parser::BOOLEAN} 00046 }; 00047 00048 ClusterMaker::ClusterMaker(const std::string& myName, ESTAnalyzer *myAnalyzer, 00049 const int estIdx, const std::string& outputFile) 00050 : name(myName), refESTidx(estIdx), outputFileName(outputFile), 00051 analyzer(myAnalyzer) { 00052 // Nothing else to be done for now. 00053 } 00054 00055 ClusterMaker::~ClusterMaker() {} 00056 00057 void 00058 ClusterMaker::showArguments(std::ostream& os) { 00059 if (commonArgsList[0].arg_text == NULL) { 00060 // No valid arguments are currently used for all 00061 // ClusterMakers. So skip displaying any arguments. 00062 return; 00063 } 00064 00065 // Use a arg parser object to conveniently display common options. 00066 arg_parser ap(ClusterMaker::commonArgsList); 00067 os << "Common options for all cluster makers are:\n"; 00068 os << ap; 00069 } 00070 00071 bool 00072 ClusterMaker::parseArguments(int& argc, char **argv) { 00073 arg_parser ap(ClusterMaker::commonArgsList); 00074 // Process the arguments 00075 ap.check_args(argc, argv, false); 00076 // Everything went well. 00077 return true; 00078 } 00079 00080 // Dummy operator= to keep VC'09 happy. 00081 ClusterMaker& 00082 ClusterMaker::operator=(const ClusterMaker&) { 00083 return *this; 00084 } 00085 00086 #endif