Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

acsexmplCallbacks.h

Go to the documentation of this file.
00001 #ifndef acsexmplCallbacks_h
00002 #define acsexmplCallbacks_h
00003 /*******************************************************************************
00004 * ALMA - Atacama Large Millimiter Array
00005 * (c) Associated Universities Inc., 2004 
00006 *
00007 *This library is free software; you can redistribute it and/or
00008 *modify it under the terms of the GNU Lesser General Public
00009 *License as published by the Free Software Foundation; either
00010 *version 2.1 of the License, or (at your option) any later version.
00011 *
00012 *This library is distributed in the hope that it will be useful,
00013 *but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 *Lesser General Public License for more details.
00016 *
00017 *You should have received a copy of the GNU Lesser General Public
00018 *License along with this library; if not, write to the Free Software
00019 *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00020 *
00021 * "@(#) $Id: acsexmplCallbacks.h,v 1.6 2004/04/28 18:52:03 dfugate Exp $"
00022 *
00023 * who       when      what
00024 * --------  --------  ----------------------------------------------
00025 * dave  2004-01-13  created 
00026 */
00027 
00028 //Since this header just contains implementation of BACI classes, we must 
00029 //include the CORBA stubs for baci.idl
00030 #include <baciS.h>
00031 
00032 //ACE's string class which is supported on tons of different platforms.
00033 #include <ace/SString.h>
00034 
00086 class CommonCallback
00087 {
00088   public:
00092     CommonCallback() {}
00093     
00094   protected:
00099     ACE_CString prop;
00100     
00106     unsigned int m_count;
00107 
00108   private:
00112     void operator=(const CommonCallback&);
00113 };
00115 
00123 class MyAlarmdouble : public virtual POA_ACS::Alarmdouble,    //CORBA servant stub
00124                       protected CommonCallback
00125 {
00126   public:
00131     MyAlarmdouble(ACE_CString _prop) { prop = _prop; }
00132     
00136     ~MyAlarmdouble() {}
00137 
00148     void 
00149     alarm_raised (CORBA::Double value,
00150                   const ACSErr::Completion &c,
00151                   const ACS::CBDescOut &desc)
00152         throw (CORBA::SystemException);
00153         
00164     void 
00165     alarm_cleared (CORBA::Double value,
00166                    const ACSErr::Completion &c,
00167                    const ACS::CBDescOut &desc)
00168         throw (CORBA::SystemException);
00169             
00183     CORBA::Boolean 
00184     negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc) 
00185         throw (CORBA::SystemException)
00186         {
00187             return true;
00188         }
00189 
00190 };
00192 
00196 class MyCBdouble : public virtual POA_ACS::CBdouble,    //CORBA servant stub
00197                    protected CommonCallback
00198 {
00199   public:
00204     MyCBdouble(ACE_CString _prop)  { prop = _prop; m_count = 0; }
00205 
00209     ~MyCBdouble() {}
00210     
00222     void 
00223     working (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc)
00224         throw (CORBA::SystemException);
00225     
00237     void 
00238     done (CORBA::Double value, const ACSErr::Completion &c, const ACS::CBDescOut &desc)
00239         throw (CORBA::SystemException);
00240     
00254     CORBA::Boolean 
00255     negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc) 
00256         throw (CORBA::SystemException)
00257         {
00258             return true;
00259         }
00260 };
00262 
00266 class MyCBvoid: public virtual POA_ACS::CBvoid,    //CORBA servant stub
00267                 protected CommonCallback
00268 {   
00269   public:
00274     MyCBvoid(ACE_CString _prop) { prop = _prop; }
00275     
00279     ~MyCBvoid() {}
00280 
00292     void 
00293     working (const ACSErr::Completion &c, const ACS::CBDescOut &desc) 
00294         throw (CORBA::SystemException);
00295     
00306     void 
00307     done (const ACSErr::Completion &c, const ACS::CBDescOut &desc) 
00308         throw (CORBA::SystemException);
00309 
00324     CORBA::Boolean 
00325     negotiate (ACS::TimeInterval time_to_transmit, const ACS::CBDescOut &desc) 
00326         throw (CORBA::SystemException)
00327         {
00328             return true;
00329         }
00330 };
00332 
00333 #endif
00334 /*___oOo___*/
00335 
00336 
00337 

Generated on Sun Oct 29 02:26:25 2006 for ACS C++ API by doxygen 1.3.6