CModel_descr_Base Class Reference
[Code generated by DATATOOL from 'mmdb2.asn' (module 'MMDB-Structural-model')]

Represents ASN.1 type Model-descr defined in file mmdb2.asn

Search Toolkit Book for CModel_descr_Base

#include <Model_descr_.hpp>

Inheritance diagram for CModel_descr_Base:

Inheritance graph
[legend]
Collaboration diagram for CModel_descr_Base:

Collaboration graph
[legend]
List of all members.

Detailed Description

CModel_descr_Base --.

Definition at line 76 of file Model_descr_.hpp.

Public Types

typedef string TName
typedef string TPdb_reso
typedef string TPdb_method
typedef string TPdb_comment
typedef string TOther_comment
typedef CPub TAttribution
enum  E_Choice {
  e_not_set = 0, e_Name, e_Pdb_reso, e_Pdb_method,
  e_Pdb_comment, e_Other_comment, e_Attribution
}
 Choice variants. More...
enum  E_ChoiceStopper { e_MaxChoice = 7 }
 Maximum+1 value of the choice variant enumerator. More...

Public Member Functions

 CModel_descr_Base (void)
virtual ~CModel_descr_Base (void)
 DECLARE_INTERNAL_TYPE_INFO ()
virtual void Reset (void)
 Reset the selection (set it to e_not_set).
E_Choice Which (void) const
 Which variant is currently selected.
void CheckSelected (E_Choice index) const
 Verify selection, throw exception if it differs from the expected.
void ThrowInvalidSelection (E_Choice index) const
 Throw 'InvalidSelection' exception.
void Select (E_Choice index, EResetVariant reset=eDoResetVariant)
 Select the requested variant if needed.
void Select (E_Choice index, EResetVariant reset, CObjectMemoryPool *pool)
 Select the requested variant if needed, allocating CObject variants from memory pool.
bool IsName (void) const
 Check if variant Name is selected.
const TNameGetName (void) const
 Get the variant data.
TNameSetName (void)
 Select the variant.
void SetName (const TName &value)
 Select the variant and set its data.
bool IsPdb_reso (void) const
 Check if variant Pdb_reso is selected.
const TPdb_resoGetPdb_reso (void) const
 Get the variant data.
TPdb_resoSetPdb_reso (void)
 Select the variant.
void SetPdb_reso (const TPdb_reso &value)
 Select the variant and set its data.
bool IsPdb_method (void) const
 Check if variant Pdb_method is selected.
const TPdb_methodGetPdb_method (void) const
 Get the variant data.
TPdb_methodSetPdb_method (void)
 Select the variant.
void SetPdb_method (const TPdb_method &value)
 Select the variant and set its data.
bool IsPdb_comment (void) const
 Check if variant Pdb_comment is selected.
const TPdb_commentGetPdb_comment (void) const
 Get the variant data.
TPdb_commentSetPdb_comment (void)
 Select the variant.
void SetPdb_comment (const TPdb_comment &value)
 Select the variant and set its data.
bool IsOther_comment (void) const
 Check if variant Other_comment is selected.
const TOther_commentGetOther_comment (void) const
 Get the variant data.
TOther_commentSetOther_comment (void)
 Select the variant.
void SetOther_comment (const TOther_comment &value)
 Select the variant and set its data.
bool IsAttribution (void) const
 Check if variant Attribution is selected.
const TAttributionGetAttribution (void) const
 Get the variant data.
TAttributionSetAttribution (void)
 Select the variant.
void SetAttribution (TAttribution &value)
 Select the variant and set its data.

Static Public Member Functions

static string SelectionName (E_Choice index)
 Retrieve selection name (for diagnostic purposes).

Private Types

typedef CSerialObject Tparent

Private Member Functions

 CModel_descr_Base (const CModel_descr_Base &)
CModel_descr_Baseoperator= (const CModel_descr_Base &)
void DoSelect (E_Choice index, CObjectMemoryPool *pool=0)

Private Attributes

E_Choice m_choice
NCBI_NS_NCBI::CUnionBuffer<
NCBI_NS_STD::string > 
m_string
NCBI_NS_NCBI::CSerialObject * m_object

Static Private Attributes

static const char *const sm_SelectionNames []


Member Typedef Documentation

typedef CPub CModel_descr_Base::TAttribution
 

Definition at line 154 of file Model_descr_.hpp.

typedef string CModel_descr_Base::TName
 

Definition at line 149 of file Model_descr_.hpp.

typedef string CModel_descr_Base::TOther_comment
 

Definition at line 153 of file Model_descr_.hpp.

typedef CSerialObject CModel_descr_Base::Tparent [private]
 

Reimplemented in CModel_descr.

Definition at line 78 of file Model_descr_.hpp.

typedef string CModel_descr_Base::TPdb_comment
 

Definition at line 152 of file Model_descr_.hpp.

typedef string CModel_descr_Base::TPdb_method
 

Definition at line 151 of file Model_descr_.hpp.

typedef string CModel_descr_Base::TPdb_reso
 

Definition at line 150 of file Model_descr_.hpp.


Member Enumeration Documentation

enum CModel_descr_Base::E_Choice
 

Choice variants.

Enumerator:
e_not_set  No variant selected.
e_Name 
e_Pdb_reso 
e_Pdb_method 
e_Pdb_comment 
e_Other_comment 
e_Attribution 

Definition at line 90 of file Model_descr_.hpp.

enum CModel_descr_Base::E_ChoiceStopper
 

Maximum+1 value of the choice variant enumerator.

Enumerator:
e_MaxChoice  == e_Attribution+1

Definition at line 100 of file Model_descr_.hpp.


Constructor & Destructor Documentation

END_CHOICE_INFO CModel_descr_Base::CModel_descr_Base void   ) 
 

Definition at line 177 of file Model_descr_.cpp.

CModel_descr_Base::~CModel_descr_Base void   )  [virtual]
 

Definition at line 183 of file Model_descr_.cpp.

References e_not_set, m_choice, and Reset().

CModel_descr_Base::CModel_descr_Base const CModel_descr_Base  )  [private]
 


Member Function Documentation

void CModel_descr_Base::CheckSelected E_Choice  index  )  const [inline]
 

Verify selection, throw exception if it differs from the expected.

Parameters:
index Expected selection.

Definition at line 354 of file Model_descr_.hpp.

References m_choice, and ThrowInvalidSelection().

Referenced by GetAttribution(), GetName(), GetOther_comment(), GetPdb_comment(), GetPdb_method(), and GetPdb_reso().

CModel_descr_Base::DECLARE_INTERNAL_TYPE_INFO  ) 
 

void CModel_descr_Base::DoSelect E_Choice  index,
CObjectMemoryPool pool = 0
[private]
 

const CModel_descr_Base::TAttribution & CModel_descr_Base::GetAttribution void   )  const
 

Get the variant data.

Returns:
Reference to the data.

Definition at line 139 of file Model_descr_.cpp.

References CheckSelected(), e_Attribution, and m_object.

const CModel_descr_Base::TName & CModel_descr_Base::GetName void   )  const [inline]
 

Get the variant data.

Returns:
Reference to the data.

Definition at line 383 of file Model_descr_.hpp.

References CheckSelected(), e_Name, and m_string.

const CModel_descr_Base::TOther_comment & CModel_descr_Base::GetOther_comment void   )  const [inline]
 

Get the variant data.

Returns:
Reference to the data.

Definition at line 463 of file Model_descr_.hpp.

References CheckSelected(), e_Other_comment, and m_string.

const CModel_descr_Base::TPdb_comment & CModel_descr_Base::GetPdb_comment void   )  const [inline]
 

Get the variant data.

Returns:
Reference to the data.

Definition at line 443 of file Model_descr_.hpp.

References CheckSelected(), e_Pdb_comment, and m_string.

const CModel_descr_Base::TPdb_method & CModel_descr_Base::GetPdb_method void   )  const [inline]
 

Get the variant data.

Returns:
Reference to the data.

Definition at line 423 of file Model_descr_.hpp.

References CheckSelected(), e_Pdb_method, and m_string.

const CModel_descr_Base::TPdb_reso & CModel_descr_Base::GetPdb_reso void   )  const [inline]
 

Get the variant data.

Returns:
Reference to the data.

Definition at line 403 of file Model_descr_.hpp.

References CheckSelected(), e_Pdb_reso, and m_string.

bool CModel_descr_Base::IsAttribution void   )  const [inline]
 

Check if variant Attribution is selected.

Attribution type is defined as 'typedef CPub TAttribution'.

Returns:
  • true, if the variant is selected.
  • false, otherwise.

Definition at line 477 of file Model_descr_.hpp.

References e_Attribution, and m_choice.

bool CModel_descr_Base::IsName void   )  const [inline]
 

Check if variant Name is selected.

Name type is defined as 'typedef string TName'.

Returns:
  • true, if the variant is selected.
  • false, otherwise.

Definition at line 377 of file Model_descr_.hpp.

References e_Name, and m_choice.

bool CModel_descr_Base::IsOther_comment void   )  const [inline]
 

Check if variant Other_comment is selected.

Other_comment type is defined as 'typedef string TOther_comment'.

Returns:
  • true, if the variant is selected.
  • false, otherwise.

Definition at line 457 of file Model_descr_.hpp.

References e_Other_comment, and m_choice.

bool CModel_descr_Base::IsPdb_comment void   )  const [inline]
 

Check if variant Pdb_comment is selected.

Pdb_comment type is defined as 'typedef string TPdb_comment'.

Returns:
  • true, if the variant is selected.
  • false, otherwise.

Definition at line 437 of file Model_descr_.hpp.

References e_Pdb_comment, and m_choice.

bool CModel_descr_Base::IsPdb_method void   )  const [inline]
 

Check if variant Pdb_method is selected.

Pdb_method type is defined as 'typedef string TPdb_method'.

Returns:
  • true, if the variant is selected.
  • false, otherwise.

Definition at line 417 of file Model_descr_.hpp.

References e_Pdb_method, and m_choice.

bool CModel_descr_Base::IsPdb_reso void   )  const [inline]
 

Check if variant Pdb_reso is selected.

Pdb_reso type is defined as 'typedef string TPdb_reso'.

Returns:
  • true, if the variant is selected.
  • false, otherwise.

Definition at line 397 of file Model_descr_.hpp.

References e_Pdb_reso, and m_choice.

CModel_descr_Base& CModel_descr_Base::operator= const CModel_descr_Base  )  [private]
 

void CModel_descr_Base::Reset void   )  [virtual]
 

Reset the selection (set it to e_not_set).

Definition at line 51 of file Model_descr_.cpp.

References e_Attribution, e_Name, e_not_set, e_Other_comment, e_Pdb_comment, e_Pdb_method, e_Pdb_reso, m_choice, m_object, and m_string.

Referenced by SetAttribution(), and ~CModel_descr_Base().

void CModel_descr_Base::Select E_Choice  index,
EResetVariant  reset,
CObjectMemoryPool pool
 

Select the requested variant if needed, allocating CObject variants from memory pool.

void CModel_descr_Base::Select E_Choice  index,
EResetVariant  reset = eDoResetVariant
 

Select the requested variant if needed.

Parameters:
index New selection state.
reset Flag that defines the resetting of the variant data. The data will be reset if either the current selection differs from the new one, or the flag is set to eDoResetVariant.

Referenced by SetAttribution(), SetName(), SetOther_comment(), SetPdb_comment(), SetPdb_method(), and SetPdb_reso().

NCBI_NS_STD::string CModel_descr_Base::SelectionName E_Choice  index  )  [static]
 

Retrieve selection name (for diagnostic purposes).

Parameters:
index One of possible selection states.
Returns:
Name string.

Definition at line 99 of file Model_descr_.cpp.

References sm_SelectionNames.

void CModel_descr_Base::SetAttribution TAttribution value  ) 
 

Select the variant and set its data.

Parameters:
value Reference to the data.

Definition at line 151 of file Model_descr_.cpp.

References CObject::AddReference(), e_Attribution, m_choice, m_object, and Reset().

CModel_descr_Base::TAttribution & CModel_descr_Base::SetAttribution void   ) 
 

Select the variant.

Returns:
Reference to the variant data.

Definition at line 145 of file Model_descr_.cpp.

References e_Attribution, eDoNotResetVariant, m_object, and Select().

void CModel_descr_Base::SetName const TName value  ) 
 

Select the variant and set its data.

Parameters:
value Variant data.

Definition at line 109 of file Model_descr_.cpp.

References e_Name, eDoNotResetVariant, m_string, and Select().

CModel_descr_Base::TName & CModel_descr_Base::SetName void   )  [inline]
 

Select the variant.

Returns:
Reference to the variant data.

Definition at line 390 of file Model_descr_.hpp.

References e_Name, eDoNotResetVariant, m_string, and Select().

void CModel_descr_Base::SetOther_comment const TOther_comment value  ) 
 

Select the variant and set its data.

Parameters:
value Variant data.

Definition at line 133 of file Model_descr_.cpp.

References e_Other_comment, eDoNotResetVariant, m_string, and Select().

CModel_descr_Base::TOther_comment & CModel_descr_Base::SetOther_comment void   )  [inline]
 

Select the variant.

Returns:
Reference to the variant data.

Definition at line 470 of file Model_descr_.hpp.

References e_Other_comment, eDoNotResetVariant, m_string, and Select().

void CModel_descr_Base::SetPdb_comment const TPdb_comment value  ) 
 

Select the variant and set its data.

Parameters:
value Variant data.

Definition at line 127 of file Model_descr_.cpp.

References e_Pdb_comment, eDoNotResetVariant, m_string, and Select().

CModel_descr_Base::TPdb_comment & CModel_descr_Base::SetPdb_comment void   )  [inline]
 

Select the variant.

Returns:
Reference to the variant data.

Definition at line 450 of file Model_descr_.hpp.

References e_Pdb_comment, eDoNotResetVariant, m_string, and Select().

void CModel_descr_Base::SetPdb_method const TPdb_method value  ) 
 

Select the variant and set its data.

Parameters:
value Variant data.

Definition at line 121 of file Model_descr_.cpp.

References e_Pdb_method, eDoNotResetVariant, m_string, and Select().

CModel_descr_Base::TPdb_method & CModel_descr_Base::SetPdb_method void   )  [inline]
 

Select the variant.

Returns:
Reference to the variant data.

Definition at line 430 of file Model_descr_.hpp.

References e_Pdb_method, eDoNotResetVariant, m_string, and Select().

void CModel_descr_Base::SetPdb_reso const TPdb_reso value  ) 
 

Select the variant and set its data.

Parameters:
value Variant data.

Definition at line 115 of file Model_descr_.cpp.

References e_Pdb_reso, eDoNotResetVariant, m_string, and Select().

CModel_descr_Base::TPdb_reso & CModel_descr_Base::SetPdb_reso void   )  [inline]
 

Select the variant.

Returns:
Reference to the variant data.

Definition at line 410 of file Model_descr_.hpp.

References e_Pdb_reso, eDoNotResetVariant, m_string, and Select().

void CModel_descr_Base::ThrowInvalidSelection E_Choice  index  )  const
 

Throw 'InvalidSelection' exception.

Parameters:
index Expected selection.

Definition at line 104 of file Model_descr_.cpp.

References DIAG_COMPILE_INFO, m_choice, and sm_SelectionNames.

Referenced by CheckSelected().

CModel_descr_Base::E_Choice CModel_descr_Base::Which void   )  const [inline]
 

Which variant is currently selected.

Returns:
Choice state enumerator.

Definition at line 348 of file Model_descr_.hpp.

References m_choice.


Member Data Documentation

E_Choice CModel_descr_Base::m_choice [private]
 

Definition at line 326 of file Model_descr_.hpp.

Referenced by CheckSelected(), IsAttribution(), IsName(), IsOther_comment(), IsPdb_comment(), IsPdb_method(), IsPdb_reso(), Reset(), SetAttribution(), ThrowInvalidSelection(), Which(), and ~CModel_descr_Base().

NCBI_NS_NCBI::CSerialObject* CModel_descr_Base::m_object [private]
 

Definition at line 334 of file Model_descr_.hpp.

Referenced by GetAttribution(), Reset(), and SetAttribution().

NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string> CModel_descr_Base::m_string [private]
 

Definition at line 333 of file Model_descr_.hpp.

Referenced by GetName(), GetOther_comment(), GetPdb_comment(), GetPdb_method(), GetPdb_reso(), Reset(), SetName(), SetOther_comment(), SetPdb_comment(), SetPdb_method(), and SetPdb_reso().

const char *const CModel_descr_Base::sm_SelectionNames [static, private]
 

Initial value:

 {
    "not set",
    "name",
    "pdb-reso",
    "pdb-method",
    "pdb-comment",
    "other-comment",
    "attribution"
}

Definition at line 330 of file Model_descr_.hpp.

Referenced by SelectionName(), and ThrowInvalidSelection().


The documentation for this class was generated from the following files:
Generated on Mon Dec 7 12:56:20 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:23:28 2009 by modify_doxy.py rev. 173732