NCBI C++ ToolKit
IdList_.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 IdList_.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/objtools/eutils/elink/elink.dtd">elink.dtd</a>
34 /// and additional tune-up parameters:
35 /// <a href="/IEB/ToolBox/CPP_DOC/lxr/source/src/objtools/eutils/elink/elink.def">elink.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 elink__OBJTOOLS_EUTILS_ELINK_IDLIST_BASE_HPP
42 #define elink__OBJTOOLS_EUTILS_ELINK_IDLIST_BASE_HPP
43 
44 // standard includes
45 #include <serial/serialbase.hpp>
46 
47 // generated includes
48 #include <list>
49 
50 #ifndef BEGIN_elink_SCOPE
51 # define BEGIN_elink_SCOPE BEGIN_SCOPE(elink)
52 # define END_elink_SCOPE END_SCOPE(elink)
53 #endif
54 BEGIN_elink_SCOPE // namespace elink::
55 
56 
57 // forward declarations
58 class CId;
59 
60 
61 // generated classes
62 
63 
64 /** @addtogroup dataspec_elink
65  *
66  * @{
67  */
68 
69 /////////////////////////////////////////////////////////////////////////////
70 ///
71 /// CIdList_Base --
72 ///
73 
74 class NCBI_EUTILS_EXPORT CIdList_Base : public NCBI_NS_NCBI::CSerialObject
75 {
76  typedef NCBI_NS_NCBI::CSerialObject Tparent;
77 public:
78  // constructor
79  CIdList_Base(void);
80  // destructor
81  virtual ~CIdList_Base(void);
82 
83  // type info
85 
86  // types
87  typedef CId C_E;
88  typedef NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CId > > TId;
89 
90  // member index
91  enum class E_memberIndex {
92  e__allMandatory = 0,
93  e_Id
94  };
95  typedef Tparent::CMemberIndex<E_memberIndex, 2> TmemberIndex;
96 
97  // getters
98  // setters
99 
100  /// \d+
101  /// Check if a value has been assigned to Id data member.
102  ///
103  /// Data member Id is optional;
104  /// its type is defined as 'typedef NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CId > > TId'
105  /// @return
106  /// - true, if a value has been assigned.
107  /// - false, otherwise.
108  bool IsSetId(void) const;
109 
110  /// Check if it is safe to call GetId method.
111  ///
112  /// @return
113  /// - true, if the data member is getatable.
114  /// - false, otherwise.
115  bool CanGetId(void) const;
116 
117  /// Reset Id data member.
118  void ResetId(void);
119 
120  /// Get the Id member data.
121  ///
122  /// @return
123  /// Reference to the member data.
124  const TId& GetId(void) const;
125 
126  /// Assign a value to Id data member.
127  ///
128  /// @return
129  /// Reference to the data value.
130  TId& SetId(void);
131 
132  /// Reset the whole object
133  virtual void Reset(void);
134 
135 
136 private:
137  // Prohibit copy constructor and assignment operator
140 
141  // data
142  Uint4 m_set_State[1];
143  NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< CId > > m_Id;
144 };
145 
146 /* @} */
147 
148 
149 
150 
151 
152 ///////////////////////////////////////////////////////////
153 ///////////////////// inline methods //////////////////////
154 ///////////////////////////////////////////////////////////
155 inline
156 bool CIdList_Base::IsSetId(void) const
157 {
158  return ((m_set_State[0] & 0x3) != 0);
159 }
160 
161 inline
162 bool CIdList_Base::CanGetId(void) const
163 {
164  return true;
165 }
166 
167 inline
169 {
170  return m_Id;
171 }
172 
173 inline
175 {
176  m_set_State[0] |= 0x1;
177  return m_Id;
178 }
179 
180 ///////////////////////////////////////////////////////////
181 ////////////////// end of inline methods //////////////////
182 ///////////////////////////////////////////////////////////
183 
184 
185 
186 
187 
188 END_elink_SCOPE // namespace elink::
189 
190 
191 #endif // elink__OBJTOOLS_EUTILS_ELINK_IDLIST_BASE_HPP
CIdList_Base –.
Definition: IdList_.hpp:75
CId –.
Definition: Id.hpp:64
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103
#define NCBI_EUTILS_EXPORT
Definition: ncbi_export.h:1460
Modified on Fri Sep 20 14:58:33 2024 by modify_doxy.py rev. 669887