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

Go to the SVN repository for this file.

1 /* $Id$
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 ValidError_.hpp
29 /// Data storage class.
30 ///
31 /// This file was generated by application DATATOOL
32 /// using the following specifications:
33 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/valerr/valerr.asn">valerr.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/valerr/valerr.def">valerr.def</a>
36 ///
37 /// ATTENTION:
38 /// Don't edit or commit this file into CVS as this file will
39 /// be overridden (by DATATOOL) without warning!
40 
41 #ifndef OBJECTS_VALERR_VALIDERROR_BASE_HPP
42 #define OBJECTS_VALERR_VALIDERROR_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <vector>
49 
51 
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
55 #endif
56 BEGIN_objects_SCOPE // namespace ncbi::objects::
57 
58 
59 // forward declarations
60 class CValidErrItem;
61 
62 
63 // generated classes
64 
65 
66 /** @addtogroup dataspec_NCBI_ValErrors
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 ///
73 /// CValidError_Base --
74 ///
75 
77 {
79 public:
80  // constructor
81  CValidError_Base(void);
82  // destructor
83  virtual ~CValidError_Base(void);
84 
85  // type info
87 
88  // types
89  typedef CValidErrItem C_E;
90  typedef vector< CRef< CValidErrItem > > TErrs;
91 
92  // member index
93  enum class E_memberIndex {
94  e__allMandatory = 0,
95  e_errs
96  };
98 
99  // getters
100  // setters
101 
102  /// Check if a value has been assigned to Errs data member.
103  ///
104  /// Data member Errs is mandatory;
105  /// its type is defined as 'typedef vector< CRef< CValidErrItem > > TErrs'
106  /// @return
107  /// - true, if a value has been assigned.
108  /// - false, otherwise.
109  bool IsSetErrs(void) const;
110 
111  /// Check if it is safe to call GetErrs method.
112  ///
113  /// @return
114  /// - true, if the data member is getatable.
115  /// - false, otherwise.
116  bool CanGetErrs(void) const;
117 
118  /// Reset Errs data member.
119  void ResetErrs(void);
120 
121  /// Get the Errs member data.
122  ///
123  /// @return
124  /// Reference to the member data.
125  const TErrs& GetErrs(void) const;
126 
127  /// Assign a value to Errs data member.
128  ///
129  /// @return
130  /// Reference to the data value.
131  TErrs& SetErrs(void);
132 
133  /// Reset the whole object
134  virtual void Reset(void);
135 
136 
137 private:
138  // Prohibit copy constructor and assignment operator
141 
142  // data
143  Uint4 m_set_State[1];
144  vector< CRef< CValidErrItem > > m_Errs;
145 };
146 
147 /* @} */
148 
149 
150 
151 
152 
153 ///////////////////////////////////////////////////////////
154 ///////////////////// inline methods //////////////////////
155 ///////////////////////////////////////////////////////////
156 inline
158 {
159  return ((m_set_State[0] & 0x3) != 0);
160 }
161 
162 inline
164 {
165  return true;
166 }
167 
168 inline
170 {
171  return m_Errs;
172 }
173 
174 inline
176 {
177  m_set_State[0] |= 0x1;
178  return m_Errs;
179 }
180 
181 ///////////////////////////////////////////////////////////
182 ////////////////// end of inline methods //////////////////
183 ///////////////////////////////////////////////////////////
184 
185 
186 
187 
188 
189 END_objects_SCOPE // namespace ncbi::objects::
190 
192 
193 
194 #endif // OBJECTS_VALERR_VALIDERROR_BASE_HPP
Base class for all serializable objects.
Definition: serialbase.hpp:150
CValidError_Base –.
Definition: ValidError_.hpp:77
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_VALERR_EXPORT
Definition: ncbi_export.h:921
CSerialObject Tparent
Definition: ValidError_.hpp:78
const TErrs & GetErrs(void) const
Get the Errs member data.
CValidError_Base & operator=(const CValidError_Base &)
bool IsSetErrs(void) const
Check if a value has been assigned to Errs data member.
Tparent::CMemberIndex< E_memberIndex, 2 > TmemberIndex
Definition: ValidError_.hpp:97
TErrs & SetErrs(void)
Assign a value to Errs data member.
vector< CRef< CValidErrItem > > TErrs
Definition: ValidError_.hpp:90
Uint4 m_set_State[1]
vector< CRef< CValidErrItem > > m_Errs
CValidErrItem C_E
Definition: ValidError_.hpp:89
CValidError_Base(const CValidError_Base &)
bool CanGetErrs(void) const
Check if it is safe to call GetErrs method.
Modified on Thu Feb 22 17:10:03 2024 by modify_doxy.py rev. 669887