initial load of upstream version 1.06.32
[xmlrpc-c] / src / cpp / env_wrap.hpp
1 #ifndef ENV_INT_HPP_INCLUDED
2 #define ENV_INT_HPP_INCLUDED
3
4 #include "xmlrpc-c/util.h"
5
6 namespace xmlrpc_c {
7
8 class env_wrap {
9 /*----------------------------------------------------------------------------
10    A wrapper to assist in using the Xmlrpc-c C libraries in
11    Xmlrpc-c C++ code.
12
13    To use the C libraries, you have to use type xmlrpc_env, but that type
14    does not have an automatic destructor (because it's C), so it's hard
15    to throw an error from a context in which a variable of that type
16    exists.  This wrapper provides that automatic destructor.
17 -----------------------------------------------------------------------------*/
18 public:
19     env_wrap();
20     ~env_wrap();
21     xmlrpc_env env_c;
22 };
23
24
25 } // namespace
26 #endif