60 user->
SetData().push_back(field);
85 #define INITENUMFIELD(Fieldname) \
86 } else if (field_type == eOptionFieldType_##Fieldname) { \
87 if ((*it)->IsSetData() && (*it)->GetData().IsStr()) { \
88 m_##Fieldname = Get##Fieldname((*it)->GetData().GetStr()); \
97 if ((*it)->IsSetLabel() && (*it)->GetLabel().IsStr()) {}
104 if ((*it)->IsSetData() && (*it)->GetData().IsBool() && (*it)->GetData().GetBool()) {
108 (*it)->GetData().IsBool() && (*it)->GetData().GetBool()) {
111 if ((*it)->IsSetData() && (*it)->GetData().IsStr()) {
117 if ((*it)->IsSetData() && (*it)->GetData().IsStr()) {
129 if ((*it)->IsSetData() && (*it)->GetData().IsInt()) {
135 if ((*it)->IsSetData() && (*it)->GetData().IsStr()) {
139 if ((*it)->IsSetData() && (*it)->GetData().IsStr()) {
241 #define AUTODEFGETENUM(Fieldname, Map, Default) \
242 string CAutoDefOptions::Get##Fieldname(unsigned int value) const \
244 TNameValPairMap::const_iterator it = Map.begin(); \
245 while (it != Map.end()) { \
246 if (value == it->second) { \
253 CAutoDefOptions::T##Fieldname CAutoDefOptions::Get##Fieldname(const string& value) const \
255 TNameValPairMap::const_iterator it = Map.find(value.c_str()); \
256 if (it != Map.end()) { \
321 field->
SetData().SetBool(
true);
365 field->
SetData().SetStr(
"All");
366 user.
SetData().push_back(field);
371 user.
SetData().push_back(field);
435 sort(vals.begin(), vals.end());
436 vector<string>::iterator sort_it = std::unique(vals.begin(), vals.end());
437 vals.resize(distance(vals.begin(), sort_it));
438 ITERATE(vector<string>, it, vals) {
439 subsources->
SetData().SetStrs().push_back(*it);
441 field->
SetData().SetFields().push_back(subsources);
451 sort(vals.begin(), vals.end());
452 vector<string>::iterator sort_it = std::unique(vals.begin(), vals.end());
453 vals.resize(distance(vals.begin(), sort_it));
454 ITERATE(vector<string>, it, vals) {
455 orgmods->
SetData().SetStrs().push_back(*it);
457 field->
SetData().SetFields().push_back(orgmods);
461 user.
SetData().push_back(field);
478 if ((*it)->IsSetLabel() && (*it)->GetLabel().IsStr() &&
479 (*it)->IsSetData() && (*it)->GetData().IsStrs()) {
CStaticArrayMap< const char *, unsigned int, PNocase > TNameValPairMap
#define AUTODEFGETENUM(Fieldname, Map, Default)
#define INITENUMFIELD(Fieldname)
SStaticPair< const char *, unsigned int > TNameValPair
DEFINE_STATIC_ARRAY_MAP_WITH_COPY(TNameValPairMap, sc_FieldTypeStrsMap, sc_FieldTypes)
const TNameValPair sc_HIVRuleStr[]
const TNameValPair sc_FeatureListTypeStr[]
const TNameValPair sc_MiscFeatRuleStr[]
const TNameValPair sc_FieldTypes[]
void SuppressAllFeatures()
CRef< CUser_field > x_MakeHIVRule() const
CRef< CUser_field > x_MakeNuclearCopyFlag() const
void SuppressFeature(CSeqFeatData::ESubtype subtype)
CRef< CUser_field > x_MakeBooleanField(TFieldType field_type) const
void ClearSuppressedFeatures()
void AddOrgMod(COrgMod::TSubtype subtype)
@ eWholeGenomeShotgunSequence
CRef< CUser_field > x_MakeFeatureListType() const
CBioSource::TGenome m_NuclearCopyFlag
CRef< CUser_field > x_MakeMiscFeatRule() const
string m_CustomFeatureClause
bool x_IsBoolean(TFieldType field_type) const
string GetFieldType(TFieldType field_type) const
TMiscFeatRule m_MiscFeatRule
CRef< CUser_object > MakeUserObject() const
void x_MakeSuppressedFeatures(CUser_object &user) const
string m_TargetedLocusName
void InitFromUserObject(const CUser_object &obj)
TFeatureListType m_FeatureListType
void x_SetSuppressedFeatures(const CUser_field &field)
vector< CSeqFeatData::ESubtype > TSuppressedFeatureSubtypes
CRef< CUser_field > x_MakeMaxMods() const
CBioSource::TGenome GetNuclearCopyFlag() const
CBioSource::TGenome m_ProductFlag
void x_SetModifierList(const CUser_field &field)
CBioSource::TGenome GetProductFlag() const
vector< COrgMod::TSubtype > TOrgMods
TSuppressedFeatureSubtypes m_SuppressedFeatureSubtypes
@ eOptionFieldType_KeepPrecursorRNA
@ eOptionFieldType_Keep3UTRs
@ eOptionFieldType_KeepuORFs
@ eOptionFieldType_TargetedLocusName
@ eOptionFieldType_MaxMods
@ eOptionFieldType_ModifierList
@ eOptionFieldType_KeepExons
@ eOptionFieldType_KeepAfterSemicolon
@ eOptionFieldType_UseLabels
@ eOptionFieldType_LeaveParenthetical
@ eOptionFieldType_SuppressAlleles
@ eOptionFieldType_IncludeCountryText
@ eOptionFieldType_KeepLTRs
@ eOptionFieldType_ProductFlag
@ eOptionFieldType_DoNotApplyToAff
@ eOptionFieldType_UseNcRNAComment
@ eOptionFieldType_SuppressLocusTags
@ eOptionFieldType_KeepIntrons
@ eOptionFieldType_AllowModAtEndOfTaxname
@ eOptionFieldType_SpecifyNuclearProduct
@ eOptionFieldType_CustomFeatureClause
@ eOptionFieldType_Unknown
@ eOptionFieldType_GeneClusterOppStrand
@ eOptionFieldType_NuclearCopyFlag
@ eOptionFieldType_SuppressFeatureAltSplice
@ eOptionFieldType_DoNotApplyToCf
@ eOptionFieldType_HIVRule
@ eOptionFieldType_SuppressMobileElementSubfeatures
@ eOptionFieldType_KeepMobileElements
@ eOptionFieldType_FeatureListType
@ eOptionFieldType_MiscFeatRule
@ eOptionFieldType_KeepRepeatRegion
@ eOptionFieldType_DoNotApplyToNr
@ eOptionFieldType_SuppressMiscFeatureSubfeatures
@ eOptionFieldType_KeepMiscRecomb
@ eOptionFieldType_KeepRegulatoryFeatures
@ eOptionFieldType_Keep5UTRs
@ eOptionFieldType_SuppressedFeatures
@ eOptionFieldType_UseFakePromoters
@ eOptionFieldType_DoNotApplyToSp
@ eOptionFieldType_AltSpliceFlag
CRef< CUser_field > x_MakeCustomFeatureClause() const
void x_MakeModifierList(CUser_object &user) const
bool m_BooleanFlags[eOptionFieldMax]
bool GetSpecifyNuclearProduct() const
void AddSubSource(CSubSource::TSubtype subtype)
CRef< CUser_field > x_MakeProductFlag() const
bool IsFeatureSuppressed(CSeqFeatData::ESubtype subtype) const
CRef< CUser_field > x_MakeTargetedLocusName() const
vector< CSubSource::TSubtype > TSubSources
static string GetOrganelleByGenome(unsigned int genome)
static CBioSource::EGenome GetGenomeByOrganelle(const string &organelle, NStr::ECase use_case=NStr::eCase, bool starts_with=false)
static string GetSubtypeName(TSubtype stype, EVocabulary vocabulary=eVocabulary_raw)
static TSubtype GetSubtypeValue(const string &str, EVocabulary vocabulary=eVocabulary_raw)
@ eSubtype_bad
These no longer need to match the FEATDEF values in the C toolkit's objfdef.h.
static ESubtype SubtypeNameToValue(CTempString sName)
Turn a string into its ESubtype which is NOT necessarily related to the identifier of the enum.
static CTempString SubtypeValueToName(ESubtype eSubtype)
Turns a ESubtype into its string value which is NOT necessarily related to the identifier of the enum...
class CStaticArrayMap<> provides access to a static array in much the same way as CStaticArraySet<>,...
static TSubtype GetSubtypeValue(const string &str, EVocabulary vocabulary=eVocabulary_raw)
static string GetSubtypeName(CSubSource::TSubtype stype, EVocabulary vocabulary=eVocabulary_raw)
void SetObjectType(EObjectType obj_type)
@ eObjectType_AutodefOptions
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
const TStr & GetStr(void) const
Get the variant data.
bool IsStrs(void) const
Check if variant Strs is selected.
const TStrs & GetStrs(void) const
Get the variant data.
const TData & GetData(void) const
Get the Data member data.
const TFields & GetFields(void) const
Get the variant data.
vector< CRef< CUser_field > > TFields
bool IsFields(void) const
Check if variant Fields is selected.
bool IsStr(void) const
Check if variant Str is selected.
void SetClass(const TClass &value)
Assign a value to Class data member.
TData & SetData(void)
Assign a value to Data data member.
void SetLabel(TLabel &value)
Assign a value to Label data member.
const TData & GetData(void) const
Get the Data member data.
void SetData(TData &value)
Assign a value to Data data member.
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
vector< CStringUTF8 > TStrs
vector< CRef< CUser_field > > TData
constexpr auto sort(_Init &&init)
Miscellaneous common-use basic types and functionality.
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...