diff options
author | wilson_d <wilson_d@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-03-01 18:35:43 +0000 |
---|---|---|
committer | wilson_d <wilson_d@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-03-01 18:35:43 +0000 |
commit | 3b6d558e811992daa6d5c762d8d90b6154065ea6 (patch) | |
tree | 0053774ade9a0ca2a69c79bbd6be9f2c1dc51a54 /TAO/orbsvcs | |
parent | 08d06da10696dbae897bac94ce19c5c6d717ccbd (diff) | |
download | ATCD-3b6d558e811992daa6d5c762d8d90b6154065ea6.tar.gz |
ChangeLogTag: Mon Mar 1 12:31:38 2004 Dale Wilson <wilson_d@ociweb.com>
Diffstat (limited to 'TAO/orbsvcs')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp | 11 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.h | 31 |
2 files changed, 36 insertions, 6 deletions
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp index ab025e59469..733c7e57f17 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp @@ -13,6 +13,11 @@ //============================================================================= #include "PG_Properties_Encoder.h" + +#if ! defined (__ACE_INLINE__) +#include "PG_Properties_Encoder.inl" +#endif /* ! __ACE_INLINE__ */ + ////////// // Properties_Encoder TAO_PG::Properties_Encoder::Properties_Encoder () @@ -45,7 +50,7 @@ void TAO_PG::Properties_Encoder::encode ( PortableGroup::Name & nsName = property.nam; PortableGroup::Value & anyValue = property.val; // assign the value - anyValue = (nv.second()); + anyValue = (nv.value_); // assign the name // @@: This restricts the name to a single level with no "kind" @@ -53,15 +58,13 @@ void TAO_PG::Properties_Encoder::encode ( nsName.length(1); CosNaming::NameComponent & nc = nsName[0]; - nc.id = CORBA::string_dup (nv.first().c_str()); + nc.id = CORBA::string_dup (nv.name_.c_str()); // nc.kind defaults to empty. Leave it that way (for now) } } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) - template class ACE_Pair< ACE_CString, PortableGroup::Value>; template class ACE_Vector< TAO_PG::Properties_Encoder::NamedValue, 10 >; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -# pragma instantiate ACE_Pair< ACE_CString, PortableGroup::Value> # pragma instantiate ACE_Vector< TAO_PG::Properties_Encoder::NamedValue, 10 > #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.h index 31f1a7bc1a8..a44f8f08cf3 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.h @@ -12,12 +12,18 @@ //============================================================================= #ifndef TAO_PG_PROPERTIES_ENCODER_H #define TAO_PG_PROPERTIES_ENCODER_H + +#include /**/ "ace/pre.h" +#include <ace/config-all.h> +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/orbsvcs/PortableGroupS.h" #include "orbsvcs/orbsvcs/CosNamingC.h" #include "portablegroup_export.h" #include "ace/Vector_T.h" -#include "ace/Pair_T.h" #include "ace/SString.h" namespace TAO_PG @@ -34,7 +40,24 @@ namespace TAO_PG */ class TAO_PortableGroup_Export Properties_Encoder { - typedef ACE_Pair< ACE_CString, PortableGroup::Value> NamedValue; + // Originally NamedValue was an ACE_Pair, but ACE_Pair allows operator == + // (delegating to the member's operators ==.) Since CORBA::Any does + // not support operator ==, this confused gcc version 2.9-gnupro-98r2 + // on LynxOS pfadev04 3.0.1 110298-G PowerPC + struct NamedValue + { + public: + ACE_CString name_; + PortableGroup::Value value_; + NamedValue (); + NamedValue (const ACE_CString & name, const PortableGroup::Value & value); + NamedValue (const NamedValue & rhs); + NamedValue & operator = (const NamedValue & rhs); + /// Meaningless method to keep ACE_Vector happy + bool operator == (const NamedValue &rhs) const; + /// Meaningless method to keep ACE_Vector happy + bool operator != (const NamedValue &rhs) const; + }; typedef ACE_Vector< NamedValue, 10 > NamedValueVec; public: @@ -66,4 +89,8 @@ namespace TAO_PG } //namespace TAO_PG +#if defined (__ACE_INLINE__) +#include "PG_Properties_Encoder.inl" +#endif /* __ACE_INLINE__ */ +#include /**/ "ace/post.h" #endif // TAO_PG_PROPERTIES_ENCODER_H |