summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-04-24 22:23:39 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-04-24 22:23:39 +0000
commit35982b447dc5c3bd9b743443b2cac5cdd13a382c (patch)
tree6bd8874ffc1695aa302c6ecf10c4ba79b2fa6d8b
parent8f7142beacbddb7602e5b7b9ace540486af06006 (diff)
downloadATCD-35982b447dc5c3bd9b743443b2cac5cdd13a382c.tar.gz
*** empty log message ***
-rw-r--r--TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp56
-rw-r--r--TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.h41
-rw-r--r--TAO/orbsvcs/orbsvcs/Property/CosProperty_Hash.h4
3 files changed, 49 insertions, 52 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp b/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp
index eeceab083e4..20445aa944b 100644
--- a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp
@@ -25,10 +25,10 @@ TAO_PropertySetFactory::~TAO_PropertySetFactory (void)
{
}
-// Returns a new TAO_PropertySet object. "The property set returned
-// will *not* have any initial properties."
-// Keep sequence of things new'ed and at the destructor of the factory
-// delete all these New'ed things.
+// Returns a new TAO_PropertySet object. "The property set returned
+// will *not* have any initial properties." Keep sequence of things
+// new'ed and at the destructor of the factory delete all these New'ed
+// things.
CosPropertyService::PropertySet_ptr
TAO_PropertySetFactory::create_propertyset (CORBA::Environment &_env)
@@ -218,9 +218,10 @@ TAO_PropertySetDefFactory::create_constrained_propertysetdef (const CosPropertyS
TAO_CATCH (CORBA::UserException, ex)
{
// Should be the Multiple exception raised by the PropertySetDef
- // constructor, which got that from define_properties_with_modes method.
- // Throw ConstraintNotSupported exception for this, because that
- // is the only exception that this method can throw.
+ // constructor, which got that from define_properties_with_modes
+ // method. Throw ConstraintNotSupported exception for this,
+ // because that is the only exception that this method can
+ // throw.
TAO_TRY_ENV.print_exception ("User exception");
// Release the memory.
@@ -311,6 +312,7 @@ TAO_PropertySet::TAO_PropertySet (void)
// Init values that the PropertySetFactory will want to specify. Write
// the allowed properties in the Hash Table with *fixed-normal* mode.
// @@ Need to check for duplicate properties and raise exceptions.
+
TAO_PropertySet::TAO_PropertySet (const CosPropertyService::PropertyTypes allowed_property_types,
const CosPropertyService::Properties allowed_properties,
CORBA::Environment &_env)
@@ -330,8 +332,10 @@ TAO_PropertySet::TAO_PropertySet (const CosPropertyService::PropertyTypes allowe
this->allowed_property_types_.length (),
allowed_properties.length ()));
- // keep the allowed property names in the sequence.
- for (size_t ni = 0; ni < allowed_properties.length (); ni++)
+ // Keep the allowed property names in the sequence..
+ for (size_t ni = 0;
+ ni < allowed_properties.length ();
+ ni++)
this->allowed_property_names_[ni] =
allowed_properties[ni].property_name;
@@ -425,7 +429,6 @@ TAO_PropertySet::TAO_PropertySet (const CosPropertyService::Properties initial_p
int ret = this->hash_table_.bind (hash_key,
hash_value,
entry_ptr);
-
// @@ Check the return value.
}
#endif /* 0 */
@@ -475,7 +478,6 @@ TAO_PropertySet::define_property (const char *property_name,
int ret = this->hash_table_.bind (hash_key,
hash_value,
entry_ptr);
-
switch (ret)
{
case 0:
@@ -551,8 +553,10 @@ TAO_PropertySet::is_property_allowed (const char* property_name)
return CORBA::B_TRUE;
// Check in the allowed_property_names.
- for (size_t ni = 0; ni < this->allowed_property_names_.length (); ni++)
- if ((const char *)this->allowed_property_names_[ni] == property_name)
+ for (size_t ni = 0;
+ ni < this->allowed_property_names_.length ();
+ ni++)
+ if ((const char *) this->allowed_property_names_[ni] == property_name)
return CORBA::B_TRUE;
// Name not found.
@@ -888,21 +892,19 @@ TAO_PropertySet::get_all_properties (CORBA::ULong how_many,
for (size_t i = sequence_length;
i < num_of_properties;
i++, iterator.advance ())
- {
- if (iterator.next (entry_ptr) != 0)
- if (prop_set->hash_table_.bind (entry_ptr->ext_id_,
- entry_ptr->int_id_) < 0)
- ACE_DEBUG ((LM_DEBUG, "Err: get_all_properties\n"));
- }
+ if (iterator.next (entry_ptr) != 0
+ && prop_set->hash_table_.bind (entry_ptr->ext_id_,
+ entry_ptr->int_id_) < 0)
+ ACE_DEBUG ((LM_DEBUG, "Err: get_all_properties\n"));
+
ACE_DEBUG ((LM_DEBUG,
"DB:New PropertySet created--size %d\n",
prop_set->get_number_of_properties (_env)));
// Make the iterator out of the new TAO_Propset.
TAO_PropertiesIterator *iterator = 0;
- ACE_NEW_RETURN (iterator,
- TAO_PropertiesIterator (*prop_set),
- );
+ ACE_NEW (iterator,
+ TAO_PropertiesIterator (*prop_set));
rest = CosPropertyService::PropertiesIterator::_duplicate (iterator->_this (_env));
TAO_CHECK_ENV_RETURN (_env, );
@@ -1204,8 +1206,6 @@ TAO_PropertySetDef::get_allowed_properties (CosPropertyService::PropertyDefs_out
// deleted because of their modes were not safe.
// @@ TO DO.
-
-
}
// Check for name's validity. If name not there define it. If it is
@@ -1485,7 +1485,6 @@ TAO_PropertySetDef::get_property_modes (const CosPropertyService::PropertyNames
return ret;
}
-
// Changing the mode of the property.
// "Normal" to anything is possible.
// "Readonly" mode to "Fixed-Readonly" is possible. Others not possible.
@@ -1593,9 +1592,10 @@ TAO_PropertySetDef::set_property_mode (const char *property_name,
}
// Batch operation for setting the property. Raises
-// MultipleExceptions.
-// Set the properties one by one, catch exceptions if any and keep
-// them as in the multiple exceptions sequence and return.
+// MultipleExceptions. Set the properties one by one, catch
+// exceptions if any and keep them as in the multiple exceptions
+// sequence and return.
+
void
TAO_PropertySetDef::set_property_modes (const CosPropertyService::PropertyModes &property_modes,
CORBA::Environment &_env)
diff --git a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.h b/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.h
index eca4d07d1f0..a16b424fddb 100644
--- a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.h
+++ b/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.h
@@ -1,5 +1,4 @@
/* -*- C++ -*- */
-
// $Id$
// ============================================================================
@@ -110,6 +109,7 @@ public:
CORBA::Environment &env);
// Tell whether this property is defined or no. Forget about the
// value.
+
protected:
typedef ACE_Hash_Map_Manager<CosProperty_Hash_Key, CosProperty_Hash_Value, ACE_Null_Mutex>
CosProperty_Hash_Map;
@@ -144,9 +144,8 @@ protected:
// can be defined.
};
-class TAO_ORBSVCS_Export TAO_PropertySetDef
- : public virtual POA_CosPropertyService::PropertySetDef,
- public virtual TAO_PropertySet
+class TAO_ORBSVCS_Export TAO_PropertySetDef : public virtual POA_CosPropertyService::PropertySetDef,
+ public virtual TAO_PropertySet
{
// = TITLE
// This class implements PropertySetDef interface, which is
@@ -216,13 +215,13 @@ public:
virtual CORBA::Boolean get_property_modes (const CosPropertyService::PropertyNames &property_names,
CosPropertyService::PropertyModes_out property_modes,
CORBA::Environment &env);
- // Batch operation for getting the property. Invoke get_property_mode
- // for each name.
- // Return value False indicates that properties with *undefined* modes
- // have failed due to PropertyNotFound or InvalidPropertyName exception.
- // Returning False in case of *Nothing to retun* or New is
- // failing. The caller has to check the out parameter whether it is
- // Nil or no, before doing something with it.
+ // Batch operation for getting the property. Invoke
+ // get_property_mode for each name. Return value False indicates
+ // that properties with *undefined* modes have failed due to
+ // PropertyNotFound or InvalidPropertyName exception. Returning
+ // False in case of *Nothing to retun* or New is failing. The caller
+ // has to check the out parameter whether it is Nil or no, before
+ // doing something with it.
virtual void set_property_mode (const char *property_name,
CosPropertyService::PropertyModeType property_mode,
@@ -230,12 +229,13 @@ public:
// Set the mode of a property. Watch the following. The change of
// mode is allowed introduce more constraints, but it should not
// relax the constraints. The following decisions have been made, in
- // TAO's implementation. The Property Spec has left this to the implenters.
- // "Normal" to anything is possible.
- // "Readonly" mode to "Fixed-Readonly" is possible. Others not possible.
- // "Fixed-Normal" to "Fixed-Readonly" is possible. Other things are impossible.
- // "Fixed-Readonly" to anything is *not* possible.
- // For all illegal set_mode attempts, UnsupportedMode exception is raised.
+ // TAO's implementation. The Property Spec has left this to the
+ // implenters. "Normal" to anything is possible. "Readonly" mode
+ // to "Fixed-Readonly" is possible. Others not possible.
+ // "Fixed-Normal" to "Fixed-Readonly" is possible. Other things are
+ // impossible. "Fixed-Readonly" to anything is *not* possible. For
+ // all illegal set_mode attempts, UnsupportedMode exception is
+ // raised.
virtual void set_property_modes (const CosPropertyService::PropertyModes &property_modes,
CORBA::Environment &env);
@@ -276,7 +276,7 @@ public:
CORBA::Environment &env);
// Allows a client to create a new TAO_PropertySet with specific
// initial properties."All the properties will have *fixed-normal"
- // modes".
+ // modes".
private:
TAO_Unbounded_Sequence<TAO_PropertySet*> propertyset_products_;
@@ -322,8 +322,6 @@ private:
// keep track all of them so that we can delete them at the end.
};
-
-
class TAO_ORBSVCS_Export TAO_PropertyNamesIterator : public virtual POA_CosPropertyService::PropertyNamesIterator
{
// = TITLE
@@ -368,7 +366,7 @@ public:
// Destroys the iterator.
private:
typedef ACE_Hash_Map_Manager<CosProperty_Hash_Key, CosProperty_Hash_Value, ACE_Null_Mutex>
- CosProperty_Hash_Map;
+ CosProperty_Hash_Map;
typedef ACE_Hash_Map_Iterator<CosProperty_Hash_Key, CosProperty_Hash_Value, ACE_Null_Mutex>
CosProperty_Hash_Iterator;
typedef ACE_Hash_Map_Entry<CosProperty_Hash_Key, CosProperty_Hash_Value>
@@ -431,7 +429,6 @@ private:
typedef ACE_Hash_Map_Entry<CosProperty_Hash_Key, CosProperty_Hash_Value>
CosProperty_Hash_Entry;
typedef CosProperty_Hash_Entry * CosProperty_Hash_Entry_ptr;
-
CosProperty_Hash_Iterator iterator_;
// The iterator object.
diff --git a/TAO/orbsvcs/orbsvcs/Property/CosProperty_Hash.h b/TAO/orbsvcs/orbsvcs/Property/CosProperty_Hash.h
index e9c8d552d9c..e3314df32f3 100644
--- a/TAO/orbsvcs/orbsvcs/Property/CosProperty_Hash.h
+++ b/TAO/orbsvcs/orbsvcs/Property/CosProperty_Hash.h
@@ -8,8 +8,8 @@
// CosProperty_Hash.h
//
// = DESCRITION
-// Defines CosProperty_Hash_Value and CosProperty_Hash_Key classes for the Hash_Map_Manager to
-// be used in the CosPropertyService.
+// Defines CosProperty_Hash_Value and CosProperty_Hash_Key classes
+// for the Hash_Map_Manager to be used in the CosPropertyService.
//
// = AUTHOR
// Alexander B. Arulanthu <alex@cs.wustl.edu>