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

Go to the SVN repository for this file.

1 #ifndef __OBJMGR__EDITS_DB_ENGINE__HPP
2 #define __OBJMGR__EDITS_DB_ENGINE__HPP
3 
4 /* $Id: edits_db_engine.hpp 33815 2007-05-04 17:18:18Z kazimird $
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: Maxim Didenko
30 *
31 * File Description:
32 *
33 */
34 
35 #include <corelib/ncbistd.hpp>
36 #include <corelib/ncbiobj.hpp>
37 #include <corelib/ncbistre.hpp>
39 
40 #include <list>
41 
44 
45 class CSeqEdit_Cmd;
46 class CSeq_id_Handle;
47 
49 {
50 public:
51  typedef list<CRef<CSeqEdit_Cmd> > TCommands;
53 
54  virtual ~IEditsDBEngine();
55 
56  virtual bool HasBlob(const string& blobid) const = 0;
57  virtual bool FindSeqId(const CSeq_id_Handle& id, string& blobid) const = 0;
58  virtual void NotifyIdChanged(const CSeq_id_Handle& id,
59  const string& newblobid) = 0;
60 
61  virtual void SaveCommand(const CSeqEdit_Cmd& cmd) = 0;
62 
63  virtual void BeginTransaction() = 0;
64  virtual void CommitTransaction() = 0;
65  virtual void RollbackTransaction() = 0;
66 
67  virtual void GetCommands(const string& blobid, TCommands& cmds) const = 0;
68 
69 };
70 
72 
74 
75 template<>
77 {
78 public:
80  {
81  CPluginManager_DllResolver* resolver =
84  kEmptyStr,
87  resolver->SetDllNamePrefix("ncbi");
88  return resolver;
89  }
90 };
91 
93 
94 #endif // __OBJMGR__EDITS_DB_ENGINE__HPP
CPluginManager_DllResolver * operator()(void)
Template function to create dll resolver for interface.
CInterfaceVersion<> –.
CObject –.
Definition: ncbiobj.hpp:180
Service class for DLLs resolution.
virtual void NotifyIdChanged(const CSeq_id_Handle &id, const string &newblobid)=0
virtual bool HasBlob(const string &blobid) const =0
list< CRef< CSeqEdit_Cmd > > TCommands
virtual void GetCommands(const string &blobid, TCommands &cmds) const =0
map< CSeq_id_Handle, string > TChangedIds
virtual bool FindSeqId(const CSeq_id_Handle &id, string &blobid) const =0
virtual void BeginTransaction()=0
virtual void RollbackTransaction()=0
virtual void CommitTransaction()=0
virtual void SaveCommand(const CSeqEdit_Cmd &cmd)=0
Include a standard set of the NCBI C++ Toolkit most basic headers.
NCBI_DECLARE_INTERFACE_VERSION(objects::IEditsDBEngine, "xeditsdbengine", 1, 0, 0)
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
@ eAutoUnload
Definition: ncbidll.hpp:144
virtual void SetDllNamePrefix(const string &prefix)
Set DLL file name prefix.
#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
#define kEmptyStr
Definition: ncbistr.hpp:123
#define NCBI_XOBJMGR_EXPORT
Definition: ncbi_export.h:1307
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
NCBI C++ stream class wrappers for triggering between "new" and "old" C++ stream libraries.
Plugin manager (using class factory paradigm).
Modified on Wed Apr 24 14:18:38 2024 by modify_doxy.py rev. 669887