diff options
Diffstat (limited to 'cpp/demo/Database/Oracle/proc/CurrentSqlContext.h')
-rw-r--r-- | cpp/demo/Database/Oracle/proc/CurrentSqlContext.h | 44 |
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 |