CModel_coordinate_set_Base::C_Coordinates Class Reference

Search Toolkit Book for CModel_coordinate_set_Base::C_Coordinates

#include <Model_coordinate_set_.hpp>

Inheritance diagram for CModel_coordinate_set_Base::C_Coordinates:

Inheritance graph
[legend]
Collaboration diagram for CModel_coordinate_set_Base::C_Coordinates:

Collaboration graph
[legend]
List of all members.

Detailed Description

C_Coordinates --.

Definition at line 108 of file Model_coordinate_set_.hpp.

Public Types

typedef CCoordinates TLiteral
typedef CChem_graph_alignment TReference
enum  E_Choice { e_not_set = 0, e_Literal, e_Reference }
 Choice variants. More...
enum  E_ChoiceStopper { e_MaxChoice = 3 }
 Maximum+1 value of the choice variant enumerator. More...

Public Member Functions

 C_Coordinates (void)
 ~C_Coordinates (void)
 DECLARE_INTERNAL_TYPE_INFO ()
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 IsLiteral (void) const
 Check if variant Literal is selected.
const TLiteralGetLiteral (void) const
 Get the variant data.
TLiteralSetLiteral (void)
 Select the variant.
void SetLiteral (TLiteral &value)
 Select the variant and set its data.
bool IsReference (void) const
 Check if variant Reference is selected.
const TReferenceGetReference (void) const
 Get the variant data.
TReferenceSetReference (void)
 Select the variant.
void SetReference (TReference &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

 C_Coordinates (const C_Coordinates &)
C_Coordinatesoperator= (const C_Coordinates &)
void DoSelect (E_Choice index, CObjectMemoryPool *pool=0)

Private Attributes

E_Choice m_choice
NCBI_NS_NCBI::CSerialObject * m_object

Static Private Attributes

static const char *const sm_SelectionNames []


Member Typedef Documentation

typedef CCoordinates CModel_coordinate_set_Base::C_Coordinates::TLiteral
 

Definition at line 177 of file Model_coordinate_set_.hpp.

typedef CSerialObject CModel_coordinate_set_Base::C_Coordinates::Tparent [private]
 

Definition at line 110 of file Model_coordinate_set_.hpp.

typedef CChem_graph_alignment CModel_coordinate_set_Base::C_Coordinates::TReference
 

Definition at line 178 of file Model_coordinate_set_.hpp.


Member Enumeration Documentation

enum CModel_coordinate_set_Base::C_Coordinates::E_Choice
 

Choice variants.

Enumerator:
e_not_set  No variant selected.
e_Literal 
e_Reference 

Definition at line 122 of file Model_coordinate_set_.hpp.

enum CModel_coordinate_set_Base::C_Coordinates::E_ChoiceStopper
 

Maximum+1 value of the choice variant enumerator.

Enumerator:
e_MaxChoice  == e_Reference+1

Definition at line 128 of file Model_coordinate_set_.hpp.


Constructor & Destructor Documentation

END_CHOICE_INFO CModel_coordinate_set_Base::C_Coordinates::C_Coordinates void   ) 
 

Definition at line 152 of file Model_coordinate_set_.cpp.

CModel_coordinate_set_Base::C_Coordinates::~C_Coordinates void   ) 
 

Definition at line 158 of file Model_coordinate_set_.cpp.

References e_not_set, m_choice, and Reset().

CModel_coordinate_set_Base::C_Coordinates::C_Coordinates const C_Coordinates  )  [private]
 


Member Function Documentation

void CModel_coordinate_set_Base::C_Coordinates::CheckSelected E_Choice  index  )  const [inline]
 

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

Parameters:
index Expected selection.

Definition at line 394 of file Model_coordinate_set_.hpp.

References m_choice, and ThrowInvalidSelection().

Referenced by GetLiteral(), and GetReference().

CModel_coordinate_set_Base::C_Coordinates::DECLARE_INTERNAL_TYPE_INFO  ) 
 

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

const CModel_coordinate_set_Base::C_Coordinates::TLiteral & CModel_coordinate_set_Base::C_Coordinates::GetLiteral void   )  const
 

Get the variant data.

Returns:
Reference to the data.

Definition at line 97 of file Model_coordinate_set_.cpp.

References CheckSelected(), e_Literal, and m_object.

const CModel_coordinate_set_Base::C_Coordinates::TReference & CModel_coordinate_set_Base::C_Coordinates::GetReference void   )  const
 

Get the variant data.

Returns:
Reference to the data.

Definition at line 119 of file Model_coordinate_set_.cpp.

References CheckSelected(), e_Reference, and m_object.

bool CModel_coordinate_set_Base::C_Coordinates::IsLiteral void   )  const [inline]
 

Check if variant Literal is selected.

Literal type is defined as 'typedef CCoordinates TLiteral'.

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

Definition at line 417 of file Model_coordinate_set_.hpp.

References e_Literal, and m_choice.

bool CModel_coordinate_set_Base::C_Coordinates::IsReference void   )  const [inline]
 

Check if variant Reference is selected.

Reference type is defined as 'typedef CChem_graph_alignment TReference'.

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

Definition at line 423 of file Model_coordinate_set_.hpp.

References e_Reference, and m_choice.

C_Coordinates& CModel_coordinate_set_Base::C_Coordinates::operator= const C_Coordinates  )  [private]
 

void CModel_coordinate_set_Base::C_Coordinates::Reset void   ) 
 

Reset the selection (set it to e_not_set).

Definition at line 53 of file Model_coordinate_set_.cpp.

References e_Literal, e_not_set, e_Reference, m_choice, and m_object.

Referenced by SetLiteral(), SetReference(), and ~C_Coordinates().

void CModel_coordinate_set_Base::C_Coordinates::Select E_Choice  index,
EResetVariant  reset,
CObjectMemoryPool pool
 

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

void CModel_coordinate_set_Base::C_Coordinates::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 SetLiteral(), and SetReference().

NCBI_NS_STD::string CModel_coordinate_set_Base::C_Coordinates::SelectionName E_Choice  index  )  [static]
 

Retrieve selection name (for diagnostic purposes).

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

Definition at line 87 of file Model_coordinate_set_.cpp.

References sm_SelectionNames.

void CModel_coordinate_set_Base::C_Coordinates::SetLiteral TLiteral value  ) 
 

Select the variant and set its data.

Parameters:
value Reference to the data.

Definition at line 109 of file Model_coordinate_set_.cpp.

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

CModel_coordinate_set_Base::C_Coordinates::TLiteral & CModel_coordinate_set_Base::C_Coordinates::SetLiteral void   ) 
 

Select the variant.

Returns:
Reference to the variant data.

Definition at line 103 of file Model_coordinate_set_.cpp.

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

void CModel_coordinate_set_Base::C_Coordinates::SetReference TReference value  ) 
 

Select the variant and set its data.

Parameters:
value Reference to the data.

Definition at line 131 of file Model_coordinate_set_.cpp.

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

CModel_coordinate_set_Base::C_Coordinates::TReference & CModel_coordinate_set_Base::C_Coordinates::SetReference void   ) 
 

Select the variant.

Returns:
Reference to the variant data.

Definition at line 125 of file Model_coordinate_set_.cpp.

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

void CModel_coordinate_set_Base::C_Coordinates::ThrowInvalidSelection E_Choice  index  )  const
 

Throw 'InvalidSelection' exception.

Parameters:
index Expected selection.

Definition at line 92 of file Model_coordinate_set_.cpp.

References DIAG_COMPILE_INFO, m_choice, and sm_SelectionNames.

Referenced by CheckSelected().

CModel_coordinate_set_Base::C_Coordinates::E_Choice CModel_coordinate_set_Base::C_Coordinates::Which void   )  const [inline]
 

Which variant is currently selected.

Returns:
Choice state enumerator.

Definition at line 388 of file Model_coordinate_set_.hpp.

References m_choice.


Member Data Documentation

E_Choice CModel_coordinate_set_Base::C_Coordinates::m_choice [private]
 

Definition at line 241 of file Model_coordinate_set_.hpp.

Referenced by CheckSelected(), IsLiteral(), IsReference(), Reset(), SetLiteral(), SetReference(), ThrowInvalidSelection(), Which(), and ~C_Coordinates().

NCBI_NS_NCBI::CSerialObject* CModel_coordinate_set_Base::C_Coordinates::m_object [private]
 

Definition at line 247 of file Model_coordinate_set_.hpp.

Referenced by GetLiteral(), GetReference(), Reset(), SetLiteral(), and SetReference().

const char *const CModel_coordinate_set_Base::C_Coordinates::sm_SelectionNames [static, private]
 

Initial value:

 {
    "not set",
    "literal",
    "reference"
}

Definition at line 245 of file Model_coordinate_set_.hpp.

Referenced by SelectionName(), and ThrowInvalidSelection().


The documentation for this class was generated from the following files:
Generated on Mon Dec 7 12:56:10 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