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

Go to the SVN repository for this file.

1 #ifndef ALGO_GNOMON___IDHANDLER__HPP
2 #define ALGO_GNOMON___IDHANDLER__HPP
3 
4 /* $Id: id_handler.hpp 65385 2014-11-25 16:39:11Z whlavina $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Vyacheslav Chetvernin
30  *
31  * File Description:
32  *
33  */
34 
35 #include <corelib/ncbistl.hpp>
36 #include <corelib/ncbiobj.hpp>
37 
40 class CObject_id;
41 class CSeq_id;
42 class CScope;
45 
46 BEGIN_SCOPE(gnomon)
47 
48 class CIdHandler {
49 public:
50  CIdHandler(CScope& scope);
51 
52  static string ToString(const CSeq_id& id);
53 
54  static CRef<CSeq_id> ToSeq_id(const string& str);
55 
56  static CRef<CSeq_id> GnomonMRNA(Int8 id);
57  static CRef<CSeq_id> GnomonProtein(Int8 id);
58 
59  CConstRef<CSeq_id> ToCanonical(const CSeq_id& id) const;
60 
61  static bool IsId(const CObject_id& obj);
62  static Int8 GetId(const CObject_id& obj);
63  static void SetId(CObject_id& obj, Int8 value);
64 
65 private:
67 };
68 
70 
71 END_SCOPE(gnomon)
73 
74 #endif // ALGO_GNOMON___IDHANDLER__HPP
CScope & m_Scope
Definition: id_handler.hpp:66
CScope –.
Definition: scope.hpp:92
static const char * str(char *buf, int n)
Definition: stats.c:84
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,...
int64_t Int8
8-byte (64-bit) signed integer
Definition: ncbitype.h:104
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
USING_SCOPE(objects)
string GetDNASequence(CConstRef< objects::CSeq_id > id, CScope &scope)
Definition: id_handler.cpp:130
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
The NCBI C++/STL use hints.
string ToString(const wxRect &rc)
Definition: wx_utils.cpp:773
Modified on Wed Sep 04 15:02:45 2024 by modify_doxy.py rev. 669887