Skip to content

Commit

Permalink
Deprecate ContextCreator
Browse files Browse the repository at this point in the history
This type confusingly conflates the idea of context creation with context mapping.  A separate type, ContextMap, already exists to function as a map between a key and a context, and should be preferred.  Users should make use of `CoreContext::Create` or `AutoCreateContext` if they intend to create and manage a keyed set of contexts.
  • Loading branch information
codemercenary committed Feb 20, 2015
1 parent a0403b8 commit 1e2eb40
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion autowiring/ContextCreator.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/// </summary>
/// <param name="Sigil">The sigil type that will be used for created contexts</param>
/// <param name="Key">A key type used to identify this context</param>
/// <obsolete>This class is obsolete, make use of <seealso cref="ContextMap"/> instead</obsolete>
/// <remarks>
/// This class helps manage the creation of contexts with global names. When the new child context
/// is created, a notification is broadcast throughout the entire current context to any registered
Expand All @@ -20,7 +21,7 @@
/// All static member functions are thread-safe, other members are not thread-safe.
/// </remarks>
template<class Sigil, class Key = void>
class ContextCreator:
class ContextCreator :
public ContextCreatorBase
{
protected:
Expand All @@ -32,6 +33,9 @@ class ContextCreator:
typedef Key t_callbackHandle;

public:
DEPRECATED(ContextCreator(void), "This type is deprecated, use manual context creation and ContextMap instead")
{}

// Accessor methods:
size_t GetSize(void) const {return m_contexts.size();}

Expand Down

0 comments on commit 1e2eb40

Please sign in to comment.