NCBI C++ ToolKit
Sequence_list_.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 Sequence_list_.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/macro/macro.asn">macro.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/macro/macro.def">macro.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_MACRO_SEQUENCE_LIST_BASE_HPP
42 #define OBJECTS_MACRO_SEQUENCE_LIST_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
49 #include <string>
50 
52 
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
56 #endif
57 BEGIN_objects_SCOPE // namespace ncbi::objects::
58 
59 
60 // generated classes
61 
62 
63 /** @addtogroup dataspec_NCBI_Macro
64  *
65  * @{
66  */
67 
68 /////////////////////////////////////////////////////////////////////////////
69 ///
70 /// CSequence_list_Base --
71 ///
72 
74 {
76 public:
77  // constructor
78  CSequence_list_Base(void);
79  // destructor
80  virtual ~CSequence_list_Base(void);
81 
82  // type info
84 
85  // types
86  typedef list< string > Tdata;
87 
88  // getters
89  // setters
90 
91  /// Check if a value has been assigned to data member.
92  ///
93  /// Data member is mandatory;
94  /// its type is defined as 'typedef list< string > Tdata'
95  /// @return
96  /// - true, if a value has been assigned.
97  /// - false, otherwise.
98  bool IsSet(void) const;
99 
100  /// Check if it is safe to call Get method.
101  ///
102  /// @return
103  /// - true, if the data member is getatable.
104  /// - false, otherwise.
105  bool CanGet(void) const;
106 
107  /// Reset data member.
108  void Reset(void);
109 
110  /// Get the member data.
111  ///
112  /// @return
113  /// Reference to the member data.
114  const Tdata& Get(void) const;
115 
116  /// Assign a value to data member.
117  ///
118  /// @return
119  /// Reference to the data value.
120  Tdata& Set(void);
121 
122  /// Conversion operator to 'const Tdata' type.
123  operator const Tdata& (void) const;
124  /// Conversion operator to 'Tdata' type.
125  operator Tdata& (void);
126 
127 
128 
129 private:
130  // Prohibit copy constructor and assignment operator
133 
134  // data
136  list< string > m_data;
137 };
138 
139 /* @} */
140 
141 
142 
143 
144 
145 ///////////////////////////////////////////////////////////
146 ///////////////////// inline methods //////////////////////
147 ///////////////////////////////////////////////////////////
148 inline
150 {
151  return ((m_set_State[0] & 0x3) != 0);
152 }
153 
154 inline
156 {
157  return true;
158 }
159 
160 inline
162 {
163  return m_data;
164 }
165 
166 inline
168 {
169  m_set_State[0] |= 0x1;
170  return m_data;
171 }
172 
173 inline
174 CSequence_list_Base::operator const CSequence_list_Base::Tdata& (void) const
175 {
176  return m_data;
177 }
178 
179 inline
180 CSequence_list_Base::operator CSequence_list_Base::Tdata& (void)
181 {
182  m_set_State[0] |= 0x1;
183  return m_data;
184 }
185 
186 ///////////////////////////////////////////////////////////
187 ////////////////// end of inline methods //////////////////
188 ///////////////////////////////////////////////////////////
189 
190 
191 
192 
193 
194 END_objects_SCOPE // namespace ncbi::objects::
195 
197 
198 
199 #endif // OBJECTS_MACRO_SEQUENCE_LIST_BASE_HPP
CSequence_list_Base –.
Base class for all serializable objects.
Definition: serialbase.hpp:150
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
Tdata & Set(void)
Assign a value to data member.
CSequence_list_Base(const CSequence_list_Base &)
list< string > m_data
bool IsSet(void) const
Check if a value has been assigned to data member.
CSerialObject Tparent
const Tdata & Get(void) const
Get the member data.
bool CanGet(void) const
Check if it is safe to call Get method.
list< string > Tdata
void Reset(void)
Reset data member.
virtual ~CSequence_list_Base(void)
CSequence_list_Base & operator=(const CSequence_list_Base &)
Modified on Sat Jun 08 14:19:37 2024 by modify_doxy.py rev. 669887