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

Go to the SVN repository for this file.

1 /* $Id: molinfoedit_util.hpp 45225 2020-06-18 17:52:36Z asztalos $
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: Colleen Bollin
27  */
28 #ifndef _MOLINFOEDIT_UTIL_H_
29 #define _MOLINFOEDIT_UTIL_H_
30 
31 #include <corelib/ncbistd.hpp>
33 
38 #include <objects/seq/MolInfo.hpp>
39 
47 
49 
50 
52 CRef<CCmdComposite> ApplyMolInfoValuesTableToSeqEntry (CRef<objects::CSeq_table>values_table, objects::CSeq_entry_Handle seh, bool add_confirmed = true);
53 
54 CRef<objects::CSeq_table> BuildCommentDescriptorValuesTableFromSeqEntry (objects::CSeq_entry_Handle seh, const string& label);
55 CRef<CCmdComposite> ApplyCommentValuesTableToSeqEntry (CRef<objects::CSeq_table>values_table, objects::CSeq_entry_Handle seh, const string& label);
56 
57 CRef<objects::CSeq_table> BuildDBLinkValuesTableFromSeqEntry (objects::CSeq_entry_Handle seh);
58 CRef<CCmdComposite> ApplyDBLinkValuesTableToSeqEntry (CRef<objects::CSeq_table>values_table, objects::CSeq_entry_Handle seh);
59 
60 vector<string> GetMoleculeTypeOptions (CSourceRequirements::EWizardType wizard_type);
62 CRef<objects::CSeq_table> BuildChimeraValuesTableFromSeqEntry (objects::CSeq_entry_Handle seh, const string& label, CSourceRequirements::EWizardSrcType src_type);
63 CRef<CCmdComposite> ApplyChimeraValuesTableToSeqEntry (CRef<objects::CSeq_table>values_table, objects::CSeq_entry_Handle seh, const string& label);
64 
66 {
67 public:
69  {
73 
74  virtual vector<CConstRef<CObject> > GetObjects(CBioseq_Handle bsh);
75  virtual vector<CRef<objects::edit::CApplyObject> > GetApplyObjects(CBioseq_Handle bsh);
76 
77 
78  virtual string GetVal(const CObject& object);
79  virtual vector<string> GetVals(const CObject& object);
80  virtual bool IsEmpty(const CObject& object) const;
81  virtual void ClearVal(CObject& object);
82  virtual bool SetVal(CObject& object, const string& val, objects::edit::EExistingText existing_text);
83  virtual string IsValid(const string& val) { return ""; };
84  virtual vector<string> IsValid(const vector<string>& values) {vector<string> rval; return rval; };
85  virtual void SetConstraint(const string& field, CConstRef<objects::edit::CStringConstraint> string_constraint);
86  virtual bool AllowMultipleValues() { return false; } ;
87 
88 protected:
92 
93 };
94 
96 
97 #endif
98  // _MOLINFOEDIT_UTIL_H_
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
CBioseq_Handle –.
CConstRef –.
Definition: ncbiobj.hpp:1266
virtual void SetConstraint(const string &field, CConstRef< objects::edit::CStringConstraint > string_constraint)
virtual bool SetVal(CObject &object, const string &val, objects::edit::EExistingText existing_text)
virtual vector< string > IsValid(const vector< string > &values)
CMolInfoFieldType::EMolInfoFieldType m_FieldType
virtual string IsValid(const string &val)
virtual vector< string > GetVals(const CObject &object)
virtual string GetVal(const CObject &object)
CMolInfoFieldType::EMolInfoFieldType m_ConstraintFieldType
virtual vector< CConstRef< CObject > > GetObjects(CBioseq_Handle bsh)
virtual vector< CRef< objects::edit::CApplyObject > > GetApplyObjects(CBioseq_Handle bsh)
virtual bool IsEmpty(const CObject &object) const
CMolInfoField(CMolInfoFieldType::EMolInfoFieldType field_type)
virtual void ClearVal(CObject &object)
virtual bool AllowMultipleValues()
CRef< objects::edit::CStringConstraint > m_StringConstraint
CObject –.
Definition: ncbiobj.hpp:180
objects::CSeqdesc::E_Choice m_Subtype
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define NULL
Definition: ncbistd.hpp:225
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static const char label[]
@ e_Molinfo
info on the molecule and techniques
Definition: Seqdesc_.hpp:134
CRef< CCmdComposite > ApplyCommentValuesTableToSeqEntry(CRef< objects::CSeq_table >values_table, objects::CSeq_entry_Handle seh, const string &label)
CRef< objects::CSeq_table > BuildCommentDescriptorValuesTableFromSeqEntry(objects::CSeq_entry_Handle seh, const string &label)
vector< string > GetSrcGenomeOptions(CSourceRequirements::EWizardType wizard_type, CSourceRequirements::EWizardSrcType src_type)
vector< string > GetMoleculeTypeOptions(CSourceRequirements::EWizardType wizard_type)
CRef< objects::CSeq_table > BuildMolInfoValuesTableFromSeqEntry(objects::CSeq_entry_Handle seh, CSourceRequirements::EWizardType wizard_type)
CRef< objects::CSeq_table > BuildChimeraValuesTableFromSeqEntry(objects::CSeq_entry_Handle seh, const string &label, CSourceRequirements::EWizardSrcType src_type)
CRef< CCmdComposite > ApplyMolInfoValuesTableToSeqEntry(CRef< objects::CSeq_table >values_table, objects::CSeq_entry_Handle seh, bool add_confirmed=true)
CRef< CCmdComposite > ApplyDBLinkValuesTableToSeqEntry(CRef< objects::CSeq_table >values_table, objects::CSeq_entry_Handle seh)
CRef< CCmdComposite > ApplyChimeraValuesTableToSeqEntry(CRef< objects::CSeq_table >values_table, objects::CSeq_entry_Handle seh, const string &label)
CRef< objects::CSeq_table > BuildDBLinkValuesTableFromSeqEntry(objects::CSeq_entry_Handle seh)
EExistingText
Modified on Sun Apr 14 05:26:13 2024 by modify_doxy.py rev. 669887