1 /* $Id: TMgr_AnnotCounts.hpp 414848 2013-09-27 10:09:37Z meric $
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 TMgr_AnnotCounts.hpp
29 /// User-defined methods of the data storage class.
30 ///
31 /// See also: TMgr_AnnotCounts_.hpp
32 
33 
34 #ifndef OBJECTS_TRACKMGR_TMGR_ANNOTCOUNTS_HPP
35 #define OBJECTS_TRACKMGR_TMGR_ANNOTCOUNTS_HPP
36 
37 #include <objects/trackmgr/TMgr_AnnotCounts_.hpp>
38 #include <objects/trackmgr/TMgr_AnnotType.hpp>
39 #include <objects/trackmgr/TMgr_TypeStat.hpp>
40 
41 
42 BEGIN_NCBI_SCOPE
43 BEGIN_objects_SCOPE // namespace ncbi::objects::
44 
45 
46 /////////////////////////////////////////////////////////////////////////////
47 class NCBI_TRACKMGR_EXPORT CTMgr_AnnotCounts : public CTMgr_AnnotCounts_Base
48 {
49     typedef CTMgr_AnnotCounts_Base Tparent;
50 public:
51     CTMgr_AnnotCounts(void);
52     ~CTMgr_AnnotCounts(void);
53 
54     void Add(ETMgr_AnnotType type, Int8 count);
55     void AddPosition(ETMgr_AnnotType type, Uint8 start, Uint8 stop);
56     objects::CTMgr_TypeStat::TCount GetCount(ETMgr_AnnotType type) const;
57 
58 protected:
59     typedef CRef<CTMgr_TypeStat> TTypeStatRef;
60     typedef map<int, TTypeStatRef> TCountMap;
61 
62 protected:
63     TTypeStatRef x_GetCount(ETMgr_AnnotType type) const;
64 
65 private:
66     mutable TCountMap m_Counts;
67 
68 private:
69     // Prohibit copy constructor and assignment operator
70     CTMgr_AnnotCounts(const CTMgr_AnnotCounts& value);
71     CTMgr_AnnotCounts& operator=(const CTMgr_AnnotCounts& value);
72 };
73 
74 
75 END_objects_SCOPE // namespace ncbi::objects::
76 END_NCBI_SCOPE
77 
78 
79 #endif // OBJECTS_TRACKMGR_TMGR_ANNOTCOUNTS_HPP
80 
81