From 57ea31cf4092dd2980746d5caf25f51a76107570 Mon Sep 17 00:00:00 2001 From: brunsch Date: Thu, 14 Aug 1997 14:48:49 +0000 Subject: Updated to use MSVC 5 features and the ability to use Standard C++ libraries. --- ace/Registry.h | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'ace/Registry.h') diff --git a/ace/Registry.h b/ace/Registry.h index 50ebe03d91d..9dc5a07e785 100644 --- a/ace/Registry.h +++ b/ace/Registry.h @@ -23,10 +23,22 @@ #if defined (ACE_WIN32) // This only works on Win32 platforms +#if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && \ + (ACE_HAS_STANDARD_CPP_LIBRARY != 0) +#include +#include +#else #include "vector.h" #include "bstring.h" +#endif // You must configure the STL components in order to use this wrapper. +#if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) && \ + (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB != 0) + using std::vector; + using std::basic_string; +#endif /* ACE_HAS_STD_NAMESPACE_FOR_STDCPP_LIB */ + class ACE_Export ACE_Registry // = TITLE // A Name Server implementation @@ -41,7 +53,7 @@ class ACE_Export ACE_Registry { public: - typedef std::basic_string Istring; + typedef basic_string Istring; // International string struct ACE_Export Name_Component @@ -52,7 +64,7 @@ public: // The field is used, // but the field is currently ignored - typedef std::vector Name; + typedef vector Name; // A Name is an ordered collections of components (ids) static LPCTSTR STRING_SEPARATOR; @@ -100,7 +112,7 @@ public: // A binding has a name and a type }; - typedef std::vector Binding_List; + typedef vector Binding_List; // A list of bindings class Binding_Iterator; @@ -504,5 +516,12 @@ private: }; +#if (_MSC_VER) && (_MSC_VER > 1020) && \ + (ACE_HAS_STANDARD_CPP_LIBRARY != 0) + typedef ACE_Registry::Name_Component Name_Component; + typedef ACE_Registry::Binding Binding; + const int NPOS = ACE_Registry::Istring::npos; +#endif + #endif /* ACE_WIN32 */ #endif /* ACE_REGISTRY_H */ -- cgit v1.2.1