* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
[svn.git] / subversion / bindings / javahl / native / JNIStringHolder.h
blob4fd20bb27936713419023bae15fb3cc1033f3533
1 /**
2 * @copyright
3 * ====================================================================
4 * Copyright (c) 2003-2004 CollabNet. All rights reserved.
6 * This software is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at http://subversion.tigris.org/license-1.html.
9 * If newer versions of this license are posted there, you may use a
10 * newer version instead, at your option.
12 * This software consists of voluntary contributions made by many
13 * individuals. For exact contribution history, see the revision
14 * history and logs, available at http://subversion.tigris.org/.
15 * ====================================================================
16 * @endcopyright
18 * @file JNIStringHolder.h
19 * @brief Interface of the class JNIStringHolder
22 #ifndef JNISTRINGHOLDER_H
23 #define JNISTRINGHOLDER_H
25 #include <jni.h>
26 #include <apr_pools.h>
28 class JNIStringHolder
30 public:
31 JNIStringHolder(jstring jtext);
32 ~JNIStringHolder();
33 operator const char *() { return m_str; }
34 const char *pstrdup(apr_pool_t *pool);
36 protected:
37 const char *m_str;
38 JNIEnv *m_env;
39 jstring m_jtext;
42 #endif // JNISTRINGHOLDER_H