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

Go to the SVN repository for this file.

1 /* $Id: BVector_data.hpp 62037 2014-03-10 16:26:03Z vasilche $
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 BVector_data.hpp
29 /// User-defined methods of the data storage class.
30 ///
31 /// This file was originally generated by application DATATOOL
32 /// using the following specifications:
33 /// 'seqtable.asn'.
34 ///
35 /// New methods or data members can be added to it if needed.
36 /// See also: BVector_data_.hpp
37 
38 
39 #ifndef OBJECTS_SEQTABLE_BVECTOR_DATA_HPP
40 #define OBJECTS_SEQTABLE_BVECTOR_DATA_HPP
41 
42 
43 // generated includes
45 
47 
48 // generated classes
49 
51 
52 BEGIN_objects_SCOPE // namespace ncbi::objects::
53 
54 /////////////////////////////////////////////////////////////////////////////
56 {
58 public:
59  // constructor
60  CBVector_data(void);
61  // destructor
62  ~CBVector_data(void);
63 
64  // Overload base setters to reset extra data fields
65  void Reset(void);
66 
67  void SetSize(const TSize& size);
68 
69  // set data from bvector object
70  // the ownership of the bvector object is taken,
71  // and the bvector should not be changed outside
72  void SetBitVector(const bm::bvector<>* bv);
73 
74  // return bvector object, create it if necessary from serialized data
75  const bm::bvector<>& GetBitVector(void) const {
76  if ( !m_BitVector ) {
77  x_CreateBitVector();
78  }
79  return *m_BitVector;
80  }
81 
82  // remove cached bvector object
83  void ResetBitVector(void);
84 
85 protected:
86  void x_CreateBitVector(void) const;
87 
89 
90 private:
91  // Prohibit copy constructor and assignment operator
94 
95 };
96 
97 /////////////////// CBVector_data inline methods
98 
99 // constructor
100 inline
102 {
103 }
104 
105 
106 /////////////////// end of CBVector_data inline methods
107 
108 
109 END_objects_SCOPE // namespace ncbi::objects::
110 
112 
113 
114 #endif // OBJECTS_SEQTABLE_BVECTOR_DATA_HPP
115 /* Original file checksum: lines: 86, chars: 2474, CRC32: d5fe6c20 */
Data storage class.
AutoPtr –.
Definition: ncbimisc.hpp:401
Class for serializing bm::bvector<> see include/util/bitset/bm.h Since bvector<> serialization doesn'...
const bm::bvector & GetBitVector(void) const
void SetSize(const TSize &size)
CBVector_data & operator=(const CBVector_data &value)
AutoPtr< const bm::bvector<> > m_BitVector
CBVector_data(const CBVector_data &value)
CBVector_data_Base Tparent
#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_SEQ_EXPORT
Definition: ncbi_export.h:825
virtual void Reset(void)
Reset the whole object.
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Compressed bitset (entry point to bm.h)
Modified on Sun Apr 21 03:43:32 2024 by modify_doxy.py rev. 669887