41 #ifndef OBJECTS_SUBMIT_SEQ_SUBMIT_BASE_HPP
42 #define OBJECTS_SUBMIT_SEQ_SUBMIT_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
126 void ResetSelection(
void);
132 E_Choice Which(
void)
const;
138 void CheckSelected(E_Choice index)
const;
144 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
152 static string SelectionName(E_Choice index);
184 bool IsEntrys(
void)
const;
190 const TEntrys& GetEntrys(
void)
const;
205 bool IsAnnots(
void)
const;
211 const TAnnots& GetAnnots(
void)
const;
226 bool IsDelete(
void)
const;
232 const TDelete& GetDelete(
void)
const;
250 static const char*
const sm_SelectionNames[];
281 bool IsSetSub(
void)
const;
288 bool CanGetSub(
void)
const;
297 const TSub& GetSub(
void)
const;
318 bool IsSetData(
void)
const;
325 bool CanGetData(
void)
const;
328 void ResetData(
void);
334 const TData& GetData(
void)
const;
346 TData& SetData(
void);
349 virtual void Reset(
void);
381 if ( m_choice != index )
382 ThrowInvalidSelection(index);
391 DoSelect(index, pool);
398 Select(index, reset, 0);
404 return m_choice == e_Entrys;
410 CheckSelected(e_Entrys);
424 return m_choice == e_Annots;
430 CheckSelected(e_Annots);
444 return m_choice == e_Delete;
450 CheckSelected(e_Delete);
464 return m_Sub.NotEmpty();
Base class for all serializable objects.
bool NotEmpty(void) const THROWS_NONE
Check if CRef is not empty – pointing to an object and has a non-null value.
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.
#define NCBI_SUBMIT_EXPORT
NCBI_NS_NCBI::CUnionBuffer< TDelete > m_Delete
DECLARE_INTERNAL_TYPE_INFO()
NCBI_NS_NCBI::CUnionBuffer< TAnnots > m_Annots
TEntrys & SetEntrys(void)
Select the variant.
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
bool IsAnnots(void) const
Check if variant Annots is selected.
list< CRef< CSeq_entry > > TEntrys
void ResetSub(void)
Reset Sub data member.
TDelete & SetDelete(void)
Select the variant.
TData & SetData(void)
Assign a value to Data data member.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
list< CRef< CSeq_annot > > TAnnots
E_Choice Which(void) const
Which variant is currently selected.
const TDelete & GetDelete(void) const
Get the variant data.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
const TEntrys & GetEntrys(void) const
Get the variant data.
CSeq_submit_Base(const CSeq_submit_Base &)
NCBI_NS_NCBI::CUnionBuffer< TEntrys > m_Entrys
void * m_dummy_pointer_for_alignment
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
TSub & SetSub(void)
Assign a value to Sub data member.
const TAnnots & GetAnnots(void) const
Get the variant data.
TAnnots & SetAnnots(void)
Select the variant.
C_Data & operator=(const C_Data &)
const TData & GetData(void) const
Get the Data member data.
const TSub & GetSub(void) const
Get the Sub member data.
DECLARE_INTERNAL_TYPE_INFO()
void ResetData(void)
Reset Data data member.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
list< CRef< CSeq_id > > TDelete
bool IsSetSub(void) const
Check if a value has been assigned to Sub data member.
bool IsEntrys(void) const
Check if variant Entrys is selected.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
bool CanGetSub(void) const
Check if it is safe to call GetSub method.
bool IsDelete(void) const
Check if variant Delete is selected.
bool CanGetData(void) const
Check if it is safe to call GetData method.
CSeq_submit_Base & operator=(const CSeq_submit_Base &)
const GenericPointer< typename T::ValueType > T2 value