1 #ifndef GUI_WIDGETS_EDIT___MACRO_INTERPRET__HPP
2 #define GUI_WIDGETS_EDIT___MACRO_INTERPRET__HPP
46 : m_FName(fnc.m_FuncName), m_Negate(fnc.m_Negate), m_ParentFnc(fnc.m_ParentFnc), m_ChildFnc(fnc.m_ChildFnc) {}
57 bool m_Negate{
false };
77 bool InterpretDoFunctions(
const macro::CMacroRep& macro_rep);
85 bool ActionHasCdsGeneProtQuals();
94 bool x_AddToRTVar(
const string& name,
const TArgs& members);
95 bool x_InterpretWhereFunctions(
const TMacroFuncList& do_constraints);
96 void x_CleanupWhereFunctions();
97 bool x_ConsolidateWhereFunctions();
98 void x_InsertFeatureType(
const string& feat_type);
99 void x_InsertFeatureTypeToWhereClause();
107 bool m_MightRemove{
false };
110 bool x_AddStructVoucherPart(
const TArgs&, TInterpretedArgs&);
111 bool x_SetStringQualValidateArgs(
const TArgs&, TInterpretedArgs&);
112 bool x_SetModifierValidateArgs(
const TArgs&, TInterpretedArgs&);
113 bool x_EditStringQualValidateArgs(
const TArgs&, TInterpretedArgs&);
114 bool x_EditSubfieldValidateArgs(
const TArgs&, TInterpretedArgs&);
115 bool x_ConvertStringQualValidateArgs(
const TArgs&, TInterpretedArgs&);
116 bool x_RemoveModifierValidateArgs(
const TArgs&, TInterpretedArgs&);
117 bool x_CopyStringQualValidateArgs(
const TArgs&, TInterpretedArgs&);
118 bool x_SwapQualValidateArgs(
const TArgs&, TInterpretedArgs&);
119 bool x_FixFormatValidateArgs(
const TArgs&, TInterpretedArgs&);
120 bool x_FixSourceQualCapsValidateArgs(
const TArgs&, TInterpretedArgs&);
121 bool x_RemoveQualValidateArgs(
const TArgs&, TInterpretedArgs&);
122 bool x_RemoveSubfieldValidateArgs(
const TArgs&, TInterpretedArgs&);
123 bool x_ParseStringQualValidateArgs(
const TArgs&, TInterpretedArgs&);
124 bool x_AddParsedTextValidateArgs(
const TArgs&, TInterpretedArgs&);
125 bool x_ParseToStructCommValidateArgs(
const TArgs&, TInterpretedArgs&);
126 bool x_ParseToDBLinkValidateArgs(
const TArgs&, TInterpretedArgs&);
127 bool x_RmvOrgnameValidateArgs(
const TArgs&, TInterpretedArgs&);
128 bool x_RmvOutsideValidateArgs(
const TArgs&, TInterpretedArgs&);
129 bool x_RmvOutsideRelFeatValidateArgs(
const TArgs&, TInterpretedArgs&);
130 bool x_SetQualValidateArgs(
const TArgs&, TInterpretedArgs&);
131 bool x_AddMultiAuthorsValidateArgs(
const TArgs&, TInterpretedArgs&);
132 bool x_AddDBLinkValidateArgs(
const TArgs&, TInterpretedArgs&);
133 bool x_SetStrCommFieldValidateArgs(
const TArgs&, TInterpretedArgs&);
134 bool x_SetStrCommDbValidateArgs(
const TArgs&, TInterpretedArgs&);
135 bool x_RmvDescrValidateArgs(
const TArgs&, TInterpretedArgs&);
136 bool x_RetranslateCDSValidateArgs(
const TArgs&, TInterpretedArgs&);
137 bool x_RestoreRNAEditValidateArgs(
const TArgs&, TInterpretedArgs&);
138 bool x_UpdateReplECsValidateArgs(
const TArgs&, TInterpretedArgs&);
139 bool x_SetRnaProdValidateArgs(
const TArgs&, TInterpretedArgs&);
140 bool x_SetGBQualValidateArgs(
const TArgs&, TInterpretedArgs&);
141 bool x_SetRelFeatQualValidateArgs(
const TArgs&, TInterpretedArgs&);
142 bool x_EditRelFeatQualValidateArgs(
const TArgs&, TInterpretedArgs&);
143 bool x_ConvertFeatQualValidateArgs(
const TArgs&, TInterpretedArgs&);
144 bool x_CopyFeatQualValidateArgs(
const TArgs&, TInterpretedArgs&);
145 bool x_RemoveRnaProdValidateArgs(
const TArgs&, TInterpretedArgs&);
146 bool x_RmvRelFeatQualValidateArgs(
const TArgs&, TInterpretedArgs&);
147 bool x_SetCodonRecognizedValidateArgs(
const TArgs&, TInterpretedArgs&);
148 bool x_CopyRNARelQualValidateArgs(
const TArgs&, TInterpretedArgs&);
149 bool x_ConvertRNARelQualValidateArgs(
const TArgs&, TInterpretedArgs&);
150 bool x_ParseFeatQualValidateArgs(
const TArgs&, TInterpretedArgs&);
151 bool x_AddParsedTextFeatQualValidateArgs(
const TArgs&, TInterpretedArgs&);
152 bool x_SwapRelFeatQualValidateArgs(
const TArgs&, TInterpretedArgs&);
153 bool x_ParseRNARelQualValidateArgs(
const TArgs&, TInterpretedArgs&);
154 bool x_ApplyAutodefOptsValidateArgs(
const TArgs&, TInterpretedArgs&);
155 bool x_ApplyUnverifiedValidateArgs(
const TArgs&, TInterpretedArgs&);
158 bool x_ExtendFeatValidateArgs(
const TArgs&, TInterpretedArgs&);
159 bool x_Set5PartialValidateArgs(
const TArgs&, TInterpretedArgs&);
160 bool x_Set3PartialValidateArgs(
const TArgs&, TInterpretedArgs&);
161 bool x_SetBothPartialValidateArgs(
const TArgs&, TInterpretedArgs&);
162 bool x_Clear5PartialValidateArgs(
const TArgs&, TInterpretedArgs&);
163 bool x_Clear3PartialValidateArgs(
const TArgs&, TInterpretedArgs&);
164 bool x_ClearBothPartialValidateArgs(
const TArgs&, TInterpretedArgs&);
165 bool x_ConvertLocStrandValidateArgs(
const TArgs&, TInterpretedArgs&);
166 bool x_ConvertLocTypeValidateArgs(
const TArgs&, TInterpretedArgs&);
169 bool x_SetPubTitleValidateArgs(
const TArgs&, TInterpretedArgs&);
170 bool x_SetPubAffilValidateArgs(
const TArgs&, TInterpretedArgs&);
171 bool x_SetPubAuthorValidateArgs(
const TArgs&, TInterpretedArgs&);
172 bool x_SetPubAuthMIValidateArgs(
const TArgs&, TInterpretedArgs&);
173 bool x_AddAuthorsValidateArgs(
const TArgs&, TInterpretedArgs&);
174 bool x_SetPubJournalValidateArgs(
const TArgs&, TInterpretedArgs&);
175 bool x_SetPubVolumeValidateArgs(
const TArgs&, TInterpretedArgs&);
176 bool x_SetPubIssueValidateArgs(
const TArgs&, TInterpretedArgs&);
177 bool x_SetPubPagesValidateArgs(
const TArgs&, TInterpretedArgs&);
178 bool x_SetSerialNumberValidateArgs(
const TArgs&, TInterpretedArgs&);
179 bool x_SetPubCitValidateArgs(
const TArgs&, TInterpretedArgs&);
180 bool x_SetPmidValidateArgs(
const TArgs&, TInterpretedArgs&);
181 bool x_SetDoiValidateArgs(
const TArgs&, TInterpretedArgs&);
182 bool x_SetStatusValidateArgs(
const TArgs&, TInterpretedArgs&);
183 bool x_SetDateFieldValidateArgs(
const TArgs&, TInterpretedArgs&);
184 bool x_SetPubDateValidateArgs(
const TArgs&, TInterpretedArgs&);
185 bool x_RemoveMInitialsValidateArgs(
const TArgs&, TInterpretedArgs&);
186 bool x_RemoveAuthorsValidateArgs(
const TArgs&, TInterpretedArgs&);
187 bool x_DOILookupValidateArgs(
const TArgs&, TInterpretedArgs&);
188 bool x_GlobalDOIValidateArgs(
const TArgs&, TInterpretedArgs&);
189 bool x_DOILookupInArticlesValidateArgs(
const TArgs&, TInterpretedArgs&);
190 bool x_FixPubTitleValidateArgs(
const TArgs&, TInterpretedArgs&);
191 bool x_FixPubAuthorsValidateArgs(
const TArgs&, TInterpretedArgs&);
192 bool x_FixPubAffilValidateArgs(
const TArgs&, TInterpretedArgs&);
193 bool x_FixPubAffilCountryValidateArgs(
const TArgs&, TInterpretedArgs&);
194 bool x_FixPubAffilFieldsValidateArgs(
const TArgs&, TInterpretedArgs&);
196 bool x_ConvertFeatureValidateArgs(
const TArgs&, TInterpretedArgs&);
197 bool x_ConvertCDSValidateArgs(
const TArgs&, TInterpretedArgs&);
198 bool x_RemoveFeatValidateArgs(
const TArgs&, TInterpretedArgs&);
199 bool x_RemoveAllFeatsValidateArgs(
const TArgs&, TInterpretedArgs&);
200 bool x_AddGeneXrefValidateArgs(
const TArgs&, TInterpretedArgs&);
201 bool x_RmvGeneXrefValidateArgs(
const TArgs&, TInterpretedArgs&);
203 bool x_ApplyCDSValidateArgs(
const TArgs&, TInterpretedArgs&);
204 bool x_ApplyGeneValidateArgs(
const TArgs&, TInterpretedArgs&);
205 bool x_ApplyRNAValidateArgs(
const TArgs&, TInterpretedArgs&);
206 bool x_ApplyFeatureValidateArgs(
const TArgs&, TInterpretedArgs&);
207 bool x_MakeWholeSeqIntValidateArgs(
const TArgs&, TInterpretedArgs&);
208 bool x_MakeIntervalValidateArgs(
const TArgs&, TInterpretedArgs&);
209 bool x_RmvDuplFeatsValidateArgs(
const TArgs&, TInterpretedArgs&);
210 bool x_ConvertGapsValidateArgs(
const TArgs&, TInterpretedArgs&);
212 bool x_DiscrAutofixValidateArgs(
const TArgs&, TInterpretedArgs&);
213 bool x_ApplyPMIDValidateArgs(
const TArgs&, TInterpretedArgs&);
214 bool x_ApplyDOIValidateArgs(
const TArgs&, TInterpretedArgs&);
215 bool x_AutodefValidateArgs(
const TArgs&, TInterpretedArgs&);
216 bool x_AutodefCompleteValidateArgs(
const TArgs&, TInterpretedArgs&);
217 bool x_ConvertRawToDeltabyNsValidateArgs(
const TArgs&, TInterpretedArgs&);
218 bool x_AddGapFeatsbyNsValidateArgs(
const TArgs&, TInterpretedArgs&);
219 bool x_UpdateProteinsValidateArgs(
const TArgs&, TInterpretedArgs&);
222 bool x_ParseFieldFromRTVar(TInterpretedArgs&,
const string& name,
const string&
value);
223 bool x_StoreParsingArguments(TInterpretedArgs&, TRTVarmap::const_iterator& iter);
224 bool x_ParseArgsForApplyTable(
const TArgs&,
size_t, TArgs::const_iterator&, TArgumentsVector::const_iterator&,
const TArgumentsVector::const_iterator&, TInterpretedArgs&);
228 bool x_StringConstraintValidateArgs(
const TArgs&, TInterpretedArgs&);
229 bool x_CaseConstraintValidateArgs(
const TArgs&, TInterpretedArgs&);
230 bool x_ChoiceTypeValidateArgs(
const TArgs&, TInterpretedArgs&);
231 bool x_IsPresentValidateArgs(
const TArgs&, TInterpretedArgs&);
232 bool x_InterpretFieldValidateArgs(
const TArgs&, TInterpretedArgs&);
233 bool x_InterpretRNATypeValidateArgs(
const TArgs&, TInterpretedArgs&);
234 bool x_InterpretncRNAclassValidateArgs(
const TArgs&, TInterpretedArgs&);
235 bool x_InterpretFeatTypeValidateArgs(
const TArgs&, TInterpretedArgs&);
236 bool x_ComparisonOpValidateArgs(
const TArgs&, TInterpretedArgs&);
237 bool x_InconsTaxaValidateArgs(
const TArgs&, TInterpretedArgs&);
238 bool x_InTableValidateArgs(
const TArgs&, TInterpretedArgs&);
239 bool x_SeqIdValidateArgs(
const TArgs&, TInterpretedArgs&);
240 bool x_IllegalDbXrefValidateArgs(
const TArgs&, TInterpretedArgs&);
241 bool x_SatelliteNameValidateArgs(
const TArgs&, TInterpretedArgs&);
242 bool x_SatelliteTypeValidateArgs(
const TArgs&, TInterpretedArgs&);
243 bool x_MobileElemNameValidateArgs(
const TArgs&, TInterpretedArgs&);
244 bool x_MobileElemTypeValidateArgs(
const TArgs&, TInterpretedArgs&);
246 bool x_PubTitleConstrValidateArgs(
const TArgs&, TInterpretedArgs&);
247 bool x_PubAffilConstrValidateArgs(
const TArgs&, TInterpretedArgs&);
248 bool x_PubAuthorConstrValidateArgs(
const TArgs&, TInterpretedArgs&);
249 bool x_PubCitConstrValidateArgs(
const TArgs&, TInterpretedArgs&);
250 bool x_PubPMIDConstrValidateArgs(
const TArgs&, TInterpretedArgs&);
251 bool x_PubDOIConstrValidateArgs(
const TArgs&, TInterpretedArgs&);
252 bool x_PubSerialNrConstrValidateArgs(
const TArgs&, TInterpretedArgs&);
253 bool x_PubStatusConstrValidateArgs(
const TArgs&, TInterpretedArgs&);
254 bool x_PubDateConstrValidateArgs(
const TArgs&, TInterpretedArgs&);
255 bool x_PubIssueConstrValidateArgs(
const TArgs&, TInterpretedArgs&);
256 bool x_PubJournalConstrValidateArgs(
const TArgs&, TInterpretedArgs&);
257 bool x_PubPagesConstrValidateArgs(
const TArgs&, TInterpretedArgs&);
258 bool x_PubVolConstrValidateArgs(
const TArgs&, TInterpretedArgs&);
260 bool x_GetFeatureValidateArgs(
const TArgs&, TInterpretedArgs&);
261 bool x_GetSeqdescValidateArgs(
const TArgs&, TInterpretedArgs&);
262 bool x_GetDBLinkValidateArgs(
const TArgs&, TInterpretedArgs&);
263 bool x_GetSequenceValidateArgs(
const TArgs&, TInterpretedArgs&);
264 bool x_StructVoucherPartValidateArgs(
const TArgs&, TInterpretedArgs&);
265 bool x_StructCommFieldValidateArgs(
const TArgs&, TInterpretedArgs&);
266 bool x_StructCommDbValidateArgs(
const TArgs&, TInterpretedArgs&);
267 bool x_StructCommFieldNameValidateArgs(
const TArgs&, TInterpretedArgs&);
268 bool x_GetDBxrefValidateArgs(
const TArgs&, TInterpretedArgs&);
269 bool x_GetRnaProdValidateArgs(
const TArgs&, TInterpretedArgs&);
270 bool x_NumberofFeatsValidateArgs(
const TArgs&, TInterpretedArgs&);
271 bool x_GetFirstItemValidateArgs(
const TArgs&, TInterpretedArgs&);
274 bool x_StrandValidateArgs(
const TArgs&, TInterpretedArgs&);
275 bool x_PartialStartValidateArgs(
const TArgs&, TInterpretedArgs&);
276 bool x_PartialStopValidateArgs(
const TArgs&, TInterpretedArgs&);
277 bool x_LocationTypeValidateArgs(
const TArgs&, TInterpretedArgs&);
278 bool x_LocationLengthValidateArgs(
const TArgs&, TInterpretedArgs&);
279 bool x_SeqTypeValidateArgs(
const TArgs&, TInterpretedArgs&);
280 bool x_DistanceValidateArgs(
const TArgs&, TInterpretedArgs&);
283 bool x_ResolveValidateArgs(
const TArgs&);
284 bool x_LocalIdValidateArgs(
const TArgs&);
285 bool x_SeqForDescValidateArgs(
const TArgs&);
286 bool x_ParsedTextValidateArgs(
const TArgs&);
287 bool x_ParsedTextFromValidateArgs(
const TArgs&);
288 bool x_PubTitleValidateArgs(
const TArgs&);
289 bool x_PubAffilValidateArgs(
const TArgs&);
290 bool x_PubAuthorValidateArgs(
const TArgs&);
291 bool x_PubJournalValidateArgs(
const TArgs&);
292 bool x_PubIssueValidateArgs(
const TArgs&);
293 bool x_PubPagesValidateArgs(
const TArgs&);
294 bool x_PubVolValidateArgs(
const TArgs&);
295 bool x_PubStatusValidateArgs(
const TArgs&);
296 bool x_PubDateValidateArgs(
const TArgs&);
297 bool x_PubCitValidateArgs(
const TArgs&);
298 bool x_PubPMIDValidateArgs(
const TArgs&);
299 bool x_PubDOIValidateArgs(
const TArgs&);
300 bool x_PubSerialNrValidateArgs(
const TArgs&);
301 bool x_SetStrCommDbAssignValidateArgs(
const TArgs&);
302 bool x_MakeWholeSeqIntAssignValidateArgs(
const TArgs&);
303 bool x_MakeIntervalAssignValidateArgs(
const TArgs&);
304 bool x_GeneQualValidateArgs(
const TArgs&);
305 bool x_ValueFromTblValidateArgs(
const TArgs&);
308 bool x_PostProcessEditMolinfo();
309 bool x_PostProcessApplyAuthors();
310 bool x_PostProcessDiscrAutofix();
311 bool x_PostProcessSetException();
312 bool x_PostProcessRmvDbxref();
313 bool x_PostProcessAddStructComment();
314 bool x_PostProcessConvertSetClass();
315 bool x_PostProcessAddFeature(
const string& fn_name);
316 bool x_PostProcessApplyQualifierTable();
318 bool x_UpdateTargetFieldForSeqdesc();
319 bool x_UpdateTargetFieldForRNA();
320 bool x_UpdateFieldsForMatPeptide();
321 string x_FindFeatureType();
Class to store one function as it appears in the macro and its arguments (as GUI fieldnames)
unordered_map< string, string > TInterpretedArgs
Map of control names and corresponding values. It may contain more 'arguments' than the function has.
CFuncWithArgs(const SMacroFuncWithArgs &fnc)
string m_FName
Function name as it appears in the macro.
CMacroInterpreter & operator=(const CMacroInterpreter &)=delete
vector< CFuncWithArgs > m_WhereGUIFuncInfo
the same as m_WhereFuncInfo, but here the fields are interpreted
CFuncWithArgs::TInterpretedArgs TInterpretedArgs
CMacroInterpreter(const CMacroInterpreter &)=delete
Prohibit copy constructor and assignment operator.
const vector< CFuncWithArgs > & GetWhereFunctions() const
unordered_map< string, TArgs > TRTVarmap
string m_Target
the FOR EACH selector of the edited macro
const vector< CFuncWithArgs > & GetInterpretedFunctions() const
vector< CFuncWithArgs > m_WhereFuncInfo
function information about the functions from the WHERE clause
vector< CFuncWithArgs > m_DoFuncInfo
interpreted functions that appear in the DO section
SMacroFuncWithArgs::TArgs TArgs
vector< CFuncWithArgs > & SetInterpretedFunctions()
Include a standard set of the NCBI C++ Toolkit most basic headers.
bool operator==(const CEquivRange &A, const CEquivRange &B)
CObject & operator=(const CObject &src) THROWS_NONE
Assignment operator.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
#define NCBI_GUIWIDGETS_EDIT_EXPORT
CNcbiOstream & operator<<(CNcbiOstream &ostrm, const CFuncWithArgs &f_args)
vector< SMacroFuncWithArgs > TMacroFuncList
void NormalizeFieldForFeatPanel(string &field)
const GenericPointer< typename T::ValueType > T2 value
Structure to store parsed function name and its arguments - as it appears in the macro It is used whe...