• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

baciCharacteristicComponentImpl.h

Go to the documentation of this file.
00001 #ifndef CHARACTERISTIC_COMPONENT_IMPL_H
00002 #define CHARACTERISTIC_COMPONENT_IMPL_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: baciCharacteristicComponentImpl.h,v 1.38 2008/10/09 06:18:16 cparedes Exp $"
00024 *
00025 */
00026 
00032 #ifndef __cplusplus
00033 #error This is a C++ include file and cannot be used from plain C
00034 #endif
00035 
00036 #include <vector>
00037 #include <baci.h>
00038 #include <baciCORBA.h>
00039 #include <acsutil.h>
00040 #include <acscomponentImpl.h>
00041 #include <baciCharacteristicModelImpl.h>
00042 #include <acsErrTypeLifeCycle.h>
00043 
00055 
00056 
00072 #define CHARACTERISTIC_COMPONENT_PROPERTY(IdlAccessor, CppImplVar) \
00073     if (CppImplVar == 0) return; \
00074     else if (CppImplVar->initialization() == 1) \
00075         return; \
00076     { \
00077      \
00078     desc_m->properties.length(desc_m->properties.length()+1); \
00079     desc_m->properties[desc_m->properties.length()-1].property_ref = this->IdlAccessor(); \
00080     desc_m->properties[desc_m->properties.length()-1].name = CppImplVar->name(); \
00081     desc_m->properties[desc_m->properties.length()-1].characteristics = CppImplVar->get_all_characteristics(); \
00082     }
00083 
00084 namespace baci {
00085 
00091 class CharacteristicComponentImpl : public acscomponent::ACSComponentImpl,
00092                                     public baci::CharacteristicModelImpl,
00093                                     public virtual POA_ACS::CharacteristicComponent
00094 {
00095 
00096   public:
00097 
00110     CharacteristicComponentImpl(
00111         const ACE_CString& name,
00112         maci::ContainerServices *containerServices,
00113         bool monitoringProperties=true);
00114 
00118     virtual ~CharacteristicComponentImpl();
00119 
00129     BACIComponent* getComponent() const { return component_mp; }
00130 
00143     virtual ACS::CharacteristicComponentDesc * 
00144     descriptor ();
00145         
00157         void addPropertyToDesc(ACS::Property_ptr prop);
00158 
00159     /*************** Override Life Cycle functions ***************/
00160 
00166     virtual void __execute();
00167     
00173     virtual void __aboutToAbort();
00174     
00180     virtual void __cleanUp();
00181     
00191     void startPropertiesMonitoring();
00192 
00200     void stopPropertiesMonitoring();
00201 
00206     bool isPropertiesMonitoringActive();
00207 
00208   protected:
00209 
00212     ACS::CharacteristicComponentDesc_var desc_m;
00213     
00214   private:
00215 
00219     bool monitoringProperties_mp;
00220 
00221 
00225     BACIComponent *component_mp;
00226 
00230     void operator=(const CharacteristicComponentImpl&);
00231 
00235     CharacteristicComponentImpl(const CharacteristicComponentImpl&);
00236 
00237 };
00238 
00239  }; 
00240 
00241 #endif /* CHARACTERISTIC_COMPONENT_IMPL_H */
00242 
00243 
00244 
00245 
00246 
00247 
00248 
00249 
00250 
00251 
00252 
00253 
00254 
00255 

Generated on Thu Jan 12 2012 23:13:50 for ACS-10.0 C++ API by  doxygen 1.7.0