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

baciCDBPropertySet.h

Go to the documentation of this file.
00001 #ifndef baciCDBPropertySet_h
00002 #define baciCDBPropertySet_h
00003 
00004 /*******************************************************************
00005 * ALMA - Atacama Large Millimiter Array
00006 * (c) European Southern Observatory, 2003 
00007 *
00008 *This library is free software; you can redistribute it and/or
00009 *modify it under the terms of the GNU Lesser General Public
00010 *License as published by the Free Software Foundation; either
00011 *version 2.1 of the License, or (at your option) any later version.
00012 *
00013 *This library is distributed in the hope that it will be useful,
00014 *but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 *Lesser General Public License for more details.
00017 *
00018 *You should have received a copy of the GNU Lesser General Public
00019 *License along with this library; if not, write to the Free Software
00020 *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00021 *
00022 * "@(#) $Id: baciCDBPropertySet.h,v 1.100 2008/10/01 02:26:45 cparedes Exp $"
00023 *
00024 * who       when        what
00025 * --------  ----------  ----------------------------------------------
00026 * msekoran  2001/05/24  created
00027 */
00028 
00034 #ifndef __cplusplus
00035 #error This is a C++ include file and cannot be used from plain C
00036 #endif
00037 
00038 #include <acsutil.h>
00039 #include <baciExport.h>
00040 #include <orbsvcs/CosPropertyS.h>
00041 
00042 #include <map>
00043 #include "baciCharacteristicModelImpl.h"
00044 
00045 namespace baci {
00046 
00062 class CDBPropertySet : public virtual POA_CosPropertyService::PropertySet
00063 {
00064   public:
00065     
00074     static CDBPropertySet * createInstance (CORBA::ORB_ptr orb,
00075                                             PortableServer::POAManager_ptr poa_manager,
00076                                             PortableServer::POA_ptr root_poa);
00077     
00082     static CDBPropertySet * getInstance()
00083         {
00084             return instance_mp;
00085         }
00086     
00087   protected:
00088     
00097     CDBPropertySet (CORBA::ORB_ptr orb,
00098                     PortableServer::POAManager_ptr poa_manager,
00099                     PortableServer::POA_ptr root_poa);
00100     
00101   public:
00105     virtual ~CDBPropertySet (void);
00106 
00107 
00111     void registerCharacteristicModel(const char * modelName, CharacteristicModelImpl* model);
00112 
00116     void deregisterCharacteristicModel(const char * modelName);
00117 
00118     
00123     const char * getRepositoryId ();
00124     
00129     char * getObjectId();
00130     
00138     CosPropertyService::PropertySet * getPropertySet(const char * propertyName);
00139     
00156     virtual void define_property (const char * property_name,
00157                                   const CORBA::Any & property_value);
00158     
00170     virtual void define_properties (const CosPropertyService::Properties & nproperties);
00171     
00178     virtual CORBA::ULong get_number_of_properties ();
00179     
00189     virtual void get_all_property_names (CORBA::ULong how_many,
00190                                          CosPropertyService::PropertyNames_out property_names,
00191                                          CosPropertyService::PropertyNamesIterator_out rest);
00192     
00199     virtual CORBA::Any * get_property_value (const char * property_name);
00200     
00206     virtual CORBA::Boolean get_properties (const CosPropertyService::PropertyNames & property_names,
00207                                            CosPropertyService::Properties_out nproperties);
00208 
00218     virtual void get_all_properties (CORBA::ULong how_many,
00219                                      CosPropertyService::Properties_out nproperties,
00220                                      CosPropertyService::PropertiesIterator_out rest);
00221 
00233     virtual void delete_property (const char * property_name);
00234     
00245     virtual void delete_properties (const CosPropertyService::PropertyNames & property_names);
00246     
00253     virtual CORBA::Boolean delete_all_properties ();
00254     
00263     virtual CORBA::Boolean is_property_defined (const char * property_name);
00264     
00265   private:
00266     
00268     static CDBPropertySet * instance_mp;
00269     
00271     PortableServer::POA_var poa_m;
00272     
00274     PortableServer::Current_var poaCurrent_m;
00275 
00276     typedef std::map<std::string, CharacteristicModelImpl*> CharacteristicModelImplMap;
00278     CharacteristicModelImplMap modelMap;
00279 
00283     void operator=(const CDBPropertySet&);
00284     
00285 
00289     CDBPropertySet(const CDBPropertySet&);  
00290 };
00291 
00292  }; 
00293 
00294 #endif /* baciCDBPropertySet_h  */
00295 
00296 
00297 
00298 
00299 

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