41 #ifndef OBJECTS_BIBLIO_ID_PAT_BASE_HPP
42 #define OBJECTS_BIBLIO_ID_PAT_BASE_HPP
52 #ifndef BEGIN_objects_SCOPE
53 # define BEGIN_objects_SCOPE BEGIN_SCOPE(objects)
54 # define END_objects_SCOPE END_SCOPE(objects)
118 void ResetSelection(
void);
124 E_Choice Which(
void)
const;
130 void CheckSelected(E_Choice index)
const;
136 NCBI_NORETURN
void ThrowInvalidSelection(E_Choice index)
const;
144 static string SelectionName(E_Choice index);
175 bool IsNumber(
void)
const;
181 const TNumber& GetNumber(
void)
const;
202 bool IsApp_number(
void)
const;
232 static const char*
const sm_SelectionNames[];
235 NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string>
m_string;
264 bool IsSetCountry(
void)
const;
271 bool CanGetCountry(
void)
const;
274 void ResetCountry(
void);
280 const TCountry& GetCountry(
void)
const;
302 bool IsSetId(
void)
const;
309 bool CanGetId(
void)
const;
340 bool IsSetDoc_type(
void)
const;
347 bool CanGetDoc_type(
void)
const;
350 void ResetDoc_type(
void);
356 const TDoc_type& GetDoc_type(
void)
const;
372 virtual void Reset(
void);
405 if ( m_choice != index )
406 ThrowInvalidSelection(index);
415 DoSelect(index, pool);
422 Select(index, reset, 0);
428 return m_choice == e_Number;
434 CheckSelected(e_Number);
448 return m_choice == e_App_number;
454 CheckSelected(e_App_number);
515 return m_Id.NotEmpty();
just to identify a patent
Base class for all serializable objects.
void ThrowUnassigned(TMemberIndex index) const
static string UnassignedString(void)
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
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_BIBLIO_EXPORT
void ResetId(void)
Reset Id data member.
Tparent::CMemberIndex< E_memberIndex, 4 > TmemberIndex
bool IsApp_number(void) const
Check if variant App_number is selected.
bool IsNumber(void) const
Check if variant Number is selected.
bool IsSetCountry(void) const
Patent Document Country Check if a value has been assigned to Country data member.
TApp_number & SetApp_number(void)
Select the variant.
E_Choice Which(void) const
Which variant is currently selected.
DECLARE_INTERNAL_TYPE_INFO()
TNumber & SetNumber(void)
Select the variant.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
bool IsSetDoc_type(void) const
Patent Doc Type Check if a value has been assigned to Doc_type data member.
const TDoc_type & GetDoc_type(void) const
Get the Doc_type member data.
E_ChoiceStopper
Maximum+1 value of the choice variant enumerator.
void Select(E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
Select the requested variant if needed, allocating CObject variants from memory pool.
bool CanGetId(void) const
Check if it is safe to call GetId method.
bool CanGetCountry(void) const
Check if it is safe to call GetCountry method.
bool CanGetDoc_type(void) const
Check if it is safe to call GetDoc_type method.
const TId & GetId(void) const
Get the Id member data.
CId_pat_Base & operator=(const CId_pat_Base &)
void Select(E_Choice index, EResetVariant reset=eDoResetVariant)
Select the requested variant if needed.
TCountry & SetCountry(void)
Assign a value to Country data member.
void CheckSelected(E_Choice index) const
Verify selection, throw exception if it differs from the expected.
TId & SetId(void)
Assign a value to Id data member.
DECLARE_INTERNAL_TYPE_INFO()
const TNumber & GetNumber(void) const
Get the variant data.
const TApp_number & GetApp_number(void) const
Get the variant data.
C_Id & operator=(const C_Id &)
CId_pat_Base(const CId_pat_Base &)
const TCountry & GetCountry(void) const
Get the Country member data.
NCBI_NS_NCBI::CUnionBuffer< NCBI_NS_STD::string > m_string
void * m_dummy_pointer_for_alignment
TDoc_type & SetDoc_type(void)
Assign a value to Doc_type data member.
@ e_Number
Patent Document Number.