summaryrefslogtreecommitdiff
path: root/cpp/demo/Database/Oracle/proc/CurrentSqlContext.h
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2006-08-10 18:36:30 +0000
committerBernard Normier <bernard@zeroc.com>2006-08-10 18:36:30 +0000
commit667420c66b32e2200fd15c57e108a35d40499d48 (patch)
tree11c38ec276c28932ce631189954d25472031a2cc /cpp/demo/Database/Oracle/proc/CurrentSqlContext.h
parentremove redundant batch labels (diff)
downloadice-667420c66b32e2200fd15c57e108a35d40499d48.tar.bz2
ice-667420c66b32e2200fd15c57e108a35d40499d48.tar.xz
ice-667420c66b32e2200fd15c57e108a35d40499d48.zip
Oracle Pro*C demo
Diffstat (limited to 'cpp/demo/Database/Oracle/proc/CurrentSqlContext.h')
-rw-r--r--cpp/demo/Database/Oracle/proc/CurrentSqlContext.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/cpp/demo/Database/Oracle/proc/CurrentSqlContext.h b/cpp/demo/Database/Oracle/proc/CurrentSqlContext.h
new file mode 100644
index 00000000000..acc8bfe58d7
--- /dev/null
+++ b/cpp/demo/Database/Oracle/proc/CurrentSqlContext.h
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef CURRENT_SQL_CONTEXT_H
+#define CURRENT_SQL_CONTEXT_H
+
+#include <Ice/Ice.h>
+
+//
+// Provides a sql_context for each thread created by the communicator(s)
+// using the associated thread-notification object
+//
+
+//
+// Note: sql_context is defined in Pro*C -generated code, so this
+// header can only be included in .pc files.
+//
+
+class CurrentSqlContext
+{
+public:
+
+ CurrentSqlContext(const std::string&);
+
+ //
+ // Default copy ctor and assignment operator ok
+ //
+
+ Ice::ThreadNotificationPtr getHook() const;
+ operator sql_context() const;
+
+private:
+ const std::string _connectInfo;
+ size_t _index;
+ Ice::ThreadNotificationPtr _hook;
+};
+
+#endif