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

Go to the SVN repository for this file.

1 /* $Id: Comment_rule.hpp 71004 2016-02-04 17:37:54Z bollin $
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  */
27 
28 /// @file Comment_rule.hpp
29 /// User-defined methods of the data storage class.
30 ///
31 /// This file was originally generated by application DATATOOL
32 /// using the following specifications:
33 /// 'valid.asn'.
34 ///
35 /// New methods or data members can be added to it if needed.
36 /// See also: Comment_rule_.hpp
37 
38 
39 #ifndef OBJECTS_VALID_COMMENT_RULE_HPP
40 #define OBJECTS_VALID_COMMENT_RULE_HPP
41 
42 
43 // generated includes
47 
48 // generated classes
49 
51 
52 BEGIN_objects_SCOPE // namespace ncbi::objects::
53 
54 /////////////////////////////////////////////////////////////////////////////
56 {
58 public:
59  // constructor
60  CComment_rule(void);
61  // destructor
62  ~CComment_rule(void);
63 
64  CConstRef<CField_rule> FindFieldRuleRef (const string& field_name) const;
65  static void NormalizePrefix(string& prefix);
66  static bool IsStructuredComment (const CUser_object& user);
67  static string GetStructuredCommentPrefix (const CUser_object& user, bool normalize = true);
68  static string MakePrefixFromRoot(const string& root);
69  static string MakeSuffixFromRoot(const string& root);
70  static string KeywordForPrefix(const string& prefix);
71  static string PrefixForKeyword(const string& keyword);
72  static vector<string> GetKeywordList();
73 
74 
75  typedef pair<CField_rule::TSeverity, string> TError;
76  typedef vector<TError> TErrorList;
77  TErrorList IsValid(const CUser_object& user) const;
78  void CheckFieldValue(CConstRef<CField_rule> field_rule, const string& value, TErrorList& errors) const;
79  void CheckFieldValue(CConstRef< CField_rule> rule, const CUser_field& field, TErrorList& errors) const;
80  static void CheckGeneralFieldValue(const string& value, TErrorList& errors);
81  static void CheckGeneralFieldName(const string& label, TErrorList& errors);
82  static void CheckGeneralField(const CUser_field& field, TErrorList& errors);
83  static TErrorList CheckGeneralStructuredComment(const CUser_object& user);
84  bool ReorderFields(CUser_object& user) const;
85 
86 private:
87  // Prohibit copy constructor and assignment operator
90 
91 };
92 
93 /////////////////// CComment_rule inline methods
94 
95 // constructor
96 inline
98 {
99 }
100 
101 
102 /////////////////// end of CComment_rule inline methods
103 
104 
105 END_objects_SCOPE // namespace ncbi::objects::
106 
108 
109 
110 #endif // OBJECTS_VALID_COMMENT_RULE_HPP
111 /* Original file checksum: lines: 86, chars: 2465, CRC32: 988ff800 */
Data storage class.
User-defined methods of the data storage class.
CComment_rule_Base –.
CComment_rule(const CComment_rule &value)
vector< TError > TErrorList
CComment_rule & operator=(const CComment_rule &value)
pair< CField_rule::TSeverity, string > TError
CComment_rule_Base Tparent
CConstRef –.
Definition: ncbiobj.hpp:1266
char value[7]
Definition: config.c:431
bool IsValid(const CSeq_point &pt, CScope *scope)
Checks that point >= 0 and point < length of Bioseq.
#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_VALID_EXPORT
Definition: ncbi_export.h:929
static const char label[]
static const char * prefix[]
Definition: pcregrep.c:405
Modified on Mon Feb 26 04:03:38 2024 by modify_doxy.py rev. 669887