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

Go to the SVN repository for this file.

1 /* $Id: document_proxy.hpp 89002 2020-02-11 15:01:11Z ucko $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Denis Vakatov, NCBI
27  *
28  */
29 
30 
31 /** @file
32  * XML document proxy for XSLT apply(...) methods
33 **/
34 
35 #ifndef _xmlwrapp_document_proxy_hpp_
36 #define _xmlwrapp_document_proxy_hpp_
37 
38 // for compiler versions defines
39 #include <ncbiconf.h>
40 
41 // xmlwrapp includes
42 #include <misc/xmlwrapp/errors.hpp>
43 
44 
45 namespace xslt {
46  class stylesheet;
47 }
48 
49 namespace xml {
50 
51 
52 /**
53  * The xml::document_proxy class to be a relay between XSLT results and the
54  * document. See CXX-2458
55 **/
57 {
58 public:
59  ~document_proxy ();
60 
61  document_proxy (document_proxy && other);
63 
64 // Some compilers (GCC 4.4.2 and up) are clever enough to avoid using the
65 // copy constructor, so for those compilers it is private.
66 // MSVC behaves different depending on a case. E.g. in case of the '?'
67 // operator MSVC needs a copy constructor.
68 #if defined(NCBI_COMPILER_GCC) || defined(NCBI_COMPILER_ANY_CLANG)
69 private:
70 #else
71 public:
72 #endif
73  document_proxy (const document_proxy & other);
74 
75 private:
76  /* Internal library use only */
77  document_proxy (void * result, void * ssheet);
78 
79 private:
80  /* xml::document can grab the ownership */
81  void release (void) const;
82 
83  mutable bool owner_;
84  void * result_;
85  void * style_sheet_;
86 
87  friend class document;
88  friend class xslt::stylesheet;
89 
91 };
92 
93 } // xml namespace
94 
95 #endif
96 
The xml::document_proxy class to be a relay between XSLT results and the document.
void release(void) const
document_proxy & operator=(document_proxy &&other)
document_proxy(document_proxy &&other)
The xml::document class is used to hold the XML tree and various bits of information about it.
Definition: document.hpp:80
The xslt::stylesheet class is used to hold information about an XSLT stylesheet.
Definition: stylesheet.hpp:130
Various XML parser's and validator's errors related code for XmlWrapp.
XML library namespace.
Definition: attributes.hpp:57
XML library namespace.
Front end for a platform-specific configuration summary.
else result
Definition: token2.c:20
Modified on Sat Jun 22 10:38:54 2024 by modify_doxy.py rev. 669887