NCBI C++ ToolKit
cmd_del_seq_graph.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: cmd_del_seq_graph.cpp 29927 2014-03-13 20:16:12Z filippov $
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  * Authors: Roman Katargin, Igor Filippov
27  */
28 
29 
30 #include <ncbi_pch.hpp>
31 
33 
36 
38 {
40  m_Saved.Reset();
42  m_Orig.Remove();
43 }
44 
46 {
47  if (m_Saved && m_Parent_handle)
48  {
50  m_Orig = feh.AddGraph(*m_Saved);
51  m_Saved.Reset();
52  }
53 }
54 
56 {
57  return "Delete graph";
58 }
59 
CSeq_graph_Handle m_Orig
virtual string GetLabel()
CConstRef< CSeq_graph > m_Saved
CSeq_annot_Handle m_Parent_handle
virtual void Execute()
Do the editing action.
virtual void Unexecute()
Undo (opposite to Execute())
USING_SCOPE(objects)
const CSeq_annot_Handle & GetAnnot(void) const
Get an annotation handle for the current seq-graph.
CConstRef< CSeq_graph > GetSeq_graph(void) const
Get constant reference to the current seq-graph.
CSeq_graph_Handle AddGraph(const CSeq_graph &new_obj) const
void Remove(void) const
Remove the Seq-graph from Seq-annot.
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:1439
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
Modified on Wed Feb 21 09:58:27 2024 by modify_doxy.py rev. 669887