NCBI C++ ToolKit
reader_pubseq2.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

00001 /*  $Id: reader_pubseq2.cpp 63643 2014-07-16 16:44:20Z vasilche $
00002 * ===========================================================================
00003 *                            PUBLIC DOMAIN NOTICE
00004 *               National Center for Biotechnology Information
00005 *
00006 *  This software/database is a "United States Government Work" under the
00007 *  terms of the United States Copyright Act.  It was written as part of
00008 *  the author's official duties as a United States Government employee and
00009 *  thus cannot be copyrighted.  This software/database is freely available
00010 *  to the public for use. The National Library of Medicine and the U.S.
00011 *  Government have not placed any restriction on its use or reproduction.
00012 *
00013 *  Although all reasonable efforts have been taken to ensure the accuracy
00014 *  and reliability of the software and data, the NLM and the U.S.
00015 *  Government do not and cannot warrant the performance or results that
00016 *  may be obtained by using this software or data. The NLM and the U.S.
00017 *  Government disclaim all warranties, express or implied, including
00018 *  warranties of performance, merchantability or fitness for any particular
00019 *  purpose.
00020 *
00021 *  Please cite the author in any work or product based on this material.
00022 * ===========================================================================
00023 *
00024 *  Author:  Eugene Vasilchenko
00025 *
00026 *  File Description: ID2 Data reader via PubSeqOS
00027 *
00028 */
00029 
00030 #include <ncbi_pch.hpp>
00031 #include <corelib/ncbi_param.hpp>
00032 #include <objtools/data_loaders/genbank/pubseq2/reader_pubseq2.hpp>
00033 #include <objtools/data_loaders/genbank/pubseq2/reader_pubseq2_entry.hpp>
00034 #include <objtools/data_loaders/genbank/pubseq2/reader_pubseq2_params.h>
00035 #include <objtools/data_loaders/genbank/readers.hpp> // for entry point
00036 #include <objtools/data_loaders/genbank/impl/request_result.hpp>
00037 #include <objtools/data_loaders/genbank/impl/dispatcher.hpp>
00038 #include <objtools/error_codes.hpp>
00039 
00040 #include <objmgr/objmgr_exception.hpp>
00041 #include <objmgr/impl/tse_info.hpp>
00042 
00043 #include <dbapi/driver/exception.hpp>
00044 #include <dbapi/driver/driver_mgr.hpp>
00045 #include <dbapi/driver/drivers.hpp>
00046 #include <dbapi/driver/dbapi_svc_mapper.hpp>
00047 
00048 #include <objects/seqloc/Seq_id.hpp>
00049 #include <objects/seqset/Seq_entry.hpp>
00050 
00051 #include <corelib/ncbicntr.hpp>
00052 #include <corelib/plugin_manager_impl.hpp>
00053 #include <corelib/plugin_manager_store.hpp>
00054 #include <corelib/rwstream.hpp>
00055 
00056 #include <serial/objistrasnb.hpp>
00057 #include <serial/serial.hpp>
00058 
00059 #include <objects/id2/id2__.hpp>
00060 
00061 #define BINARY_REQUESTS     1
00062 #define LONG_REQUESTS       1
00063 
00064 #if BINARY_REQUESTS
00065 # include <serial/objostrasnb.hpp>
00066 #define CRequestSerializer CObjectOStreamAsnBinary
00067 #else
00068 # include <serial/objostrasn.hpp>
00069 #define CRequestSerializer CObjectOStreamAsn
00070 #endif
00071 #if LONG_REQUESTS
00072 # define MAX_ASN_IN          (20*1024)
00073 #else
00074 # define MAX_ASN_IN          255
00075 #endif
00076 
00077 #define DEFAULT_DB_SERVER   "PUBSEQ_OS_PUBLIC"
00078 #define DEFAULT_DB_USER     "anyone"
00079 #define DEFAULT_DB_PASSWORD "allowed"
00080 #define DEFAULT_DB_DRIVER   "ftds;ctlib"
00081 #define DEFAULT_NUM_CONN    2
00082 #define MAX_MT_CONN         5
00083 #define DEFAULT_EXCL_WGS_MASTER false
00084 
00085 #define NCBI_USE_ERRCODE_X   Objtools_Rd_Pubseq2
00086 
00087 BEGIN_NCBI_SCOPE
00088 BEGIN_SCOPE(objects)
00089 
00090 #if !defined(HAVE_SYBASE_REENTRANT) && defined(NCBI_THREADS)
00091 // we have non MT-safe library used in MT application
00092 static CAtomicCounter s_pubseq_readers;
00093 #endif
00094 
00095 
00096 CPubseq2Reader::CPubseq2Reader(int max_connections,
00097                                const string& server,
00098                                const string& user,
00099                                const string& pswd,
00100                                const string& dbapi_driver)
00101     : m_Server(server) , m_User(user), m_Password(pswd),
00102       m_DbapiDriver(dbapi_driver),
00103       m_Context(0),
00104       m_ExclWGSMaster(DEFAULT_EXCL_WGS_MASTER)
00105 {
00106     if ( m_Server.empty() ) {
00107         m_Server = DEFAULT_DB_SERVER;
00108     }
00109     if ( m_User.empty() ) {
00110         m_User = DEFAULT_DB_USER;
00111     }
00112     if ( m_Password.empty() ) {
00113         m_Password = DEFAULT_DB_PASSWORD;
00114     }
00115     if ( m_DbapiDriver.empty() ) {
00116         m_DbapiDriver = DEFAULT_DB_DRIVER;
00117     }
00118 
00119 #if defined(NCBI_THREADS) && !defined(HAVE_SYBASE_REENTRANT)
00120     if ( s_pubseq_readers.Add(1) > 1 ) {
00121         s_pubseq_readers.Add(-1);
00122         NCBI_THROW(CLoaderException, eNoConnection,
00123                    "Attempt to open multiple pubseq_readers "
00124                    "without MT-safe DB library");
00125     }
00126 #endif
00127     SetMaximumConnections(max_connections, DEFAULT_NUM_CONN);
00128 }
00129 
00130 
00131 CPubseq2Reader::CPubseq2Reader(const TPluginManagerParamTree* params,
00132                              const string& driver_name)
00133     : m_Context(0),
00134       m_ExclWGSMaster(DEFAULT_EXCL_WGS_MASTER)
00135 {
00136     CConfig conf(params);
00137     m_Server = conf.GetString(
00138         driver_name,
00139         NCBI_GBLOADER_READER_PUBSEQ2_PARAM_SERVER,
00140         CConfig::eErr_NoThrow,
00141         DEFAULT_DB_SERVER);
00142     m_User = conf.GetString(
00143         driver_name,
00144         NCBI_GBLOADER_READER_PUBSEQ2_PARAM_USER,
00145         CConfig::eErr_NoThrow,
00146         DEFAULT_DB_USER);
00147     m_Password = conf.GetString(
00148         driver_name,
00149         NCBI_GBLOADER_READER_PUBSEQ2_PARAM_PASSWORD,
00150         CConfig::eErr_NoThrow,
00151         DEFAULT_DB_PASSWORD);
00152     m_DbapiDriver = conf.GetString(
00153         driver_name,
00154         NCBI_GBLOADER_READER_PUBSEQ2_PARAM_DRIVER,
00155         CConfig::eErr_NoThrow,
00156         DEFAULT_DB_DRIVER);
00157 #if defined(NCBI_THREADS) && !defined(HAVE_SYBASE_REENTRANT)
00158     if ( s_pubseq_readers.Add(1) > 1 ) {
00159         s_pubseq_readers.Add(-1);
00160         NCBI_THROW(CLoaderException, eNoConnection,
00161                    "Attempt to open multiple pubseq_readers "
00162                    "without MT-safe DB library");
00163     }
00164 #endif
00165     m_ExclWGSMaster = conf.GetBool(
00166         driver_name,
00167         NCBI_GBLOADER_READER_PUBSEQ2_PARAM_EXCL_WGS_MASTER,
00168         CConfig::eErr_NoThrow,
00169         DEFAULT_EXCL_WGS_MASTER);
00170 
00171     CReader::InitParams(conf, driver_name, DEFAULT_NUM_CONN);
00172 }
00173 
00174 
00175 CPubseq2Reader::~CPubseq2Reader()
00176 {
00177 #if !defined(HAVE_SYBASE_REENTRANT) && defined(NCBI_THREADS)
00178     s_pubseq_readers.Add(-1);
00179 #endif
00180 }
00181 
00182 
00183 int CPubseq2Reader::GetMaximumConnectionsLimit(void) const
00184 {
00185 #if defined(HAVE_SYBASE_REENTRANT) && defined(NCBI_THREADS)
00186     return MAX_MT_CONN;
00187 #else
00188     return 1;
00189 #endif
00190 }
00191 
00192 
00193 void CPubseq2Reader::x_AddConnectionSlot(TConn conn)
00194 {
00195     _ASSERT(!m_Connections.count(conn));
00196     m_Connections[conn];
00197 }
00198 
00199 
00200 void CPubseq2Reader::x_RemoveConnectionSlot(TConn conn)
00201 {
00202     _VERIFY(m_Connections.erase(conn));
00203 }
00204 
00205 
00206 void CPubseq2Reader::x_DisconnectAtSlot(TConn conn, bool failed)
00207 {
00208     _ASSERT(m_Connections.count(conn));
00209     SConnection& c = m_Connections[conn];
00210     if ( c.m_Connection ) {
00211         LOG_POST_X(1, Warning << "CPubseq2Reader("<<conn<<"): PubSeqOS2"
00212                    " GenBank connection "<<(failed? "failed": "too old")<<
00213                    ": reconnecting...");
00214         c.m_Result.reset();
00215         c.m_Connection.reset();
00216     }
00217 }
00218 
00219 
00220 string CPubseq2Reader::x_ConnDescription(TConn conn) const
00221 {
00222     return "";
00223 }
00224 
00225 
00226 CDB_Connection& CPubseq2Reader::x_GetConnection(TConn conn)
00227 {
00228     _ASSERT(m_Connections.count(conn));
00229     SConnection& c = m_Connections[conn];
00230     if ( c.m_Connection.get() ) {
00231         c.m_Result.reset();
00232         return *c.m_Connection;
00233     }
00234     OpenConnection(conn);
00235     SConnection& c2 = m_Connections[conn];
00236     c2.m_Result.reset();
00237     return *c2.m_Connection;
00238 }
00239 
00240 
00241 CObjectIStream& CPubseq2Reader::x_GetCurrentResult(TConn conn)
00242 {
00243     _ASSERT(m_Connections.count(conn));
00244     TConnections::iterator iter = m_Connections.find(conn);
00245     if ( iter == m_Connections.end() || !iter->second.m_Result ) {
00246         NCBI_THROW(CLoaderException, eOtherError,
00247                    "CPubseq2Reader: no active command");
00248     }
00249     return *iter->second.m_Result;
00250 }
00251 
00252 
00253 void CPubseq2Reader::x_SetCurrentResult(TConn conn,
00254                                         AutoPtr<CObjectIStream> result)
00255 {
00256     _ASSERT(m_Connections.count(conn));
00257     TConnections::iterator iter = m_Connections.find(conn);
00258     if ( iter == m_Connections.end() ) {
00259         NCBI_THROW(CLoaderException, eOtherError,
00260                    "CPubseq2Reader: no active connection");
00261     }
00262     iter->second.m_Result = result;
00263 }
00264 
00265 
00266 namespace {
00267     class CPubseq2Validator : public IConnValidator
00268     {
00269     public:
00270         typedef CPubseq2Reader::TConn TConn;
00271 
00272         CPubseq2Validator(CPubseq2Reader* reader,
00273                           TConn conn,
00274                           bool excl_wgs_master)
00275             : m_Reader(reader),
00276               m_Conn(conn),
00277               m_ExclWGSMaster(excl_wgs_master)
00278             {
00279             }
00280         
00281         virtual EConnStatus Validate(CDB_Connection& conn) {
00282             if ( m_ExclWGSMaster ) {
00283                 AutoPtr<CDB_LangCmd> cmd
00284                     (conn.LangCmd("set exclude_wgs_master on"));
00285                 cmd->Send();
00286                 cmd->DumpResults();
00287             }
00288             m_Reader->x_InitConnection(conn, m_Conn);
00289             return eValidConn;
00290         }
00291 
00292         virtual string GetName(void) const {
00293             return "CPubseq2Validator";
00294         }
00295 
00296     private:
00297         CPubseq2Reader* m_Reader;
00298         TConn m_Conn;
00299         bool m_ExclWGSMaster;
00300     };
00301     
00302     bool sx_FetchNextItem(CDB_Result& result, const CTempString& name)
00303     {
00304         while ( result.Fetch() ) {
00305             for ( unsigned pos = 0; pos < result.NofItems(); ++pos ) {
00306                 if ( result.ItemName(pos) == name ) {
00307                     return true;
00308                 }
00309                 result.SkipItem();
00310             }
00311         }
00312         return false;
00313     }
00314     
00315     class CDB_Result_Reader : public CObject, public IReader
00316     {
00317     public:
00318         CDB_Result_Reader(AutoPtr<CDB_RPCCmd> cmd,
00319                           AutoPtr<CDB_Result> db_result)
00320             : m_DB_RPCCmd(cmd), m_DB_Result(db_result)
00321             {
00322             }
00323 
00324         ERW_Result Read(void*   buf,
00325                         size_t  count,
00326                         size_t* bytes_read)
00327             {
00328                 if ( !count ) {
00329                     if ( bytes_read ) {
00330                         *bytes_read = 0;
00331                     }
00332                     return eRW_Success;
00333                 }
00334                 size_t ret;
00335                 while ( (ret = m_DB_Result->ReadItem(buf, count)) == 0 ) {
00336                     if ( !sx_FetchNextItem(*m_DB_Result, "asnout") ) {
00337                         m_DB_RPCCmd->DumpResults();
00338                         break;
00339                     }
00340                 }
00341                 if ( bytes_read ) {
00342                     *bytes_read = ret;
00343                 }
00344                 return ret? eRW_Success: eRW_Eof;
00345             }
00346         ERW_Result PendingCount(size_t* /*count*/)
00347             {
00348                 return eRW_NotImplemented;
00349             }
00350 
00351     private:
00352         AutoPtr<CDB_RPCCmd> m_DB_RPCCmd;
00353         AutoPtr<CDB_Result> m_DB_Result;
00354     };
00355 }
00356 
00357 
00358 void CPubseq2Reader::x_ConnectAtSlot(TConn conn_)
00359 {
00360     if ( !m_Context ) {
00361         DBLB_INSTALL_DEFAULT();
00362         C_DriverMgr drvMgr;
00363         map<string,string> args;
00364         args["packet"]="3584"; // 7*512
00365         args["version"]="125"; // for correct connection to OpenServer
00366         vector<string> driver_list;
00367         NStr::Tokenize(m_DbapiDriver, ";", driver_list);
00368         size_t driver_count = driver_list.size();
00369         vector<string> errmsg(driver_count);
00370         for ( size_t i = 0; i < driver_count; ++i ) {
00371             try {
00372                 m_Context = drvMgr.GetDriverContext(driver_list[i],
00373                                                     &errmsg[i], &args);
00374                 if ( m_Context )
00375                     break;
00376             }
00377             catch ( CException& exc ) {
00378                 errmsg[i] = exc.what();
00379             }
00380         }
00381         if ( !m_Context ) {
00382             for ( size_t i = 0; i < driver_count; ++i ) {
00383                 LOG_POST_X(2, "Failed to create dbapi context with driver '"
00384                            <<driver_list[i]<<"': "<<errmsg[i]);
00385             }
00386             NCBI_THROW(CLoaderException, eNoConnection,
00387                        "Cannot create dbapi context with driver '"+
00388                        m_DbapiDriver+"'");
00389         }
00390 
00391         m_Context->SetTimeout(20);
00392     }
00393 
00394     CPubseq2Validator validator(this, conn_, m_ExclWGSMaster);
00395     AutoPtr<CDB_Connection> conn
00396         (m_Context->ConnectValidated(m_Server, m_User, m_Password, validator));
00397     
00398     if ( !conn.get() ) {
00399         NCBI_THROW(CLoaderException, eConnectionFailed, "connection failed");
00400     }
00401 
00402     if ( GetDebugLevel() >= 2 ) {
00403         NcbiCout << "CPubseq2Reader::Connected to " << conn->ServerName()
00404                  << NcbiEndl;
00405     }
00406 
00407     m_Connections[conn_].m_Connection.reset(conn.release());
00408 }
00409 
00410 
00411 void CPubseq2Reader::x_InitConnection(CDB_Connection& db_conn, TConn conn)
00412 {
00413     // prepare init request
00414     CID2_Request req;
00415     req.SetRequest().SetInit();
00416     x_SetContextData(req);
00417     CID2_Request_Packet packet;
00418     packet.Set().push_back(Ref(&req));
00419     // that's it for now
00420     // TODO: add params
00421 
00422     AutoPtr<CObjectIStream> result;
00423     // send init request
00424     {{
00425         if ( GetDebugLevel() >= eTraceConn ) {
00426             CDebugPrinter s(conn, "CPubseq2Reader");
00427             s << "Sending";
00428             if ( GetDebugLevel() >= eTraceASN ) {
00429                 s << ": " << MSerial_AsnText << packet;
00430             }
00431             else {
00432                 s << " ID2-Request-Packet";
00433             }
00434             s << "...";
00435         }
00436         try {
00437             result = x_SendPacket(db_conn, conn, packet);
00438         }
00439         catch ( CException& exc ) {
00440             NCBI_RETHROW(exc, CLoaderException, eConnectionFailed,
00441                          "failed to send init request");
00442         }
00443         if ( GetDebugLevel() >= eTraceConn ) {
00444             CDebugPrinter s(conn, "CPubseq2Reader");
00445             s << "Sent ID2-Request-Packet.";
00446         }
00447     }}
00448     
00449     // receive init reply
00450     CID2_Reply reply;
00451     {{
00452         if ( GetDebugLevel() >= eTraceConn ) {
00453             CDebugPrinter s(conn, "CPubseq2Reader");
00454             s << "Receiving ID2-Reply...";
00455         }
00456         CId2ReaderBase::x_ReceiveReply(*result, conn, reply);
00457         if ( GetDebugLevel() >= eTraceConn   ) {
00458             CDebugPrinter s(conn, "CPubseq2Reader");
00459             s << "Received";
00460             if ( GetDebugLevel() >= eTraceASN ) {
00461                 s << ": " << MSerial_AsnText << reply;
00462             }
00463             else {
00464                 s << " ID2-Reply.";
00465             }
00466         }
00467     }}
00468 
00469     // check init reply
00470     if ( reply.IsSetDiscard() ) {
00471         NCBI_THROW(CLoaderException, eLoaderFailed,
00472                    "bad init reply: 'discard' is set");
00473     }
00474     if ( reply.IsSetError() ) {
00475         NCBI_THROW(CLoaderException, eLoaderFailed,
00476                    "bad init reply: 'error' is set");
00477     }
00478     if ( !reply.IsSetEnd_of_reply() ) {
00479         NCBI_THROW(CLoaderException, eLoaderFailed,
00480                    "bad init reply: 'end-of-reply' is not set");
00481     }
00482     if ( reply.GetReply().Which() != CID2_Reply::TReply::e_Init ) {
00483         NCBI_THROW(CLoaderException, eLoaderFailed,
00484                    "bad init reply: 'reply' is not 'init'");
00485     }
00486     if ( result->HaveMoreData() ) {
00487         ERR_POST_X(1, "More data in reply");
00488     }
00489     // that's it for now
00490     // TODO: process params
00491 }
00492 
00493 
00494 void CPubseq2Reader::x_SendPacket(TConn conn,
00495                                   const CID2_Request_Packet& packet)
00496 {
00497     x_SetCurrentResult(conn,
00498                        x_SendPacket(x_GetConnection(conn), conn, packet));
00499 }
00500 
00501 
00502 void CPubseq2Reader::x_ReceiveReply(TConn conn,
00503                                     CID2_Reply& reply)
00504 {
00505     CId2ReaderBase::x_ReceiveReply(x_GetCurrentResult(conn), conn, reply);
00506 }
00507 
00508 
00509 void CPubseq2Reader::x_EndOfPacket(TConn conn)
00510 {
00511     CObjectIStream& stream = x_GetCurrentResult(conn);
00512     if ( stream.HaveMoreData() ) {
00513         ERR_POST_X(4, "CPubseq2Reader: extra blob data");
00514     }
00515     x_SetCurrentResult(conn, 0);
00516 }
00517 
00518 
00519 AutoPtr<CObjectIStream>
00520 CPubseq2Reader::x_SendPacket(CDB_Connection& db_conn,
00521                              TConn conn,
00522                              const CID2_Request_Packet& packet)
00523 {
00524     char buffer[MAX_ASN_IN];
00525     size_t size;
00526     {{
00527         // NOT CNcbiOstrstream, because that can be ostringstream, which
00528         // doesn't support setting up a fixed-length buffer in this manner.
00529         ostrstream mem_str(buffer, sizeof(buffer));
00530         {{
00531             CRequestSerializer obj_str(mem_str);
00532             obj_str << packet;
00533         }}
00534         if ( !mem_str ) {
00535             NCBI_THROW(CLoaderException, eOtherError,
00536                        "CPubseq2Reader: packet size overflow");
00537         }
00538         size = mem_str.pcount();
00539     }}
00540     CDB_VarChar service("ID2");
00541     CDB_VarChar short_asn;
00542     CDB_LongBinary long_asn(size);
00543     if ( LONG_REQUESTS ) {
00544         long_asn.SetValue(buffer, size);
00545     }
00546     else {
00547         short_asn.SetValue(buffer, size);
00548     }
00549     CDB_TinyInt text_in(!BINARY_REQUESTS);
00550     CDB_TinyInt text_out(0);
00551     
00552     AutoPtr<CDB_RPCCmd> cmd(db_conn.RPC("os_asn_request"));
00553     cmd->SetParam("@service", &service);
00554     cmd->SetParam("@asnin", &short_asn);
00555     cmd->SetParam("@text", &text_in);
00556     cmd->SetParam("@out_text", &text_out);
00557     cmd->SetParam("@asnin_long", &long_asn);
00558     cmd->Send();
00559 
00560     AutoPtr<CDB_Result> dbr;
00561     while( cmd->HasMoreResults() ) {
00562         if ( cmd->HasFailed() ) {
00563             NCBI_THROW(CLoaderException, eOtherError,
00564                        "CPubseq2Reader: failed RPC");
00565         }
00566         dbr = cmd->Result();
00567         if ( !dbr.get() ) {
00568             continue;
00569         }
00570         
00571         if ( dbr->ResultType() != eDB_RowResult ) {
00572             while ( dbr->Fetch() )
00573                 ;
00574             continue;
00575         }
00576         if ( sx_FetchNextItem(*dbr, "asnout") ) {
00577             AutoPtr<CDB_Result_Reader> reader
00578                 (new CDB_Result_Reader(cmd, dbr));
00579             AutoPtr<CRStream> stream
00580                 (new CRStream(reader.release(), 0, 0, CRWStreambuf::fOwnAll));
00581             AutoPtr<CObjectIStream> obj_str
00582                 (new CObjectIStreamAsnBinary(*stream.release(), eTakeOwnership));
00583             return obj_str;
00584         }
00585     }
00586     NCBI_THROW(CLoaderException, eOtherError,
00587                "CPubseq2Reader: no more results");
00588 }
00589 
00590 
00591 END_SCOPE(objects)
00592 
00593 void GenBankReaders_Register_Pubseq2(void)
00594 {
00595     RegisterEntryPoint<objects::CReader>(NCBI_EntryPoint_ReaderPubseqos2);
00596 }
00597 
00598 
00599 /// Class factory for Pubseq reader
00600 ///
00601 /// @internal
00602 ///
00603 class CPubseq2ReaderCF : 
00604     public CSimpleClassFactoryImpl<objects::CReader,
00605                                    objects::CPubseq2Reader>
00606 {
00607 public:
00608     typedef CSimpleClassFactoryImpl<objects::CReader,
00609                                     objects::CPubseq2Reader> TParent;
00610 public:
00611     CPubseq2ReaderCF()
00612         : TParent(NCBI_GBLOADER_READER_PUBSEQ2_DRIVER_NAME, 0) {}
00613 
00614     ~CPubseq2ReaderCF() {}
00615 
00616     objects::CReader* 
00617     CreateInstance(const string& driver  = kEmptyStr,
00618                    CVersionInfo version =
00619                    NCBI_INTERFACE_VERSION(objects::CReader),
00620                    const TPluginManagerParamTree* params = 0) const
00621     {
00622         objects::CReader* drv = 0;
00623         if ( !driver.empty()  &&  driver != m_DriverName ) {
00624             return 0;
00625         }
00626         if (version.Match(NCBI_INTERFACE_VERSION(objects::CReader)) 
00627                             != CVersionInfo::eNonCompatible) {
00628             drv = new objects::CPubseq2Reader(params, driver);
00629         }
00630         return drv;
00631     }
00632 };
00633 
00634 
00635 void NCBI_EntryPoint_ReaderPubseqos2(
00636      CPluginManager<objects::CReader>::TDriverInfoList&   info_list,
00637      CPluginManager<objects::CReader>::EEntryPointRequest method)
00638 {
00639     CHostEntryPointImpl<CPubseq2ReaderCF>::
00640         NCBI_EntryPointImpl(info_list, method);
00641 }
00642 
00643 
00644 void NCBI_EntryPoint_xreader_pubseqos2(
00645      CPluginManager<objects::CReader>::TDriverInfoList&   info_list,
00646      CPluginManager<objects::CReader>::EEntryPointRequest method)
00647 {
00648     NCBI_EntryPoint_ReaderPubseqos2(info_list, method);
00649 }
00650 
00651 
00652 END_NCBI_SCOPE
Modified on Sun Dec 28 12:10:07 2014 by modify_doxy.py rev. 426318