NCBI C++ ToolKit
Seq_loc_equiv_.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_loc_equiv_.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/seqloc/seqloc.asn">seqloc.asn</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objects/seqloc/seqloc.def">seqloc.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_SEQLOC_SEQ_LOC_EQUIV_BASE_HPP
42 #define OBJECTS_SEQLOC_SEQ_LOC_EQUIV_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 CSeq_loc;
61 
62 
63 // generated classes
64 
65 
66 /** @addtogroup dataspec_NCBI_Seqloc
67  *
68  * @{
69  */
70 
71 /////////////////////////////////////////////////////////////////////////////
72 /// for a set of equivalent locations
73 ///
74 /// CSeq_loc_equiv_Base --
75 ///
76 
78 {
80 public:
81  // constructor
82  CSeq_loc_equiv_Base(void);
83  // destructor
84  virtual ~CSeq_loc_equiv_Base(void);
85 
86  // type info
88 
89  // types
90  typedef list< CRef< CSeq_loc > > Tdata;
91 
92  // getters
93  // setters
94 
95  /// Check if a value has been assigned to data member.
96  ///
97  /// Data member is mandatory;
98  /// its type is defined as 'typedef list< CRef< CSeq_loc > > Tdata'
99  /// @return
100  /// - true, if a value has been assigned.
101  /// - false, otherwise.
102  bool IsSet(void) const;
103 
104  /// Check if it is safe to call Get method.
105  ///
106  /// @return
107  /// - true, if the data member is getatable.
108  /// - false, otherwise.
109  bool CanGet(void) const;
110 
111  /// Reset data member.
112  void Reset(void);
113 
114  /// Get the member data.
115  ///
116  /// @return
117  /// Reference to the member data.
118  const Tdata& Get(void) const;
119 
120  /// Assign a value to data member.
121  ///
122  /// @return
123  /// Reference to the data value.
124  Tdata& Set(void);
125 
126  /// Conversion operator to 'const Tdata' type.
127  operator const Tdata& (void) const;
128  /// Conversion operator to 'Tdata' type.
129  operator Tdata& (void);
130 
131 
132 
133 private:
134  // Prohibit copy constructor and assignment operator
137 
138  // data
139  Uint4 m_set_State[1];
140  list< CRef< CSeq_loc > > m_data;
141 };
142 
143 /* @} */
144 
145 
146 
147 
148 
149 ///////////////////////////////////////////////////////////
150 ///////////////////// inline methods //////////////////////
151 ///////////////////////////////////////////////////////////
152 inline
154 {
155  return ((m_set_State[0] & 0x3) != 0);
156 }
157 
158 inline
160 {
161  return true;
162 }
163 
164 inline
166 {
167  return m_data;
168 }
169 
170 inline
172 {
173  m_set_State[0] |= 0x1;
174  return m_data;
175 }
176 
177 inline
178 CSeq_loc_equiv_Base::operator const CSeq_loc_equiv_Base::Tdata& (void) const
179 {
180  return m_data;
181 }
182 
183 inline
184 CSeq_loc_equiv_Base::operator CSeq_loc_equiv_Base::Tdata& (void)
185 {
186  m_set_State[0] |= 0x1;
187  return m_data;
188 }
189 
190 ///////////////////////////////////////////////////////////
191 ////////////////// end of inline methods //////////////////
192 ///////////////////////////////////////////////////////////
193 
194 
195 
196 
197 
198 END_objects_SCOPE // namespace ncbi::objects::
199 
201 
202 
203 #endif // OBJECTS_SEQLOC_SEQ_LOC_EQUIV_BASE_HPP
for a set of equivalent locations
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
#define NCBI_SEQLOC_EXPORT
Definition: ncbi_export.h:776
bool CanGet(void) const
Check if it is safe to call Get method.
CSerialObject Tparent
const Tdata & Get(void) const
Get the member data.
list< CRef< CSeq_loc > > Tdata
bool IsSet(void) const
Check if a value has been assigned to data member.
Tdata & Set(void)
Assign a value to data member.
list< CRef< CSeq_loc > > m_data
CSeq_loc_equiv_Base(const CSeq_loc_equiv_Base &)
CSeq_loc_equiv_Base & operator=(const CSeq_loc_equiv_Base &)
const TYPE & Get(const CNamedParameterList *param)
Modified on Tue Apr 23 07:40:31 2024 by modify_doxy.py rev. 669887