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

Go to the SVN repository for this file.

1 #ifndef OBJTOOLS_IDMAPPER___IDMAPPER__HPP
2 #define OBJTOOLS_IDMAPPER___IDMAPPER__HPP
3 
4 /* $Id: iidmapper.hpp 43044 2009-09-08 17:29:00Z dicuccio $
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  * Author: Frank Ludwig
30  *
31  * File Description: Definition of the IIdMapper interface and its
32  * implementation
33  *
34  */
35 
36 #include <corelib/ncbistd.hpp>
38 
40 BEGIN_objects_SCOPE // namespace ncbi::objects::
41 
42 /// General IdMapper interface
43 ///
44 /// This interface should suffice for typical IdMapper use, regardless of the
45 /// actual inplementation.
46 ///
48 {
49 public:
50  virtual ~IIdMapper() {};
51 
52  /// Map a single given CSeq_id_Handle to another.
53  /// @return
54  /// the mapped handle, or an invalid handle if a mapping is not possible.
55  virtual CSeq_id_Handle Map(const CSeq_id_Handle& id) = 0;
56 
57  virtual CRef<CSeq_loc> Map(const CSeq_loc& loc) = 0;
58 
59  /// Map all embedded IDs in a given object at once.
60  virtual void MapObject(CSerialObject&) = 0;
61 };
62 
63 
64 END_objects_SCOPE
66 
67 #endif // OBJTOOLS_IDMAPPER___IDMAPPER__HPP
Base class for all serializable objects.
Definition: serialbase.hpp:150
General IdMapper interface.
Definition: iidmapper.hpp:48
virtual CRef< CSeq_loc > Map(const CSeq_loc &loc)=0
virtual void MapObject(CSerialObject &)=0
Map all embedded IDs in a given object at once.
virtual CSeq_id_Handle Map(const CSeq_id_Handle &id)=0
Map a single given CSeq_id_Handle to another.
virtual ~IIdMapper()
Definition: iidmapper.hpp:50
Include a standard set of the NCBI C++ Toolkit most basic headers.
#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_XOBJREAD_EXPORT
Definition: ncbi_export.h:1315
Modified on Sat Feb 24 07:49:11 2024 by modify_doxy.py rev. 669887