41 #ifndef BUILD_SYSTEM_PROJECT_TREE_BUILDER_FILTER_BASE_HPP
42 #define BUILD_SYSTEM_PROJECT_TREE_BUILDER_FILTER_BASE_HPP
53 #ifndef BEGIN_objects_SCOPE
54 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
55 # define END_objects_SCOPE END_SCOPE(objects)
421 typedef list< CRef< C_E_FF > >
TFF;
567 virtual void Reset(
void);
621 m_Name = std::forward<CFilter_Base::C_Attlist::TName>(
value);
646 return IsSetFilter();
652 if (!CanGetFilter()) {
668 m_Filter = std::forward<CFilter_Base::C_Attlist::TFilter>(
value);
676 if (!IsSetFilter()) {
740 if ( m_choice != index )
741 ThrowInvalidSelection(index);
750 DoSelect(index, pool);
757 Select(index, reset, 0);
763 return m_choice == e_File;
769 return m_choice == e_Filter;
830 return m_FF.NotEmpty();
Base class for all serializable objects.
void ThrowUnassigned(TMemberIndex index) const
static string UnassignedString(void)
uint32_t Uint4
4-byte (32-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
NCBI_NS_STD::string m_UniqueIdentifier
bool CanGetUniqueIdentifier(void) const
Check if it is safe to call GetUniqueIdentifier method.
bool IsSetUniqueIdentifier(void) const
Check if a value has been assigned to UniqueIdentifier data member.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
virtual void Reset(void)
Reset the whole object.
bool IsSetFilter(void) const
Check if a value has been assigned to Filter data member.
const TName & GetName(void) const
Get the Name member data.
bool IsSetFF(void) const
Check if a value has been assigned to FF data member.
static const char *const sm_SelectionNames[]
string m_UniqueIdentifier
DECLARE_INTERNAL_TYPE_INFO()
void ResetName(void)
Reset Name data member.
virtual ~CFilter_Base(void)
static string SelectionName(E_Choice index)
Retrieve selection name (for diagnostic purposes).
bool IsSetAttlist(void) const
Check if a value has been assigned to Attlist data member.
const TFile & GetFile(void) const
Get the variant data.
DECLARE_INTERNAL_TYPE_INFO()
void DoSelect(E_Choice index, CObjectMemoryPool *pool=0)
void ResetAttlist(void)
Reset Attlist data member.
DECLARE_INTERNAL_TYPE_INFO()
void Reset(void)
Reset the whole object.
CFilter_Base & operator=(const CFilter_Base &)
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
bool CanGetFF(void) const
Check if it is safe to call GetFF method.
void ResetFilter(void)
Reset Filter data member.
void Reset(void)
Reset the whole object.
NCBI_NS_NCBI::CSerialObject * m_object
const TFilter & GetFilter(void) const
Get the Filter member data.
void ThrowInvalidSelection(E_Choice index) const
Throw 'InvalidSelection' exception.
C_E_FF & operator=(const C_E_FF &)
bool CanGetFF(void) const
Check if it is safe to call GetFF method.
bool IsFilter(void) const
Check if variant Filter is selected.
bool CanGetAttlist(void) const
Check if it is safe to call GetAttlist method.
const TFF & GetFF(void) const
Get the FF member data.
bool CanGetFilter(void) const
Check if it is safe to call GetFilter method.
bool IsSetName(void) const
Check if a value has been assigned to Name data member.
bool CanGetName(void) const
Check if it is safe to call GetName method.
const TAttlist & GetAttlist(void) const
Get the Attlist member data.
CFilter_Base(const CFilter_Base &)
TFilter & SetFilter(void)
Assign a value to Filter data member.
bool IsFile(void) const
Check if variant File is selected.
TFilter & SetFilter(void)
Select the variant.
void ResetFF(void)
Reset FF data member.
TName & SetName(void)
Assign a value to Name data member.
list< CRef< C_E_FF > > TFF
TAttlist & SetAttlist(void)
Assign a value to Attlist data member.
const TFF & GetFF(void) const
Get the FF member data.
void ResetFF(void)
Reset FF data member.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
list< CRef< C_E_FF > > m_FF
E_Choice Which(void) const
Which variant is currently selected.
void Reset(void)
Reset the whole object.
TFF & SetFF(void)
Assign a value to FF data member.
bool CanGetUniqueIdentifier(void) const
Check if it is safe to call GetUniqueIdentifier method.
void ResetSelection(void)
Reset the selection (set it to e_not_set).
DECLARE_INTERNAL_TYPE_INFO()
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
const TUniqueIdentifier & GetUniqueIdentifier(void) const
Get the UniqueIdentifier member data.
TFile & SetFile(void)
Select the variant.
TFF & SetFF(void)
Assign a value to FF data member.
TUniqueIdentifier & SetUniqueIdentifier(void)
Assign a value to UniqueIdentifier data member.
C_Attlist(const C_Attlist &)
bool IsSetUniqueIdentifier(void) const
Check if a value has been assigned to UniqueIdentifier data member.
const TFilter & GetFilter(void) const
Get the variant data.
bool IsSetFF(void) const
Check if a value has been assigned to FF data member.
void ResetUniqueIdentifier(void)
Reset UniqueIdentifier data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
Tparent::CMemberIndex< E_memberIndex, 2 > TmemberIndex
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
C_FF & operator=(const C_FF &)
CRef< TAttlist > m_Attlist
C_Attlist & operator=(const C_Attlist &)
@ e_MaxChoice
== e_Filter+1
@ e_not_set
No variant selected.
const GenericPointer< typename T::ValueType > T2 value