00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef TAO_PG_PROPERTY_SET_FIND_H
00016 #define TAO_PG_PROPERTY_SET_FIND_H
00017 #include "ace/pre.h"
00018 #include <ace/ACE.h>
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #include "orbsvcs/PortableGroup/portablegroup_export.h"
00025
00026 #include "ace/Hash_Map_Manager.h"
00027
00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00029
00030 namespace TAO
00031 {
00032
00033
00034
00035
00036
00037 template <typename TYPE>
00038 int find (const PG_Property_Set & decoder, const ACE_CString & key, TYPE & value)
00039 {
00040 int result = 0;
00041 PortableGroup::Value const * any;
00042 if ( decoder.find (key, any))
00043 {
00044 result = ((*any) >>= value);
00045 }
00046 return result;
00047 }
00048
00049 }
00050
00051 TAO_END_VERSIONED_NAMESPACE_DECL
00052
00053 #include "ace/post.h"
00054
00055 #endif // TAO_PG_PROPERTY_SET_FIND_H