<commit_before>#ifndef _CONTEXT_CREATOR_H
#define _CONTEXT_CREATOR_H
#include "ContextCreatorBase.h"
#include "CoreContext.h"
#include <unordered_map>

/// <summary>
/// Implements a foundation class that allows named context registration and augmentation
/// </summary>
/// <param name="contextName">A unique name for this context type</param>
/// <param name="Key">A key type used to identify this context</param>
/// <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
/// ContextCreationListener.
/// </remarks>
template<const char* contextName, class Key>
class ContextCreator:
  public ContextCreatorBase
{
public:
  ContextCreator(void) {
    m_context = CoreContext::CurrentContext();
  }

private:
  typedef std::unordered_map<Key, std::shared_ptr<CoreContext>> t_mpType;
  t_mpType m_mp;

  std::weak_ptr<CoreContext> m_context;

public:
  /// <summary>
  /// Attempts to find a context with the specified key
  /// </summary><commit_msg>Fix Mac build break from std::unordered_map<commit_after>#ifndef _CONTEXT_CREATOR_H
#define _CONTEXT_CREATOR_H
#include "ContextCreatorBase.h"
#include "CoreContext.h"
#include STL_UNORDERED_MAP

/// <summary>
/// Implements a foundation class that allows named context registration and augmentation
/// </summary>
/// <param name="contextName">A unique name for this context type</param>
/// <param name="Key">A key type used to identify this context</param>
/// <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
/// ContextCreationListener.
/// </remarks>
template<const char* contextName, class Key>
class ContextCreator:
  public ContextCreatorBase
{
public:
  ContextCreator(void) {
    m_context = CoreContext::CurrentContext();
  }

private:
  typedef std::unordered_map<Key, std::shared_ptr<CoreContext>> t_mpType;
  t_mpType m_mp;

  std::weak_ptr<CoreContext> m_context;

public:
  /// <summary>
  /// Attempts to find a context with the specified key
  /// </summary>
{'fraction_non_alphanumeric': 0.11051693404634581, 'fraction_numerical': 0.0, 'mean_word_length': 4.58457711442786, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2920757', 'n_tokens_mistral': 640, 'n_tokens_neox': 639, 'n_words': 218}