diff options
author | wilson_d <wilson_d@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-11-11 22:23:43 +0000 |
---|---|---|
committer | wilson_d <wilson_d@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-11-11 22:23:43 +0000 |
commit | e2afa5ff78bccdf66b76f981d875296c20827b35 (patch) | |
tree | df7d4ffe68f104f0397ef51a14612a973f67b8f7 | |
parent | 6dbb22797cdf4ebdfa48d9995bfd87bb57543359 (diff) | |
download | ATCD-e2afa5ff78bccdf66b76f981d875296c20827b35.tar.gz |
ChangeLogTag: Tue Nov 11 16:21:26 2003 Dale Wilson <wilson_d@ociweb.com>
5 files changed, 62 insertions, 5 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index f5301c16388..a1253eeb865 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,12 @@ +Tue Nov 11 16:21:26 2003 Dale Wilson <wilson_d@ociweb.com> + + * orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.cpp: + * orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp: + * orbsvcs/orbsvcs/PortableGroup/PG_Properties_Decoder.h: + * orbsvcs/orbsvcs/PortableGroup/PG_Properties_Decoder_Find.h: + Found the build problem with the templated method (D'Oh!) + It had nothing to do with templates and everything to do with const. + Tue Nov 11 14:36:55 2003 Dale Wilson <wilson_d@ociweb.com> * orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp: diff --git a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.cpp b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.cpp index da9b8a21d06..3dfa661484a 100755 --- a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.cpp +++ b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManagerFaultAnalyzer.cpp @@ -215,8 +215,8 @@ int TAO::FT_ReplicationManagerFaultAnalyzer::get_location ( return 0; } -// -//TODO: Use TAO_PG::find() to get property values from properties +// +//TODO: Use TAO_PG::Properties_Decoder to get property values from properties // instead of all these specific "get" functions. // diff --git a/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp b/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp index c6a9f0bf2bf..f9fbfa036de 100644 --- a/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp +++ b/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.cpp @@ -462,7 +462,7 @@ void TAO::FT_FaultDetectorFactory_i::change_properties ( ::TAO_PG::Properties_Decoder decoder(property_set); -#if 0 // PG_FIND +#if 1 // PG_FIND TimeBase::TimeT value = 0; if( TAO_PG::find (decoder, FT::FT_FAULT_MONITORING_INTERVAL, value) ) @@ -566,7 +566,7 @@ CORBA::Object_ptr TAO::FT_FaultDetectorFactory_i::create_object ( int missingParameter = 0; const char * missingParameterName = 0; -#if 0 // PG_FIND +#if 1 // PG_FIND FT::FaultNotifier_ptr notifier; if (! ::TAO_PG::find (decoder, ::FT::FT_NOTIFIER, notifier) ) { diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Decoder.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Decoder.h index 850f594bd38..78dcf3d78e9 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Decoder.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Decoder.h @@ -63,6 +63,6 @@ namespace TAO_PG //////////////////////////////////// // include templated helper function -// DISABLE THIS #include "PG_Properties_Decoder_Find.h" +#include "PG_Properties_Decoder_Find.h" #endif // TAO_PG_PROPERTIES_DECODER_H diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Decoder_Find.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Decoder_Find.h new file mode 100644 index 00000000000..da8143a5b7e --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Decoder_Find.h @@ -0,0 +1,48 @@ +/* -*- C++ -*- */ +//============================================================================= +/** + * @file PG_Properties_Decoder.h + * + * $Id$ + * + * This is a companion function for the properties docoder + * to work around compilers that don't support templated methods. + * + * @author Dale Wilson <wilson_d@ociweb.com> + */ +//============================================================================= +#ifndef TAO_PG_PROPERTIES_DECODER_FIND_H +#define TAO_PG_PROPERTIES_DECODER_FIND_H +#include /**/ "ace/pre.h" +#include <ace/ACE.h> + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "portablegroup_export.h" + +#include "ace/Hash_Map_Manager.h" + +namespace TAO_PG +{ + /** + * Find a value in a Properties::Properties_Decoder. + * This is a work-around for the lack of + * templated methods. + */ + template <typename TYPE> + int find (const Properties_Decoder & decoder, const ACE_CString & key, TYPE & value) + { + int result = 0; + PortableGroup::Value const * any; + if ( decoder.find (key, any)) + { + result = ((*any) >>= value); + } + return result; + } + +} //namespace TAO_PG + +#endif // TAO_PG_PROPERTIES_DECODER_FIND_H |