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

Go to the SVN repository for this file.

1 /* $Id: flatfile_message.hpp 96520 2022-04-11 15:36:00Z stakhovv $
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: Justin Foley
27  *
28  * File Description:
29  *
30  */
31 
32 #ifndef _FLATFILE_MESSAGE_HPP_
33 #define _FLATFILE_MESSAGE_HPP_
34 
35 #include <corelib/ncbistd.hpp>
37 
40 
41 
43 {
44 public:
45  CFlatFileMessage(const string& module,
46  EDiagSev severity,
47  int code,
48  int subcode,
49  const string& text,
50  int lineNum = -1);
51 
52  virtual ~CFlatFileMessage();
53 
54  CFlatFileMessage* Clone(void) const override;
55  void Dump(CNcbiOstream& out) const override;
56  void DumpAsXML(CNcbiOstream& out) const override;
57  void Write(CNcbiOstream& out) const override;
58  void WriteAsXML(CNcbiOstream& out) const override;
59  const string& GetModule() const;
60  int GetCode(void) const override;
61  int GetSubCode(void) const override;
62  int GetLineNum(void) const;
63 
64 private:
65  string m_Module;
66  int m_Code;
67  int m_Subcode;
68  int m_LineNum;
69 };
70 
73 
74 
75 #endif
Include a standard set of the NCBI C++ Toolkit most basic headers.
std::ofstream out("events_result.xml")
main entry point for tests
EDiagSev
Severity level for the posted diagnostics.
Definition: ncbidiag.hpp:650
void Write(CObjectOStream &out, TConstObjectPtr object, const CTypeRef &type)
Definition: serial.cpp:55
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
static void text(MDB_val *v)
Definition: mdb_dump.c:62
void Dump(CSplitCacheApp *app, const C &obj, ESerialDataFormat format, const string &key, const string &suffix=kEmptyStr)
Definition: inftrees.h:24
Modified on Sat May 18 11:40:30 2024 by modify_doxy.py rev. 669887