aboutsummaryrefslogtreecommitdiff
path: root/src/XrmDatabaseHelper.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/XrmDatabaseHelper.hh')
-rw-r--r--src/XrmDatabaseHelper.hh34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/XrmDatabaseHelper.hh b/src/XrmDatabaseHelper.hh
index 404e8e8..22cad2c 100644
--- a/src/XrmDatabaseHelper.hh
+++ b/src/XrmDatabaseHelper.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: XrmDatabaseHelper.hh,v 1.5 2002/07/20 09:52:13 fluxgen Exp $ 22// $Id: XrmDatabaseHelper.hh,v 1.6 2002/12/01 13:42:06 rathnor Exp $
23 23
24// This is a helper for XrmDatabase 24// This is a helper for XrmDatabase
25// when database goes out of scope 25// when database goes out of scope
@@ -37,27 +37,27 @@
37class XrmDatabaseHelper 37class XrmDatabaseHelper
38{ 38{
39public: 39public:
40 XrmDatabaseHelper(char const * filename=0) 40 XrmDatabaseHelper(char const * filename=0)
41 : m_database(filename == 0 ? 0 : XrmGetFileDatabase(filename)) 41 : m_database(filename == 0 ? 0 : XrmGetFileDatabase(filename))
42 { } 42 { }
43 43
44 ~XrmDatabaseHelper() { 44 ~XrmDatabaseHelper() {
45 if (m_database!=0) 45 if (m_database!=0)
46 XrmDestroyDatabase(m_database); 46 XrmDestroyDatabase(m_database);
47 } 47 }
48 48
49 /// assignment operator 49 /// assignment operator
50 XrmDatabaseHelper& operator=(const XrmDatabase& database) { 50 XrmDatabaseHelper& operator=(const XrmDatabase& database) {
51 if (m_database!=0) 51 if (m_database!=0)
52 XrmDestroyDatabase(m_database); 52 XrmDestroyDatabase(m_database);
53 m_database = database; 53 m_database = database;
54 return *this; 54 return *this;
55 } 55 }
56 bool operator == (const XrmDatabase& database) { return m_database == database; } 56 bool operator == (const XrmDatabase& database) { return m_database == database; }
57 XrmDatabase & operator*(void) { return m_database; } 57 XrmDatabase & operator*(void) { return m_database; }
58 58
59private: 59private:
60 XrmDatabase m_database; 60 XrmDatabase m_database;
61}; 61};
62 62
63#endif //_XRMDATABASEHELPER_HH_ 63#endif //_XRMDATABASEHELPER_HH_