Qpid .NET Messaging API  0.22
FailoverUpdates.h
Go to the documentation of this file.
00001 /*
00002 * Licensed to the Apache Software Foundation (ASF) under one
00003 * or more contributor license agreements.  See the NOTICE file
00004 * distributed with this work for additional information
00005 * regarding copyright ownership.  The ASF licenses this file
00006 * to you under the Apache License, Version 2.0 (the
00007 * "License"); you may not use this file except in compliance
00008 * with the License.  You may obtain a copy of the License at
00009 *
00010 *   http://www.apache.org/licenses/LICENSE-2.0
00011 *
00012 * Unless required by applicable law or agreed to in writing,
00013 * software distributed under the License is distributed on an
00014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00015 * KIND, either express or implied.  See the License for the
00016 * specific language governing permissions and limitations
00017 * under the License.
00018 */
00019 
00020 #pragma once
00021 
00022 #include <windows.h>
00023 #include <msclr\lock.h>
00024 #include <oletx2xa.h>
00025 #include <string>
00026 #include <limits>
00027 
00028 namespace Org {
00029 namespace Apache {
00030 namespace Qpid {
00031 namespace Messaging {
00032 
00036 
00037     ref class Connection;
00038 
00039     public ref class FailoverUpdates
00040     {
00041     private:
00042         // The kept object in the Messaging C++ DLL
00043         ::qpid::messaging::FailoverUpdates * nativeObjPtr;
00044 
00045         // per-instance lock object
00046         System::Object ^ privateLock;
00047 
00048         // Disallow use after object is destroyed
00049         void ThrowIfDisposed();
00050 
00051     public:
00052         FailoverUpdates(Connection ^ connection);
00053 
00054         ~FailoverUpdates();
00055         !FailoverUpdates();
00056 
00057         //
00058         // IsDisposed
00059         //
00060         property bool IsDisposed
00061         {
00062             bool get()
00063             {
00064                 return NULL == nativeObjPtr;
00065             }
00066         }
00067 
00068     private:
00069         // unmanaged clone
00070         // not defined
00071 
00072         // copy constructor
00073         FailoverUpdates(const FailoverUpdates ^ failoverUpdates) {}
00074         FailoverUpdates(const FailoverUpdates % failoverUpdates) {}
00075 
00076         // assignment operator
00077         FailoverUpdates % operator=(const FailoverUpdates % rhs)
00078         {
00079             return *this;
00080         }
00081     };
00082 }}}}