Permalink
Browse files

Imported upstream version 1.9.85

Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
  • Loading branch information...
Stefan Naewe
Stefan Naewe committed Nov 12, 2009
1 parent c9e6811 commit 2647deb22171f4b40ec3efd20e44507c93b56771
View
@@ -2,7 +2,7 @@
STLSoft - Changes
; Created: 29th March 2002
-; Updated: 23rd May 2009
+; Updated: 16th June 2009
============================================================================
@@ -19,6 +19,42 @@ STLSoft - Changes
============================================================================
+Changes for 1.9.85 (16th June 2009)
+
+Summary:
+========
+
+ * added merge() and swap() to stlsoft::frequence_map class template
+ * winstl::listview_sequence::value_type::string_type (aka lvs_string_t) is now overrideable via the preprocessor, in preparation for future expansion of flexibility
+
+Changes:
+========
+
+ ATLSTL:
+ =======
+
+ ~ atlstl/window/enhanced_window.hpp:
+ ~ refactored child dialog handle elicitation to single private method, in preparation of future increased flexibility
+
+ STLSoft:
+ ========
+
+ ~ stlsoft/containers/frequency_map.hpp:
+ + added merge() method, which adds the entries and counts to the map
+ + added swap()
+ ~ changed default count type to unsigned int for VC++ pre-7.0, to avoid incompatibilities with other libraries
+
+ ~ stlsoft/error/error_desc.hpp:
+ ~ nothrow on get_description() and c_str()
+
+ WinSTL:
+ =======
+
+ ~ winstl/controls/listview_sequence.hpp:
+ ~ lvs_string_t may now be overridden via the pre-processor, in preparation for future expansion of flexibility
+
+============================================================================
+
Changes for 1.9.84 (23rd May 2009)
Summary:
View
@@ -2,11 +2,18 @@
STLSoft - History
; Created: 29th March 2002
-; Updated: 23rd May 2009
+; Updated: 16th June 2009
============================================================================
+16th June 2009 - 1.9.85 released
+--------------------------------
+
+ * added merge() and swap() to stlsoft::frequence_map class template
+ * winstl::listview_sequence::value_type::string_type (aka lvs_string_t) is now overrideable via the preprocessor, in preparation for future expansion of flexibility
+
+
23rd May 2009 - 1.9.84 released
-------------------------------
View
@@ -2,15 +2,15 @@
STLSoft - Install
; Created: 29th March 2002
-; Updated: 23rd May 2009
+; Updated: 16th June 2009
============================================================================
STLSoft is a 100% header-only library, and so requires no building.
It is recommended that you define an STLSOFT environment variable. For
- example, if you install to /usr/local/stlsoft/stlsoft-1.9.84, then you
- should set STLSOFT to /usr/local/stlsoft/stlsoft-1.9.84. In that case,
+ example, if you install to /usr/local/stlsoft/stlsoft-1.9.85, then you
+ should set STLSOFT to /usr/local/stlsoft/stlsoft-1.9.85. In that case,
the file stlsoft/stlsoft.h will be located in
$STLSOFT/include/stlsoft/stlsoft.h
View
@@ -2,13 +2,15 @@
STLSoft - News
; Created: 29th March 2002
-; Updated: 23rd May 2009
+; Updated: 16th June 2009
============================================================================
News:
+ 16th June 2009 - Release of STLSoft 1.9.85
+
23rd May 2009 - Release of STLSoft 1.9.84
19th May 2009 - Release of STLSoft 1.9.83
@@ -4,11 +4,11 @@
* Purpose: Mixin class providing enhanced functions for ATL windows.
*
* Created: 30th November 2000
- * Updated: 2nd June 2007
+ * Updated: 16th June 2009
*
* Home: http://stlsoft.org/
*
- * Copyright (c) 2000-2007, Matthew Wilson and Synesis Software
+ * Copyright (c) 2000-2009, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -51,8 +51,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define ATLSTL_VER_ATLSTL_WINDOW_HPP_ENHANCED_WINDOW_MAJOR 4
# define ATLSTL_VER_ATLSTL_WINDOW_HPP_ENHANCED_WINDOW_MINOR 0
-# define ATLSTL_VER_ATLSTL_WINDOW_HPP_ENHANCED_WINDOW_REVISION 1
-# define ATLSTL_VER_ATLSTL_WINDOW_HPP_ENHANCED_WINDOW_EDIT 27
+# define ATLSTL_VER_ATLSTL_WINDOW_HPP_ENHANCED_WINDOW_REVISION 2
+# define ATLSTL_VER_ATLSTL_WINDOW_HPP_ENHANCED_WINDOW_EDIT 28
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -114,7 +114,7 @@ class EnhancedWindow
/// \brief Returns the length of the window text of the child window with the given identifier
int GetDlgItemTextLength(int idChild)
{
- HWND hwndChild = this_()->GetDlgItem(idChild);
+ HWND hwndChild = GetDlgItem_(idChild);
ATLSTL_ASSERT(::IsWindow(hwndChild));
@@ -124,7 +124,7 @@ class EnhancedWindow
/// \brief Changes the enable state of the child window with the given identifier
BOOL EnableDlgItem(int idChild, BOOL bEnable)
{
- HWND hwndChild = this_()->GetDlgItem(idChild);
+ HWND hwndChild = GetDlgItem_(idChild);
ATLSTL_ASSERT(::IsWindow(hwndChild));
@@ -134,7 +134,7 @@ class EnhancedWindow
/// \brief Indicates whether the child window with the given identifier is enabled
BOOL IsDlgItemEnabled(int idChild)
{
- HWND hwndChild = this_()->GetDlgItem(idChild);
+ HWND hwndChild = GetDlgItem_(idChild);
ATLSTL_ASSERT(::IsWindow(hwndChild));
@@ -144,7 +144,7 @@ class EnhancedWindow
/// \brief Changes the visible state of the child window with the given identifier
BOOL ShowDlgItem(int idChild, BOOL bShow)
{
- HWND hwndChild = this_()->GetDlgItem(idChild);
+ HWND hwndChild = GetDlgItem_(idChild);
ATLSTL_ASSERT(::IsWindow(hwndChild));
@@ -154,7 +154,7 @@ class EnhancedWindow
/// \brief Changes the enable and visible states of the child window with the given identifier
BOOL ShowAndEnableDlgItem(int idChild, BOOL bShowAndEnable, BOOL bHideIfDisabled)
{
- BOOL bRet = true;
+ BOOL bRet = true;
if( bShowAndEnable ||
bHideIfDisabled)
@@ -176,7 +176,7 @@ class EnhancedWindow
/// \brief Sets the focus to the child window with the given identifier
HWND SetDlgItemFocus(int idChild)
{
- HWND hwndChild = this_()->GetDlgItem(idChild);
+ HWND hwndChild = GetDlgItem_(idChild);
ATLSTL_ASSERT(::IsWindow(hwndChild));
@@ -187,14 +187,19 @@ class EnhancedWindow
/// \name Implementation
/// @{
private:
- dialog_window_type *this_()
+ dialog_window_type* this_()
{
return static_cast<dialog_window_type*>(this);
}
- dialog_window_type const *this_() const
+ dialog_window_type const* this_() const
{
return static_cast<dialog_window_type const*>(this);
}
+
+ HWND GetDlgItem_(int idChild) const
+ {
+ return this_()->GetDlgItem(idChild);
+ }
/// @}
};
@@ -4,11 +4,11 @@
* Purpose: A container that measures the frequency of the unique elements it contains.
*
* Created: 1st October 2005
- * Updated: 22nd September 2008
+ * Updated: 29th May 2009
*
* Home: http://stlsoft.org/
*
- * Copyright (c) 2005-2008, Matthew Wilson and Synesis Software
+ * Copyright (c) 2005-2009, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -50,9 +50,9 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_STLSOFT_CONTAINERS_HPP_FREQUENCY_MAP_MAJOR 2
-# define STLSOFT_VER_STLSOFT_CONTAINERS_HPP_FREQUENCY_MAP_MINOR 0
-# define STLSOFT_VER_STLSOFT_CONTAINERS_HPP_FREQUENCY_MAP_REVISION 11
-# define STLSOFT_VER_STLSOFT_CONTAINERS_HPP_FREQUENCY_MAP_EDIT 20
+# define STLSOFT_VER_STLSOFT_CONTAINERS_HPP_FREQUENCY_MAP_MINOR 1
+# define STLSOFT_VER_STLSOFT_CONTAINERS_HPP_FREQUENCY_MAP_REVISION 1
+# define STLSOFT_VER_STLSOFT_CONTAINERS_HPP_FREQUENCY_MAP_EDIT 21
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -72,6 +72,9 @@
#ifndef STLSOFT_INCL_STLSOFT_META_HPP_IS_INTEGRAL_TYPE
# include <stlsoft/meta/is_integral_type.hpp>
#endif /* !STLSOFT_INCL_STLSOFT_META_HPP_IS_INTEGRAL_TYPE */
+#ifndef STLSOFT_INCL_STLSOFT_UTIL_HPP_STD_SWAP
+# include <stlsoft/util/std_swap.hpp>
+#endif /* !STLSOFT_INCL_STLSOFT_UTIL_HPP_STD_SWAP */
#ifndef STLSOFT_INCL_MAP
# define STLSOFT_INCL_MAP
@@ -100,14 +103,21 @@ namespace stlsoft
* \param N The count integer type. Defaults to uint32_t
*/
template< ss_typename_param_k T
+#if defined(STLSOFT_COMPILER_IS_MSVC) && \
+ _MSC_VER < 1300
+ , ss_typename_param_k N = unsigned int
+#else
, ss_typename_param_k N = uint32_t
+#endif
>
class frequency_map
: public stl_collection_tag
{
private: /// Member Types
typedef stlsoft_ns_qual_std(map)<T, N> map_type_;
public:
+ /// This type
+ typedef frequency_map<T, N> class_type;
/// The value type
typedef ss_typename_param_k map_type_::value_type value_type;
/// The non-mutating (const) iterator type
@@ -175,6 +185,27 @@ class frequency_map
m_map.clear();
}
+ /// Merges in all entries from the given map
+ class_type& merge(class_type const& rhs)
+ {
+ class_type t(*this);
+
+ { for(const_iterator i = rhs.begin(); i != rhs.end(); ++i)
+ {
+ t.m_map[(*i).first] += (*i).second;
+ }}
+
+ t.swap(*this);
+
+ return *this;
+ }
+
+ /// Swaps the state of the given instance with this instance
+ void swap(class_type& rhs) stlsoft_throw_0()
+ {
+ std_swap(m_map, rhs.m_map);
+ }
+
public: /// Search
/// Returns an iterator for the entry representing the given key, or
/// <code>end()</code> if no such entry exists.
@@ -232,6 +263,24 @@ class frequency_map
map_type_ m_map;
};
+/* /////////////////////////////////////////////////////////////////////////
+ * swapping
+ */
+
+#if !defined(STLSOFT_COMPILER_IS_WATCOM)
+
+template< ss_typename_param_k T
+ , ss_typename_param_k N
+ >
+inline void swap(
+ frequency_map<T, N>& lhs
+, frequency_map<T, N>& rhs
+)
+{
+ lhs.swap(rhs);
+}
+#endif /* compiler */
+
/* /////////////////////////////////////////////////////////////////////////
* Unit-testing
*/
@@ -51,8 +51,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_STLSOFT_ERROR_HPP_ERROR_DESC_MAJOR 1
# define STLSOFT_VER_STLSOFT_ERROR_HPP_ERROR_DESC_MINOR 0
-# define STLSOFT_VER_STLSOFT_ERROR_HPP_ERROR_DESC_REVISION 6
-# define STLSOFT_VER_STLSOFT_ERROR_HPP_ERROR_DESC_EDIT 16
+# define STLSOFT_VER_STLSOFT_ERROR_HPP_ERROR_DESC_REVISION 7
+# define STLSOFT_VER_STLSOFT_ERROR_HPP_ERROR_DESC_EDIT 17
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -272,14 +272,14 @@ class basic_error_desc
/// @{
public:
/// \brief The error description
- char_type const* get_description() const;
+ char_type const* get_description() const stlsoft_throw_0();
/// @}
/// \name Accessors
/// @{
public:
/// \brief The error description
- char_type const* c_str() const;
+ char_type const* c_str() const stlsoft_throw_0();
/// \brief The length of the error description
size_type length() const stlsoft_throw_0();
/// \brief The length of the error description
@@ -394,15 +394,15 @@ inline basic_error_desc<C>::~basic_error_desc() stlsoft_throw_0()
}
template <ss_typename_param_k C>
-inline ss_typename_type_ret_k basic_error_desc<C>::char_type const* basic_error_desc<C>::get_description() const
+inline ss_typename_type_ret_k basic_error_desc<C>::char_type const* basic_error_desc<C>::get_description() const stlsoft_throw_0()
{
static const char_type s_nullMessage[1] = { '\0' };
return (NULL != m_str) ? m_str : s_nullMessage;
}
template <ss_typename_param_k C>
-inline ss_typename_type_ret_k basic_error_desc<C>::char_type const* basic_error_desc<C>::c_str() const
+inline ss_typename_type_ret_k basic_error_desc<C>::char_type const* basic_error_desc<C>::c_str() const stlsoft_throw_0()
{
return get_description();
}
Oops, something went wrong.

0 comments on commit 2647deb

Please sign in to comment.