libStatGen Software  1
FastQStatus.h
1 /*
2  * Copyright (C) 2010 Regents of the University of Michigan
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef __FASTQ_STATUS_H__
19 #define __FASTQ_STATUS_H__
20 
21 #include <string>
22 
23 /// Status for FastQ operations.
25 {
26  public:
27 
28  /// Return value enum for the FastQFile class methods, indicating
29  /// success or error codes.
30  enum Status
31  {
32  FASTQ_SUCCESS = 0, ///< indicates method finished successfully.
33  FASTQ_INVALID, ///< means that the sequence was invalid.
34  FASTQ_ORDER_ERROR, ///< means the methods are called out of order, like trying to read a file before opening it.
35  FASTQ_OPEN_ERROR, ///< means the file could not be opened.
36  FASTQ_CLOSE_ERROR, ///< means the file could not be closed.
37  FASTQ_READ_ERROR, ///< means that a problem occurred on a read.
38  FASTQ_NO_SEQUENCE_ERROR ///< means there were no errors, but no sequences read.
39  };
40 
41  /// Get the enum string for the status.
42  static const char* getStatusString(Status status);
43 
44 private:
45  static const char* enumString[];
46 };
47 
48 
49 #endif
FastQStatus::FASTQ_CLOSE_ERROR
@ FASTQ_CLOSE_ERROR
means the file could not be closed.
Definition: FastQStatus.h:36
FastQStatus::FASTQ_OPEN_ERROR
@ FASTQ_OPEN_ERROR
means the file could not be opened.
Definition: FastQStatus.h:35
FastQStatus
Status for FastQ operations.
Definition: FastQStatus.h:25
FastQStatus::FASTQ_ORDER_ERROR
@ FASTQ_ORDER_ERROR
means the methods are called out of order, like trying to read a file before opening it.
Definition: FastQStatus.h:34
FastQStatus::FASTQ_READ_ERROR
@ FASTQ_READ_ERROR
means that a problem occurred on a read.
Definition: FastQStatus.h:37
FastQStatus::FASTQ_INVALID
@ FASTQ_INVALID
means that the sequence was invalid.
Definition: FastQStatus.h:33
FastQStatus::getStatusString
static const char * getStatusString(Status status)
Get the enum string for the status.
Definition: FastQStatus.cpp:23
FastQStatus::FASTQ_SUCCESS
@ FASTQ_SUCCESS
indicates method finished successfully.
Definition: FastQStatus.h:32
FastQStatus::FASTQ_NO_SEQUENCE_ERROR
@ FASTQ_NO_SEQUENCE_ERROR
means there were no errors, but no sequences read.
Definition: FastQStatus.h:38
FastQStatus::Status
Status
Return value enum for the FastQFile class methods, indicating success or error codes.
Definition: FastQStatus.h:31