NCBI C++ ToolKit
ensure_enough_corelib.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef ENSURE_ENOUGH_CORELIB__HPP
2 #define ENSURE_ENOUGH_CORELIB__HPP
3 
4 /* $Id: ensure_enough_corelib.hpp 100964 2023-10-05 15:37:09Z ucko $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Aaron Ucko
30  *
31  */
32 
33 /// @file ensure_enough_corelib.hpp
34 /// Ensure direct dependencies on enough of the core xncbi library to
35 /// satisfy shared libraries that depend on it. (In particular, affected
36 /// tests otherwise fail to start when built with Apple Developer Tools 15
37 /// using mostly static libraries.)
38 
39 #if defined(NCBI_APP_BUILT_AS) && !defined(BLAST_SECONDARY_SOURCE)
40 
41 #include <corelib/ncbi_cookies.hpp>
42 #include <corelib/ncbi_message.hpp>
46 
48 
50 
51 void BLAST_Test_EnsureEnoughCorelib(void)
52 {
53  class CFakeDataLoaderFactory : public objects::CDataLoaderFactory
54  {
55  public:
57  protected:
58  objects::CDataLoader* CreateAndRegister(objects::CObjectManager&,
60  const
61  { return nullptr; }
62  };
63 
64  CConfig empty_config((CMemoryRegistry()));
65  CEndpointKey fake_endpoint("1.2.3.4:5", 0);
66  CFakeDataLoaderFactory fake_dl_factory;
67  CHttpCookie empty_cookie;
68  CMessage_Basic empty_message(kEmptyStr, eDiag_Trace);
69  CPluginManager_DllResolver dummy_resolver;
71  CRWStreambuf detached_buf;
72 }
73 
75 
76 #endif /* NCBI_APP_BUILT_AS && !BLAST_SECONDARY_SOURCE */
77 
78 #endif /* ENSURE_ENOUGH_CORELIB__HPP */
Lightweight representation of just a host and a port.
CDataLoader * CreateAndRegister(CObjectManager &, const TPluginManagerParamTree *) const
CHttpCookie::
CMemoryRegistry –.
Definition: ncbireg.hpp:584
Default IMessage implementation: text and severity only.
static SSystemFastMutex & GetMutex(void)
Service class for DLLs resolution.
Reader-writer-based stream buffer.
Definition: rwstreambuf.hpp:60
definition of a Culling tree
Definition: ncbi_tree.hpp:100
@ eDiag_Trace
Trace message.
Definition: ncbidiag.hpp:657
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define kEmptyStr
Definition: ncbistr.hpp:123
IMessage/IMessageListener interfaces and basic implementations.
Reader-writer-based stream buffer.
Modified on Tue Feb 27 05:55:00 2024 by modify_doxy.py rev. 669887