41 #ifndef linkout__OBJTOOLS_EUTILS_LINKOUT_RULE_BASE_HPP
42 #define linkout__OBJTOOLS_EUTILS_LINKOUT_RULE_BASE_HPP
51 #ifndef BEGIN_linkout_SCOPE
52 # define BEGIN_linkout_SCOPE BEGIN_SCOPE(linkout)
53 # define END_linkout_SCOPE END_SCOPE(linkout)
83 typedef NCBI_NS_NCBI::CSerialObject
Tparent;
132 void ResetSelection(
void);
138 E_Choice Which(
void)
const;
144 void CheckSelected(E_Choice index)
const;
150 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
171 void Select(E_Choice index,
173 NCBI_NS_NCBI::CObjectMemoryPool* pool);
195 bool Is_CharData(
void)
const;
222 bool IsPad(
void)
const;
228 const TPad& GetPad(
void)
const;
248 bool IsApad(
void)
const;
254 const TApad& GetApad(
void)
const;
260 TApad& SetApad(
void);
274 bool IsSubs(
void)
const;
280 const TSubs& GetSubs(
void)
const;
286 TSubs& SetSubs(
void);
300 bool IsToupper(
void)
const;
306 const TToupper& GetToupper(
void)
const;
326 bool IsTolower(
void)
const;
332 const TTolower& GetTolower(
void)
const;
352 bool IsStrip(
void)
const;
358 const TStrip& GetStrip(
void)
const;
378 bool IsNormalize(
void)
const;
405 void DoSelect(
E_Choice index, NCBI_NS_NCBI::CObjectMemoryPool* pool = 0);
407 static const char*
const sm_SelectionNames[];
410 NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string>
m_string;
415 typedef NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< C_Data > >
Tdata;
427 bool IsSet(
void)
const;
434 bool CanGet(
void)
const;
452 operator const Tdata& (void)
const;
454 operator Tdata& (void);
465 NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< C_Data > >
m_data;
486 if ( m_choice != index )
487 ThrowInvalidSelection(index);
496 DoSelect(index, pool);
503 Select(index, reset, 0);
509 return m_choice == e__CharData;
515 CheckSelected(e__CharData);
529 return m_choice == e_Pad;
535 return m_choice == e_Apad;
541 return m_choice == e_Subs;
547 return m_choice == e_Toupper;
553 return m_choice == e_Tolower;
559 return m_choice == e_Strip;
565 return m_choice == e_Normalize;
#define BEGIN_linkout_SCOPE
#define END_linkout_SCOPE
uint32_t Uint4
4-byte (32-bit) unsigned integer
#define NCBI_EUTILS_EXPORT
bool CanGet(void) const
Check if it is safe to call Get method.
const T_CharData & Get_CharData(void) const
Get the variant data.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
bool IsStrip(void) const
Check if variant Strip is selected.
bool Is_CharData(void) const
Check if variant _CharData is selected.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
const Tdata & Get(void) const
Get the member data.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
NCBI_NS_NCBI::CSerialObject * m_object
bool IsPad(void) const
Check if variant Pad is selected.
bool IsToupper(void) const
Check if variant Toupper is selected.
bool IsTolower(void) const
Check if variant Tolower is selected.
DECLARE_INTERNAL_TYPE_INFO()
Tdata & Set(void)
Assign a value to data member.
bool IsNormalize(void) const
Check if variant Normalize is selected.
void Select(E_Choice index, NCBI_NS_NCBI::EResetVariant reset=NCBI_NS_NCBI::eDoResetVariant)
Select the requested variant if needed.
CRule_Base(const CRule_Base &)
NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< C_Data > > m_data
E_Choice Which(void) const
Which variant is currently selected.
bool IsApad(void) const
Check if variant Apad is selected.
bool IsSet(void) const
Check if a value has been assigned to data member.
C_Data & operator=(const C_Data &)
NCBI_NS_STD::string T_CharData
NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< C_Data > > Tdata
CRule_Base & operator=(const CRule_Base &)
DECLARE_INTERNAL_TYPE_INFO()
T_CharData & Set_CharData(void)
Select the variant.
NCBI_NS_NCBI::CSerialObject Tparent
bool IsSubs(void) const
Check if variant Subs is selected.
NCBI_NS_NCBI::CSerialObject Tparent
const TYPE & Get(const CNamedParameterList *param)
const GenericPointer< typename T::ValueType > T2 value