00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_PG_PROPERTY_MANAGER_H
00014 #define TAO_PG_PROPERTY_MANAGER_H
00015
00016 #include "ace/pre.h"
00017
00018 #include "ace/config-all.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 #pragma once
00022 #endif
00023
00024 #include "orbsvcs/PortableGroup/PG_Default_Property_Validator.h"
00025 #include "orbsvcs/PortableGroup/portablegroup_export.h"
00026 #include "orbsvcs/PortableGroupS.h"
00027
00028 #include "ace/SString.h"
00029 #include "ace/Null_Mutex.h"
00030 #include "ace/Functor.h"
00031 #include "ace/Hash_Map_Manager_T.h"
00032
00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00034
00035
00036 class TAO_PG_ObjectGroupManager;
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 class TAO_PortableGroup_Export TAO_PG_PropertyManager
00051 : public virtual POA_PortableGroup::PropertyManager
00052 {
00053 public:
00054
00055
00056 TAO_PG_PropertyManager (TAO_PG_ObjectGroupManager & object_group_manager);
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 virtual void set_default_properties (
00068 const PortableGroup::Properties & props
00069 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00070 ACE_THROW_SPEC ((CORBA::SystemException,
00071 PortableGroup::InvalidProperty,
00072 PortableGroup::UnsupportedProperty));
00073
00074
00075 virtual PortableGroup::Properties * get_default_properties (
00076 ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
00077 ACE_THROW_SPEC ((CORBA::SystemException));
00078
00079
00080 virtual void remove_default_properties (
00081 const PortableGroup::Properties & props
00082 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00083 ACE_THROW_SPEC ((CORBA::SystemException,
00084 PortableGroup::InvalidProperty,
00085 PortableGroup::UnsupportedProperty));
00086
00087
00088
00089 virtual void set_type_properties (
00090 const char * type_id,
00091 const PortableGroup::Properties & overrides
00092 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00093 ACE_THROW_SPEC ((CORBA::SystemException,
00094 PortableGroup::InvalidProperty,
00095 PortableGroup::UnsupportedProperty));
00096
00097
00098
00099
00100
00101
00102 virtual PortableGroup::Properties * get_type_properties (
00103 const char * type_id
00104 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00105 ACE_THROW_SPEC ((CORBA::SystemException));
00106
00107
00108 virtual void remove_type_properties (
00109 const char * type_id,
00110 const PortableGroup::Properties & props
00111 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00112 ACE_THROW_SPEC ((CORBA::SystemException,
00113 PortableGroup::InvalidProperty,
00114 PortableGroup::UnsupportedProperty));
00115
00116
00117
00118
00119
00120
00121
00122 virtual void set_properties_dynamically (
00123 PortableGroup::ObjectGroup_ptr object_group,
00124 const PortableGroup::Properties & overrides
00125 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00126 ACE_THROW_SPEC ((CORBA::SystemException,
00127 PortableGroup::ObjectGroupNotFound,
00128 PortableGroup::InvalidProperty,
00129 PortableGroup::UnsupportedProperty));
00130
00131
00132
00133
00134
00135
00136
00137
00138 virtual PortableGroup::Properties * get_properties (
00139 PortableGroup::ObjectGroup_ptr object_group
00140 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
00141 ACE_THROW_SPEC ((CORBA::SystemException,
00142 PortableGroup::ObjectGroupNotFound));
00143
00144
00145
00146
00147 typedef ACE_Hash_Map_Manager_Ex<
00148 ACE_CString,
00149 PortableGroup::Properties,
00150 ACE_Hash<ACE_CString>,
00151 ACE_Equal_To<ACE_CString>,
00152 ACE_Null_Mutex> Type_Prop_Table;
00153
00154 private:
00155
00156
00157
00158 void remove_properties (const PortableGroup::Properties & to_be_removed,
00159 PortableGroup::Properties &properties
00160 ACE_ENV_ARG_DECL)
00161 ACE_THROW_SPEC ((CORBA::SystemException,
00162 PortableGroup::InvalidProperty,
00163 PortableGroup::UnsupportedProperty));
00164
00165 private:
00166
00167
00168 TAO_PG_ObjectGroupManager & object_group_manager_;
00169
00170
00171 PortableGroup::Properties default_properties_;
00172
00173
00174 Type_Prop_Table type_properties_;
00175
00176
00177
00178 TAO_SYNCH_MUTEX lock_;
00179
00180
00181
00182
00183
00184 TAO_PG_Default_Property_Validator property_validator_;
00185
00186 };
00187
00188 TAO_END_VERSIONED_NAMESPACE_DECL
00189
00190 #include "ace/post.h"
00191
00192 #endif