initial load of upstream version 1.06.32
[xmlrpc-c] / src / cpp / env_wrap.hpp
diff --git a/src/cpp/env_wrap.hpp b/src/cpp/env_wrap.hpp
new file mode 100644 (file)
index 0000000..0172f2b
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef ENV_INT_HPP_INCLUDED
+#define ENV_INT_HPP_INCLUDED
+
+#include "xmlrpc-c/util.h"
+
+namespace xmlrpc_c {
+
+class env_wrap {
+/*----------------------------------------------------------------------------
+   A wrapper to assist in using the Xmlrpc-c C libraries in
+   Xmlrpc-c C++ code.
+
+   To use the C libraries, you have to use type xmlrpc_env, but that type
+   does not have an automatic destructor (because it's C), so it's hard
+   to throw an error from a context in which a variable of that type
+   exists.  This wrapper provides that automatic destructor.
+-----------------------------------------------------------------------------*/
+public:
+    env_wrap();
+    ~env_wrap();
+    xmlrpc_env env_c;
+};
+
+
+} // namespace
+#endif