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

Go to the SVN repository for this file.

1 /* $Id: OrgName.hpp 79377 2017-09-06 15:45:28Z domrach $
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  * Author: .......
27  *
28  * File Description:
29  * .......
30  *
31  * Remark:
32  * This code was originally generated by application DATATOOL
33  * using specifications from the data definition file
34  * 'seqfeat.asn'.
35  */
36 
37 #ifndef OBJECTS_SEQFEAT_ORGNAME_HPP
38 #define OBJECTS_SEQFEAT_ORGNAME_HPP
39 
40 
41 // generated includes
44 // generated classes
45 
47 
48 BEGIN_objects_SCOPE // namespace ncbi::objects::
49 
51 {
53 public:
54  // constructor
55  COrgName(void);
56  // destructor
57  ~COrgName(void);
58 
59  bool GetFlatName(string& name_out, string* lineage = 0) const;
60 
61  // Flag indicating that node's scientific name is "well specified" according to the
62  // respective taxonomic nomenclature (e.g. Genus species subspecies).
63  // Based on "specified" property from Taxonomy database.
64  // Flag is kept along with other flags in orgname.attrib field
65  // (see comments to x_SetAttribFlag() function)
66  bool IsFormalName() const;
67  void SetFormalNameFlag( bool bFormalName );
68 
69  // Uncultured flag.
70  // Flag is kept along with other flags in orgname.attrib field
71  // (see comments to x_SetAttribFlag() function)
72  bool IsUncultured() const;
73  void SetUncultured( bool bUncultured );
74 
75  // Modifier forwarding flag. Used during org-ref lookup to enable/disable
76  // modifier forwarding. If set modifier forwarding is disabled.
77  // Flag is kept along with other flags in orgname.attrib field
78  // (see comments to x_SetAttribFlag() function)
79  bool IsModifierForwardingDisabled() const;
80  void DisableModifierForwarding();
81  void EnableModifierForwarding();
82 
83  CRef<COrgName> MakeCommon(const COrgName& other) const;
84 
85  // Nomenclature information stored in attrib field as string in following format:
86  // nomenclature=[BPVZ]*;
87  // setting empty value is equivalent to no value
88  bool GetNomenclature( string& result ) const;
89  bool SetNomenclature( const string& nomenclature ); // False if value is unsupported
90  void ResetNomenclature();
91 
92  // Modifier convenience functions
93  // returns number of removed modifiers
94  unsigned int RemoveModBySubtype( COrgMod::ESubtype to_remove );
95 
96 private:
97  // Prohibit copy constructor and assignment operator
100  // The proposed format for orgname flags: flagname1;[flagname2;]...
101  // where flagnameX consists of ascii alphanum characters only. Each value of flagnameX is unique.
102  // Presence of flag name in the strings means 'true' value for the flag.
103  void x_SetAttribFlag( const string& name, bool bStartsWith = false );
104  void x_ResetAttribFlag( const string& name, bool bStartsWith = false );
105  bool x_GetAttribFlag( const string& name, bool bStartsWith = false ) const;
106  // Getting attribute value for pairs like attrname=value;
107  // value cannot contain ';'
108  bool x_GetAttribValue( const string& name, string& sValue ) const;
109 };
110 
111 
112 
113 /////////////////// COrgName inline methods
114 
115 // constructor
116 inline
118 {
119 }
120 
121 
122 /////////////////// end of COrgName inline methods
123 
124 
125 END_objects_SCOPE // namespace ncbi::objects::
126 
128 
129 #endif // OBJECTS_SEQFEAT_ORGNAME_HPP
130 /* Original file checksum: lines: 93, chars: 2386, CRC32: ec8a8922 */
Data storage class.
COrgName_Base –.
Definition: OrgName_.hpp:81
COrgName(void)
Definition: OrgName.hpp:117
COrgName(const COrgName &value)
COrgName & operator=(const COrgName &value)
COrgName_Base Tparent
Definition: OrgName.hpp:52
char value[7]
Definition: config.c:431
#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_SEQFEAT_EXPORT
Definition: ncbi_export.h:768
else result
Definition: token2.c:20
Modified on Fri Dec 08 08:19:35 2023 by modify_doxy.py rev. 669887