NCBI C++ Toolkit Cross Reference

  C++/src/objects/blast/Blast4_subject_.cpp


/* $Id$ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work" under the * terms of the United States Copyright Act. It was written as part of * the author's official duties as a United States Government employee and * thus cannot be copyrighted. This software/database is freely available * to the public for use. The National Library of Medicine and the U.S. * Government have not placed any restriction on its use or reproduction. * * Although all reasonable efforts have been taken to ensure the accuracy * and reliability of the software and data, the NLM and the U.S. * Government do not and cannot warrant the performance or results that * may be obtained by using this software or data. The NLM and the U.S. * Government disclaim all warranties, express or implied, including * warranties of performance, merchantability or fitness for any particular * purpose. * * Please cite the author in any work or product based on this material. * * =========================================================================== * * File Description: * This code was generated by application DATATOOL * using the following specifications: * 'blast.asn'. * * ATTENTION: * Don't edit or commit this file into CVS as this file will * be overridden (by DATATOOL) without warning! * =========================================================================== */ // standard includes #include <ncbi_pch.hpp> #include <serial/serialimpl.hpp> // generated includes #include <objects/blast/Blast4_subject.hpp> #include <objects/seq/Bioseq.hpp> #include <objects/seqloc/Seq_loc.hpp> BEGIN_NCBI_SCOPE BEGIN_objects_SCOPE // namespace ncbi::objects:: // generated classes void CBlast4_subject_Base::Reset(void) { if ( m_choice != e_not_set ) ResetSelection(); } void CBlast4_subject_Base::ResetSelection(void) { switch ( m_choice ) { case e_Sequences: m_Sequences.Destruct(); break; case e_Seq_loc_list: m_Seq_loc_list.Destruct(); break; case e_Database: m_string.Destruct(); break; default: break; } m_choice = e_not_set; } void CBlast4_subject_Base::DoSelect(E_Choice index, NCBI_NS_NCBI::CObjectMemoryPool* ) { switch ( index ) { case e_Sequences: m_Sequences.Construct(); break; case e_Seq_loc_list: m_Seq_loc_list.Construct(); break; case e_Database: m_string.Construct(); break; default: break; } m_choice = index; } const char* const CBlast4_subject_Base::sm_SelectionNames[] = { "not set", "database", "sequences", "seq-loc-list" }; NCBI_NS_STD::string CBlast4_subject_Base::SelectionName(E_Choice index) { return NCBI_NS_NCBI::CInvalidChoiceSelection::GetName(index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0])); } void CBlast4_subject_Base::ThrowInvalidSelection(E_Choice index) const { throw NCBI_NS_NCBI::CInvalidChoiceSelection(DIAG_COMPILE_INFO, this, m_choice, index, sm_SelectionNames, sizeof(sm_SelectionNames)/sizeof(sm_SelectionNames[0])); } void CBlast4_subject_Base::SetDatabase(const CBlast4_subject_Base::TDatabase& value) { Select(e_Database, NCBI_NS_NCBI::eDoNotResetVariant); *m_string = value; } // helper methods // type info BEGIN_NAMED_BASE_CHOICE_INFO("Blast4-subject", CBlast4_subject) { SET_CHOICE_MODULE("NCBI-Blast4"); ADD_NAMED_BUF_CHOICE_VARIANT("database", m_string, STD, (string)); ADD_NAMED_BUF_CHOICE_VARIANT("sequences", m_Sequences, STL_list, (STL_CRef, (CLASS, (CBioseq)))); ADD_NAMED_BUF_CHOICE_VARIANT("seq-loc-list", m_Seq_loc_list, STL_list, (STL_CRef, (CLASS, (CSeq_loc)))); } END_CHOICE_INFO // constructor CBlast4_subject_Base::CBlast4_subject_Base(void) : m_choice(e_not_set) { } // destructor CBlast4_subject_Base::~CBlast4_subject_Base(void) { Reset(); } END_objects_SCOPE // namespace ncbi::objects:: END_NCBI_SCOPE

source navigation ]   [ diff markup ]   [ identifier search ]   [ freetext search ]   [ file search ]  

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.