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

archiveeventsArchiveSupplier.h

Go to the documentation of this file.
00001 #ifndef archive_event_supplier_H 00002 #define archive_event_supplier_H 00003 /******************************************************************************* 00004 * ALMA - Atacama Large Millimiter Array 00005 * (c) European Southern Observatory, 2002 00006 * Copyright by ESO (in the framework of the ALMA collaboration) 00007 * and Cosylab 2002, All rights reserved 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public 00011 * License as published by the Free Software Foundation; either 00012 * version 2.1 of the License, or (at your option) any later version. 00013 * 00014 * This library is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * Lesser General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public 00020 * License along with this library; if not, write to the Free Software 00021 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 * 00023 * "@(#) $Id: archiveeventsArchiveSupplier.h,v 1.6 2006/01/27 19:07:07 dfugate Exp $" 00024 * 00025 * who when what 00026 * -------- ---------- ---------------------------------------------- 00027 * msekoran 2001-06-17 created 00028 */ 00029 00030 #ifndef __cplusplus 00031 #error This is a C++ include file and cannot be used from plain C 00032 #endif 00033 00038 #include <lokiSingleton.h> 00039 #include <baciC.h> 00040 00041 #include <basencSupplier.h> 00042 00051 class ArchiveSupplier : public BaseSupplier 00052 { 00053 public: 00057 ArchiveSupplier(); 00058 00062 virtual ~ArchiveSupplier(); 00063 00076 template <class T> 00077 void 00078 sendEvent(CORBA::Short priority, 00079 ACS::Time timeStamp, 00080 const std::string& component, 00081 const std::string& property, 00082 T value, 00083 const std::string& container="") 00084 { 00085 CORBA::Any any; 00086 any <<= value; 00087 00088 this->send_event(priority, 00089 timeStamp, 00090 component, 00091 property, 00092 any, 00093 container); 00094 } 00095 00108 void 00109 send_event(CORBA::Short priority, 00110 ACS::Time timeStamp, 00111 const std::string& component, 00112 const std::string& property, 00113 CORBA::Any value, 00114 const std::string& container); 00115 00116 protected: 00117 00121 virtual const char* 00122 getNotificationFactoryName() 00123 {return acscommon::ARCHIVE_NOTIFICATION_FACTORY_NAME;} 00124 00128 virtual const char* 00129 getChannelDomain() 00130 {return acscommon::ARCHIVING_DOMAIN;} 00131 00135 virtual const char* 00136 getChannelKind() 00137 { return acscommon::ARCHIVING_CHANNEL_KIND; } 00138 00142 virtual const char* 00143 getEventType() 00144 { return ""; } 00145 00146 }; 00147 00152 typedef Loki::SingletonHolder<ArchiveSupplier, 00153 Loki::CreateUsingNew, 00154 Loki::PhoenixSingleton, 00155 Loki::SingleThreaded> ArchiveSupplierSingleton; 00156 00157 #endif

Generated on Thu Apr 30 02:30:49 2009 for ACS C++ API by doxygen 1.3.8