NCBI C++ ToolKit
seq_masker_ostat_factory.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: seq_masker_ostat_factory.hpp 84663 2018-11-27 18:22:00Z ucko $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Aleksandr Morgulis
27  *
28  * File Description:
29  * Definition of CSeqMaskerUStatFactory class.
30  *
31  */
32 
33 #ifndef C_WIN_MASK_USTAT_FACTORY_H
34 #define C_WIN_MASK_USTAT_FACTORY_H
35 
36 #include <string>
37 
38 #include <corelib/ncbistre.hpp>
39 #include <corelib/ncbistr.hpp>
40 #include <corelib/ncbiargs.hpp>
41 
43 
44 class CSeqMaskerOstat;
45 
46 /**
47  **\brief Factory of CSeqMaskerOstat objects.
48  **/
50 {
51 public:
52 
53  /**
54  **\brief Exceptions that CSeqMaskerOstatFactory might throw.
55  **/
57  {
58  public:
59 
60  enum EErrCode
61  {
62  eBadName, /**< Unknown format name. */
63  eCreateFail /**< Failure to create the requested object. */
64  };
65 
66  /**
67  **\brief Get a description string for this exception.
68  **\return C-style description string
69  **/
70  virtual const char * GetErrCodeString() const override;
71 
74  };
75 
76  /**
77  **\brief Method used to create a CSeqMakserOstat object by format name.
78  **
79  ** The method instantiates the appropriate subclass of CSeqMaskerOstat
80  ** corresponding to the name of the file format, or throws an exception
81  ** if the format name is not recognized.
82  **
83  **\param ustat_type the name of the unit counts file format
84  **\param name the name of the file to save unit counts data to
85  **\param use_ba whether to use bit array based optimizations
86  **\param metadata metadata string
87  **\return pointer to the newly created object
88  **/
89  static CSeqMaskerOstat * create(
90  const string & ustat_type, const string & name, bool use_ba,
91  string const & metadata = "" );
92 
93  /**
94  **\brief Method used to create a CSeqMakserOstat object by format name.
95  **
96  ** The method instantiates the appropriate subclass of CSeqMaskerOstat
97  ** corresponding to the name of the file format, or throws an exception
98  ** if the format name is not recognized.
99  **
100  **\param ustat_type the name of the unit counts file format
101  **\param os the output stream
102  **\param use_ba whether to use bit array based optimizations
103  **\param metadata metadata string
104  **\return pointer to the newly created object
105  **/
106  static CSeqMaskerOstat * create(
107  const string & ustat_type, CNcbiOstream & os, bool use_ba,
108  string const & metadata = "" );
109 };
110 
112 
113 #endif
Exceptions that CSeqMaskerOstatFactory might throw.
NCBI_EXCEPTION_DEFAULT(CSeqMaskerOstatFactoryException, CException)
Factory of CSeqMaskerOstat objects.
Base class for computing and saving unit counts data.
The NCBI C++ standard methods for dealing with std::string.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
#define NCBI_XALGOWINMASK_EXPORT
Definition: ncbi_export.h:1033
Defines command line argument related classes.
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
Modified on Thu Apr 25 08:22:06 2024 by modify_doxy.py rev. 669887