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

Go to the SVN repository for this file.

1 /* $Id$
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  * File Description:
27  * This code was generated by application DATATOOL
28  * using the following specifications:
29  * 'macro.asn'.
30  *
31  * ATTENTION:
32  * Don't edit or commit this file into CVS as this file will
33  * be overridden (by DATATOOL) without warning!
34  * ===========================================================================
35  */
36 
37 // standard includes
38 #include <ncbi_pch.hpp>
39 #include <serial/serialimpl.hpp>
40 
41 // generated includes
47 
48 BEGIN_objects_SCOPE // namespace ncbi::objects::
49 
50 
51 // generated classes
52 
54 {
55  if ( !m_Find ) {
56  m_Find.Reset(new TFind());
57  return;
58  }
59  (*m_Find).Reset();
60 }
61 
63 {
64  m_Find.Reset(&value);
65 }
66 
68 {
69  m_Except.Reset();
70 }
71 
73 {
74  m_Except.Reset(&value);
75 }
76 
78 {
79  if ( !m_Except )
80  m_Except.Reset(new TExcept());
81  return (*m_Except);
82 }
83 
85 {
86  m_Feat_constraint.Reset();
87 }
88 
90 {
91  m_Feat_constraint.Reset(&value);
92 }
93 
95 {
96  if ( !m_Feat_constraint )
98  return (*m_Feat_constraint);
99 }
100 
102 {
103  m_Replace.Reset();
104 }
105 
107 {
108  m_Replace.Reset(&value);
109 }
110 
112 {
113  if ( !m_Replace )
114  m_Replace.Reset(new TReplace());
115  return (*m_Replace);
116 }
117 
119 {
120  m_Description.erase();
121  m_set_State[0] &= ~0xc00;
122 }
123 
125 {
126  ResetFind();
127  ResetExcept();
129  ResetRule_type();
130  ResetReplace();
132  ResetFatal();
133 }
134 
136 {
137  SET_CLASS_MODULE("NCBI-Macro");
138  ADD_NAMED_REF_MEMBER("find", m_Find, CSearch_func);
139  ADD_NAMED_REF_MEMBER("except", m_Except, CSearch_func)->SetOptional();
140  ADD_NAMED_REF_MEMBER("feat-constraint", m_Feat_constraint, CConstraint_choice_set)->SetOptional();
141  ADD_NAMED_ENUM_MEMBER("rule-type", m_Rule_type, EFix_type)->SetDefault(new TRule_type(eFix_type_none))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
142  ADD_NAMED_REF_MEMBER("replace", m_Replace, CReplace_rule)->SetOptional();
143  ADD_NAMED_STD_MEMBER("description", m_Description)->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
144  ADD_NAMED_STD_MEMBER("fatal", m_Fatal)->SetDefault(new TFatal(false))->SetSetFlag(MEMBER_PTR(m_set_State[0]))->SetOptional();
145  info->RandomOrder();
146  info->CodeVersion(22400);
147  info->DataSpec(ncbi::EDataSpec::eASN);
148 }
150 
151 // constructor
153  : m_Rule_type(eFix_type_none), m_Fatal(false)
154 {
155  memset(m_set_State,0,sizeof(m_set_State));
156  if ( !IsAllocatedInPool() ) {
157  ResetFind();
158  }
159 }
160 
161 // destructor
163 {
164 }
165 
166 
167 
168 END_objects_SCOPE // namespace ncbi::objects::
169 
171 
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.
BEGIN_NAMED_BASE_CLASS_INFO("Suspect-rule", CSuspect_rule)
#define false
Definition: bool.h:36
#define MEMBER_PTR(MemberName)
Definition: serialimpl.hpp:284
#define ADD_NAMED_REF_MEMBER(MemberAlias, MemberName, ClassName)
Definition: serialimpl.hpp:357
#define END_CLASS_INFO
Definition: serialimpl.hpp:456
#define ADD_NAMED_STD_MEMBER(MemberAlias, MemberName)
Definition: serialimpl.hpp:345
#define SET_CLASS_MODULE(ModuleName)
Definition: serialimpl.hpp:444
#define ADD_NAMED_ENUM_MEMBER(MemberAlias, MemberName, EnumName)
Definition: serialimpl.hpp:351
bool IsAllocatedInPool(void) const THROWS_NONE
Check if object is allocated in memory pool (not system heap)
Definition: ncbiobj.hpp:461
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
virtual void Reset(void)
Reset the whole object.
TFeat_constraint & SetFeat_constraint(void)
Assign a value to Feat_constraint data member.
virtual ~CSuspect_rule_Base(void)
CSearch_func TExcept
void ResetRule_type(void)
Reset Rule_type data member.
EFix_type
Access to EFix_type's attributes (values, names) as defined in spec.
Definition: Fix_type_.hpp:63
CSearch_func TFind
CRef< TFind > m_Find
TExcept & SetExcept(void)
Assign a value to Except data member.
void ResetFind(void)
Reset Find data member.
void ResetExcept(void)
Reset Except data member.
CConstraint_choice_set TFeat_constraint
CRef< TFeat_constraint > m_Feat_constraint
void ResetFatal(void)
Reset Fatal data member.
void ResetDescription(void)
Reset Description data member.
void ResetReplace(void)
Reset Replace data member.
CRef< TReplace > m_Replace
CRef< TExcept > m_Except
TReplace & SetReplace(void)
Assign a value to Replace data member.
CReplace_rule TReplace
TFind & SetFind(void)
Assign a value to Find data member.
void ResetFeat_constraint(void)
Reset Feat_constraint data member.
@ eFix_type_none
Definition: Fix_type_.hpp:64
static MDB_envinfo info
Definition: mdb_load.c:37
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1227
Modified on Sat Apr 27 11:18:07 2024 by modify_doxy.py rev. 669887