00001
#ifndef baciCDBPropertySet_h
00002
#define baciCDBPropertySet_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
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
00295
00296
00297
00298
00299