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

Go to the SVN repository for this file.

1 /* $Id: TMgr_Message.hpp 61036 2013-12-20 21:20:06Z meric $
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  */
27 
28 /// @file TMgr_Message.hpp
29 /// User-defined methods of the data storage class.
30 ///
31 /// This file was originally generated by application DATATOOL
32 /// using the following specifications:
33 /// 'trackmgr.asn'.
34 ///
35 /// New methods or data members can be added to it if needed.
36 /// See also: TMgr_Message_.hpp
37 
38 
39 #ifndef INTERNAL_TRACKMGR_OBJECTS_TRACKMGR_TMGR_MESSAGE_HPP
40 #define INTERNAL_TRACKMGR_OBJECTS_TRACKMGR_TMGR_MESSAGE_HPP
41 
42 
44 #include <serial/enumvalues.hpp>
45 
46 
48 BEGIN_objects_SCOPE
49 
50 
51 /////////////////////////////////////////////////////////////////////////////
53 {
55 public:
56  CTMgr_Message(void);
57  CTMgr_Message(TLevel level);
58  CTMgr_Message(TLevel level, const TMessage& message);
59  ~CTMgr_Message(void);
60 
61  operator string() const
62  {
63  static const CEnumeratedTypeValues* lvls = GetTypeInfo_enum_ETMgr_MessageLevel();
64  return lvls->FindName(GetLevel(), false) + ": " + GetMessage();
65  }
66 
67  static int GetDefaultMesgLevel(void)
68  {
70  }
71 
72  static int GetMesgLevel(const string& level)
73  {
74  static const CEnumeratedTypeValues* lvls = GetTypeInfo_enum_ETMgr_MessageLevel();
75  return lvls->FindValue(level);
76  }
77 
78 private:
79  // Prohibit copy constructor and assignment operator
82 
83 };
84 
85 
86 inline
88 {
89 }
90 
91 
92 END_objects_SCOPE
94 
95 #endif // INTERNAL_TRACKMGR_OBJECTS_TRACKMGR_TMGR_MESSAGE_HPP
96 
Data storage class.
CTMgr_Message_Base –.
CTMgr_Message(const CTMgr_Message &value)
CTMgr_Message & operator=(const CTMgr_Message &value)
static int GetMesgLevel(const string &level)
static int GetDefaultMesgLevel(void)
CTMgr_Message_Base Tparent
string
Definition: cgiapp.hpp:687
const string & FindName(TEnumValueType value, bool allowBadValue) const
Find name of the enum by its numeric value.
Definition: enumerated.cpp:146
TEnumValueType FindValue(const CTempString &name) const
Find numeric value by the name of the enum.
Definition: enumerated.cpp:124
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
const TMessage & GetMessage(void) const
Get the Message member data.
TLevel GetLevel(void) const
Get the Level member data.
@ eTMgr_MessageLevel_info
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
#define NCBI_TRACKMGR_EXPORT
Modified on Mon Apr 22 04:06:37 2024 by modify_doxy.py rev. 669887