📄 seq_annot.cpp
字号:
/* * =========================================================================== * PRODUCTION $Log: Seq_annot.cpp,v $ * PRODUCTION Revision 1000.1 2004/06/01 19:33:13 gouriano * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.6 * PRODUCTION * =========================================================================== *//* $Id: Seq_annot.cpp,v 1000.1 2004/06/01 19:33:13 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. * * =========================================================================== * * Author: ....... * * File Description: * ....... * * Remark: * This code was originally generated by application DATATOOL * using specifications from the data definition file * 'seq.asn'. */// standard includes// generated includes#include <ncbi_pch.hpp>#include <objects/seq/Seq_annot.hpp>#include <objects/general/Date.hpp>// generated classesBEGIN_NCBI_SCOPEBEGIN_objects_SCOPE // namespace ncbi::objects::// destructorCSeq_annot::~CSeq_annot(void){}void CSeq_annot::AddName(const string &name){ //NB: this used list::remove_if(), which is not portable to Windows TDesc::Tdata::iterator iter = SetDesc().Set().begin(); for ( ; iter != SetDesc().Set().end(); ) { if ((*iter)->IsName() ) { iter = SetDesc().Set().erase(iter); } else { ++iter; } } CRef<CAnnotdesc> desc(new CAnnotdesc()); desc->SetName(name); SetDesc().Set().push_back(desc);}void CSeq_annot::AddTitle(const string& title){ LOG_POST(Warning << "CSeq_annot::AddTitle(): AddTitle() is deprecated, " "use SetTitle() instead"); SetTitle(title);}void CSeq_annot::SetTitle(const string &title){ TDesc::Tdata::iterator iter = SetDesc().Set().begin(); for ( ; iter != SetDesc().Set().end(); ) { if ((*iter)->IsTitle() ) { iter = SetDesc().Set().erase(iter); } else { ++iter; } } CRef<CAnnotdesc> desc(new CAnnotdesc()); desc->SetTitle(title); SetDesc().Set().push_back(desc);}void CSeq_annot::AddComment(const string &comment){ CRef<CAnnotdesc> desc(new CAnnotdesc()); desc->SetComment(comment); SetDesc().Set().push_back(desc);}void CSeq_annot::SetCreateDate(const CTime& dt){ CRef<CDate> date(new CDate(dt)); SetCreateDate(*date);}void CSeq_annot::SetCreateDate(CDate& date){ TDesc::Tdata::iterator iter = SetDesc().Set().begin(); for ( ; iter != SetDesc().Set().end(); ) { if ((*iter)->IsCreate_date() ) { iter = SetDesc().Set().erase(iter); } else { ++iter; } } CRef<CAnnotdesc> desc(new CAnnotdesc()); desc->SetCreate_date(date); SetDesc().Set().push_back(desc);}void CSeq_annot::SetUpdateDate(const CTime& dt){ CRef<CDate> date(new CDate(dt)); SetUpdateDate(*date);}void CSeq_annot::SetUpdateDate(CDate& date){ TDesc::Tdata::iterator iter = SetDesc().Set().begin(); for ( ; iter != SetDesc().Set().end(); ) { if ((*iter)->IsUpdate_date() ) { iter = SetDesc().Set().erase(iter); } else { ++iter; } } CRef<CAnnotdesc> desc(new CAnnotdesc()); desc->SetUpdate_date(date); SetDesc().Set().push_back(desc);}void CSeq_annot::AddUserObject(CUser_object& obj){ CRef<CAnnotdesc> desc(new CAnnotdesc()); desc->SetUser(obj); SetDesc().Set().push_back(desc);}END_objects_SCOPE // namespace ncbi::objects::END_NCBI_SCOPE/** ===========================================================================** $Log: Seq_annot.cpp,v $* Revision 1000.1 2004/06/01 19:33:13 gouriano* PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.6** Revision 1.6 2004/05/19 17:25:14 gorelenk* Added include of PCH - ncbi_pch.hpp** Revision 1.5 2004/04/22 13:09:31 dicuccio* Added helper functions to add specific kinds of descriptions: dates, user* objects. Added SetTitle() - should replace AddTitle() (LOG_POST warning in* place about deprecation)** Revision 1.4 2003/05/07 17:44:12 dicuccio* oops - make sure not to dereference end() of list in AddName()** Revision 1.3 2003/05/07 17:30:01 dicuccio* Fix potential coredump in CSeq_annot::AddName()** Revision 1.2 2003/05/07 13:08:09 dicuccio* Alternate implementation of SetTitle() - work-around for MSVC's broken* implementation of list::remove_if()** Revision 1.1 2003/05/07 10:57:29 clausen* Added AddName, AddTitle, AddComment*** ===========================================================================*//* Original file checksum: lines: 64, chars: 1875, CRC32: 377b3912 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -