<commit_before>// Copyright (c) 2010 - 2013 Leap Motion. All rights reserved. Proprietary and confidential.
#ifndef _CURRENT_CONTEXT_PUSHER_H
#define _CURRENT_CONTEXT_PUSHER_H
#include SHARED_PTR_HEADER

class CoreContext;

/// <summary>
/// Saves the current context and makes the passed one current, and then
/// restores the current context when destroyed
/// </summary>
class CurrentContextPusher
{
  // Copy construction not permitted
  CurrentContextPusher(const CurrentContextPusher& rhs);

public:
  /// <summary>
  /// Saves the current context, to be restored on destruction
  /// </summary>
  CurrentContextPusher(void);

  CurrentContextPusher(std::shared_ptr<CoreContext> pContext);
  CurrentContextPusher(CoreContext* pContext);
  CurrentContextPusher(CurrentContextPusher&& rhs);
  ~CurrentContextPusher(void);

  /// <summary>
  /// Provides the caller with a way to set the prior context current prior to the destruction of this instance
  /// </summary>
  /// <remarks>
  /// This method is idempotent
  /// </remarks>
  void Pop(void);

private:
  std::shared_ptr<CoreContext> m_prior;
};

#endif<commit_msg>Fixing the PIPE capture type<commit_after>// Copyright (c) 2010 - 2013 Leap Motion. All rights reserved. Proprietary and confidential.
#ifndef _CURRENT_CONTEXT_PUSHER_H
#define _CURRENT_CONTEXT_PUSHER_H
#include SHARED_PTR_HEADER

class CoreContext;

/// <summary>
/// Saves the current context and makes the passed one current, and then
/// restores the current context when destroyed
/// </summary>
class CurrentContextPusher
{
  // Copy construction not permitted
  CurrentContextPusher(const CurrentContextPusher& rhs);

public:
  /// <summary>
  /// Saves the current context, to be restored on destruction
  /// </summary>
  CurrentContextPusher(void);

  CurrentContextPusher(std::shared_ptr<CoreContext> pContext);
  CurrentContextPusher(CoreContext* pContext);
  CurrentContextPusher(CurrentContextPusher&& rhs);
  ~CurrentContextPusher(void);

  /// <summary>
  /// Provides the caller with a way to set the prior context current prior to the destruction of this instance
  /// </summary>
  /// <remarks>
  /// This method is idempotent
  /// </remarks>
  void Pop(void);

private:
  std::shared_ptr<CoreContext> m_prior;

public:
  CoreContext* operator->(void) {return m_prior.get();}
};

#endif
{'fraction_non_alphanumeric': 0.10711225364181662, 'fraction_numerical': 0.006855184233076264, 'mean_word_length': 4.294784580498866, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 24, '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': '773059', 'n_tokens_mistral': 699, 'n_tokens_neox': 697, 'n_words': 214}