alnvec_multi_ds.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:5k
- /*
- * ===========================================================================
- * PRODUCTION $Log: alnvec_multi_ds.hpp,v $
- * PRODUCTION Revision 1000.3 2004/04/12 18:16:01 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.7
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef GUI_WIDGETS_ALN_MULTIPLE___ALNVEC_MULTI_DS__HPP
- #define GUI_WIDGETS_ALN_MULTIPLE___ALNVEC_MULTI_DS__HPP
- /* $Id: alnvec_multi_ds.hpp,v 1000.3 2004/04/12 18:16:01 gouriano Exp $
- * ===========================================================================
- *
- * 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.
- *
- * ===========================================================================
- *
- * Authors: Andrey Yazhuk
- *
- * File Description:
- *
- */
- #include <gui/widgets/aln_multiple/alnmulti_ds.hpp>
- #include <gui/widgets/aln_multiple/alnvec_row_handle.hpp>
- BEGIN_NCBI_SCOPE
- /// CAlnVecMultiDataSource - implementation of IAlnMultiDataSource for CAlnVec-based
- /// alignments.
- class NCBI_GUIWIDGETS_ALNMULTIPLE_EXPORT CAlnVecMultiDataSource
- : public CAlignDataSource,
- public IAlnMultiDataSource
- {
- public:
- typedef IAlnMultiDataSource::TNumrow TNumrow;
- CAlnVecMultiDataSource();
- ~CAlnVecMultiDataSource();
- virtual int GetConsensusRow() const;
- virtual TNumrow GetNumRows (void) const;
- virtual TSeqPos GetAlnStart (void) const;
- virtual TSeqPos GetAlnStop (void) const;
-
- virtual bool IsSetAnchor (void) const;
- virtual TNumrow GetAnchor (void) const;
- virtual void SetAnchor (TNumrow anchor);
- virtual void UnsetAnchor (void);
- virtual bool CanGetId(TNumrow row) const;
- virtual const CSeq_id& GetSeqId(TNumrow row) const;
- virtual const objects::CBioseq_Handle& GetBioseqHandle (TNumrow row) const;
- virtual TSignedSeqPos GetSeqPosFromAlnPos(TNumrow for_row, TSeqPos aln_pos,
- ESearchDirection dir=TSearchDirection::eNone,
- bool try_reverse_dir=true) const;
- virtual TSignedSeqPos GetAlnPosFromSeqPos(TNumrow row, TSeqPos seq_pos,
- ESearchDirection dir=TSearchDirection::eNone,
- bool try_reverse_dir=true) const;
- virtual const IAlignRowHandle* GetRowHandle(TNumrow row) const;
- void SetGapChar (TResidue gap_char);
- protected:
- typedef vector<CAlnVecRowHandle*> THandleVector;
- THandleVector m_Handles;
- virtual void x_ClearHandles();
- virtual void x_CreateHandles();
- private:
- // prohibit copying!
- CAlnVecMultiDataSource(const CAlnVecMultiDataSource& ds);
- CAlnVecMultiDataSource& operator=(const CAlnVecMultiDataSource& ds);
- };
- END_NCBI_SCOPE
- /*
- * ===========================================================================
- * $Log: alnvec_multi_ds.hpp,v $
- * Revision 1000.3 2004/04/12 18:16:01 gouriano
- * PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.7
- *
- * Revision 1.7 2004/02/11 15:28:55 yazhuk
- * Removed constructors with arguments
- *
- * Revision 1.6 2003/12/10 19:03:20 yazhuk
- * Added const specifier to CanGetId() and GetSeqId().
- *
- * Revision 1.5 2003/12/10 17:03:48 yazhuk
- * Changed row identification from mandatory CBioseqHandle to optional CSeq_id.
- *
- * Revision 1.4 2003/12/08 15:09:49 yazhuk
- * Moved constructors bodies to .cpp
- *
- * Revision 1.3 2003/11/26 16:52:53 johnson
- * switch IAlnMultiDataSource to use CAlnMap::ESearchDirection instead of it's
- * own ESearchDirection
- *
- * Revision 1.2 2003/11/17 21:13:47 yazhuk
- * Made SetGapChar() a non-virtual function
- *
- * Revision 1.1 2003/10/29 23:29:38 yazhuk
- * Initial revision
- *
- * ===========================================================================
- */
- #endif // GUI_WIDGETS_ALN_MULTIPLE___ALNVEC_MULTI_DS__HPP