41 #ifndef OBJTOOLS_DATA_LOADERS_CDD_CDD_ACCESS_CDD_REQUEST_BASE_HPP
42 #define OBJTOOLS_DATA_LOADERS_CDD_CDD_ACCESS_CDD_REQUEST_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
113 e_Get_blob_by_seq_ids
124 void ResetSelection(
void);
130 E_Choice Which(
void)
const;
136 void CheckSelected(E_Choice index)
const;
142 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
150 static string SelectionName(E_Choice index);
183 bool IsGet_blob_id(
void)
const;
209 bool IsGet_blob(
void)
const;
215 const TGet_blob& GetGet_blob(
void)
const;
235 bool IsGet_blob_by_seq_id(
void)
const;
261 bool IsGet_blob_by_seq_ids(
void)
const;
285 static const char*
const sm_SelectionNames[];
316 bool IsSetSerial_number(
void)
const;
323 bool CanGetSerial_number(
void)
const;
326 void ResetSerial_number(
void);
353 bool IsSetRequest(
void)
const;
360 bool CanGetRequest(
void)
const;
363 void ResetRequest(
void);
369 const TRequest& GetRequest(
void)
const;
384 virtual void Reset(
void);
416 if ( m_choice != index )
417 ThrowInvalidSelection(index);
426 DoSelect(index, pool);
433 Select(index, reset, 0);
439 return m_choice == e_Get_blob_id;
445 return m_choice == e_Get_blob;
451 return m_choice == e_Get_blob_by_seq_id;
457 return m_choice == e_Get_blob_by_seq_ids;
463 CheckSelected(e_Get_blob_by_seq_ids);
464 return *m_Get_blob_by_seq_ids;
471 return *m_Get_blob_by_seq_ids;
Base class for all serializable objects.
static char UnassignedByte(void)
void ThrowUnassigned(TMemberIndex index) const
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_CDD_ACCESS_EXPORT
bool CanGetRequest(void) const
Check if it is safe to call GetRequest method.
bool IsSetRequest(void) const
Check if a value has been assigned to Request data member.
const TGet_blob_by_seq_ids & GetGet_blob_by_seq_ids(void) const
Get the variant data.
CCDD_Request_Base(const CCDD_Request_Base &)
CRef< TRequest > m_Request
NCBI_NS_NCBI::CSerialObject * m_object
CSeq_id TGet_blob_by_seq_id
E_Choice Which(void) const
Which variant is currently selected.
C_Request(const C_Request &)
TSerial_number GetSerial_number(void) const
Get the Serial_number member data.
bool IsGet_blob_by_seq_ids(void) const
Check if variant Get_blob_by_seq_ids is selected.
bool IsGet_blob_by_seq_id(void) const
Check if variant Get_blob_by_seq_id is selected.
TSerial_number & SetSerial_number(void)
Assign a value to Serial_number data member.
void ResetSerial_number(void)
Reset Serial_number data member.
C_Request & operator=(const C_Request &)
list< CRef< CSeq_id > > TGet_blob_by_seq_ids
bool IsGet_blob_id(void) const
Check if variant Get_blob_id is selected.
bool IsSetSerial_number(void) const
request's serial number, can be used in asynchronous clients server should copy it to corresponding f...
bool IsGet_blob(void) const
Check if variant Get_blob is selected.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
TRequest & SetRequest(void)
Assign a value to Request data member.
NCBI_NS_NCBI::CUnionBuffer< TGet_blob_by_seq_ids > m_Get_blob_by_seq_ids
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
Tparent::CMemberIndex< E_memberIndex, 3 > TmemberIndex
DECLARE_INTERNAL_TYPE_INFO()
const TRequest & GetRequest(void) const
Get the Request member data.
bool CanGetSerial_number(void) const
Check if it is safe to call GetSerial_number method.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
TGet_blob_by_seq_ids & SetGet_blob_by_seq_ids(void)
Select the variant.
DECLARE_INTERNAL_TYPE_INFO()
void ResetRequest(void)
Reset Request data member.
CCDD_Request_Base & operator=(const CCDD_Request_Base &)
@ e_Get_blob_by_seq_id
get one blob for one seq-id
@ e_Get_blob
get data for the blob-id
@ e_Get_blob_id
get blob-id for the seq-id
const GenericPointer< typename T::ValueType > T2 value