NCBI C++ ToolKit
Seq_descr_.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 Seq_descr_.hpp
29 /// Data storage class.
30 ///
31 /// This file was generated by application DATATOOL
32 /// using the following specifications:
33 /// <a href="http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seq/seq.asn">seq.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seq/seq.def">seq.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_SEQ_SEQ_DESCR_BASE_HPP
42 #define OBJECTS_SEQ_SEQ_DESCR_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
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 CSeqdesc;
61 
62 
63 // generated classes
64 
65 
66 /** @addtogroup dataspec_NCBI_Sequence
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 ///*** Descriptors *****************************
73 ///*
74 ///
75 /// CSeq_descr_Base --
76 ///
77 
79 {
81 public:
82  // constructor
83  CSeq_descr_Base(void);
84  // destructor
85  virtual ~CSeq_descr_Base(void);
86 
87  // type info
89 
90  // types
91  typedef list< CRef< CSeqdesc > > Tdata;
92 
93  // getters
94  // setters
95 
96  /// Check if a value has been assigned to data member.
97  ///
98  /// Data member is mandatory;
99  /// its type is defined as 'typedef list< CRef< CSeqdesc > > Tdata'
100  /// @return
101  /// - true, if a value has been assigned.
102  /// - false, otherwise.
103  bool IsSet(void) const;
104 
105  /// Check if it is safe to call Get method.
106  ///
107  /// @return
108  /// - true, if the data member is getatable.
109  /// - false, otherwise.
110  bool CanGet(void) const;
111 
112  /// Reset data member.
113  void Reset(void);
114 
115  /// Get the member data.
116  ///
117  /// @return
118  /// Reference to the member data.
119  const Tdata& Get(void) const;
120 
121  /// Assign a value to data member.
122  ///
123  /// @return
124  /// Reference to the data value.
125  Tdata& Set(void);
126  /// Conversion operator to 'const Tdata' type.
127  operator const Tdata& (void) const;
128 
129  /// Conversion operator to 'Tdata' type.
130  operator Tdata& (void);
131 
132 
133 
134 
135 private:
136  // Prohibit copy constructor and assignment operator
139 
140  // data
141  Uint4 m_set_State[1];
142  list< CRef< CSeqdesc > > m_data;
143 };
144 
145 /* @} */
146 
147 
148 
149 
150 
151 ///////////////////////////////////////////////////////////
152 ///////////////////// inline methods //////////////////////
153 ///////////////////////////////////////////////////////////
154 inline
155 bool CSeq_descr_Base::IsSet(void) const
156 {
157  return ((m_set_State[0] & 0x3) != 0);
158 }
159 
160 inline
161 bool CSeq_descr_Base::CanGet(void) const
162 {
163  return true;
164 }
165 
166 inline
168 {
169  return m_data;
170 }
171 
172 inline
174 {
175  m_set_State[0] |= 0x1;
176  return m_data;
177 }
178 
179 inline
180 CSeq_descr_Base::operator const CSeq_descr_Base::Tdata& (void) const
181 {
182  return m_data;
183 }
184 
185 inline
186 CSeq_descr_Base::operator CSeq_descr_Base::Tdata& (void)
187 {
188  m_set_State[0] |= 0x1;
189  return m_data;
190 }
191 
192 ///////////////////////////////////////////////////////////
193 ////////////////// end of inline methods //////////////////
194 ///////////////////////////////////////////////////////////
195 
196 
197 
198 
199 
200 END_objects_SCOPE // namespace ncbi::objects::
201 
203 
204 
205 #endif // OBJECTS_SEQ_SEQ_DESCR_BASE_HPP
const Tdata & Get(void) const
Get the member data.
Definition: Seq_descr_.hpp:167
#define DECLARE_INTERNAL_TYPE_INFO()
Definition: serialbase.hpp:764
unsigned int Uint4
Alias for unsigned int.
Definition: ncbitype.h:121
Tdata & Set(void)
Assign a value to data member.
Definition: Seq_descr_.hpp:173
list< CRef< CSeqdesc > > m_data
Definition: Seq_descr_.hpp:142
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:101
*** Descriptors ***************************** *
Definition: Seq_descr_.hpp:78
CSerialObject Tparent
Definition: Seq_descr_.hpp:80
#define NCBI_SEQ_EXPORT
Definition: ncbi_export.h:824
list< CRef< CSeqdesc > > Tdata
Definition: Seq_descr_.hpp:91
bool IsSet(void) const
Check if a value has been assigned to data member.
Definition: Seq_descr_.hpp:155
Base class for all serializable objects.
Definition: serialbase.hpp:148
const TYPE & Get(const CNamedParameterList *param)
CObject & operator=(const CObject &src) THROWS_NONE
Assignment operator.
Definition: ncbiobj.hpp:483
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:98
Uint4 m_set_State[1]
Definition: Seq_descr_.hpp:141
bool CanGet(void) const
Check if it is safe to call Get method.
Definition: Seq_descr_.hpp:161
Modified on Sun Jun 26 17:18:31 2016 by modify_doxy.py rev. 426318