This file is indexed.

/usr/include/polybori/groebner/PairManagerFacade.h is in libpolybori-groebner-dev 0.8.3-3+b2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
// -*- c++ -*-
//*****************************************************************************
/** @file PairManagerFacade.h 
 *
 * @author Michael Brickenstein 
 * @date 2011-06-29 
 *
 * This file includes the definition of the class @c PairManagerFacade which
 * deals as a facade for strategy classes like @c GroebnerStrategy .
 *
 * @par Copyright:
 *   (c) 2006-2010 by The PolyBoRi Team
 *
**/
//*****************************************************************************

#ifndef polybori_groebner_PairManagerFacade_h_
#define polybori_groebner_PairManagerFacade_h_

#include "PairStatusSet.h"


// include basic definitions
#include "groebner_defs.h"
#include "PairManager.h"

BEGIN_NAMESPACE_PBORIGB

/** @class PairManagerWithStrategy
 * @brief This class extends @c PairManager with a reference to a strategy.
 *
 * It defines variants of @c PairManager::cleanTopByChainCriterion() and 
 * @c PairManager::introducePair(pair) with explicit statement of the strategy.
 *
 * @note This is done better in @c PairManagerFacade without storing an
 * additional reference. For now - to keep the interface constant - we continue
 * to allow code like @c strat.pairs.cleanTopByChainCriterion() and
 * @c strat.pairs.introducePair(pair) .
 **/
template <class StrategyType>
class PairManagerWithStrategy:
  public PairManager {

public:
  PairManagerWithStrategy(const PairManager& mgr, StrategyType& strategy):
    PairManager(mgr), m_strategy(strategy) { }

  /// Unhiding the appreciated variant @c cleanTopByChainCriterion(strategy)
  using PairManager::cleanTopByChainCriterion;

  /// @note Deprecated, use @c PairManagerFacade::cleanTopByChainCriterion() instead
  void cleanTopByChainCriterion() { cleanTopByChainCriterion(m_strategy); }

  /// @note Deprecated, use @c PairManagerFacade::introducePair(pair) instead
  void introducePair(const Pair& pair) { introducePair(pair, isHFE()); };

  /// Unhiding the appreciated variant @c introducePair(pair, isHFE)
  using PairManager::introducePair;

protected:
  bool isHFE() const { return m_strategy.optHFE; }

private:
  StrategyType& m_strategy;
};

/** @class PairManagerFacade
 * @brief This class defines a facade for a given Strategy, which
 *
 * @note Use it as an inheritance base for - say - @c NewStrategy like:

class NewStrategy:
  public PairManagerFacade<NewStrategy> {
  // definition of strategy
};

 **/
template <class StrategyType>
class PairManagerFacade {
  typedef PairManagerFacade self;
  typedef StrategyType strategy_type;

public:

  PairManagerFacade(const BoolePolyRing& ring):
    pairs(ring, get()) {}

  PairManagerFacade(const self& rhs):
    pairs(rhs.pairs, get()) { }

  void cleanTopByChainCriterion() { pairs.cleanTopByChainCriterion(get()); }
  void introducePair(const Pair& pair) { pairs.introducePairs(pair, isHFE()); }

  /// For compatibility reasons make this a public member
  PairManagerWithStrategy<strategy_type> pairs;

private:
  bool isHFE() const { return get().optHFE; }
  strategy_type& get() { return static_cast<strategy_type&>(*this); }
};

END_NAMESPACE_PBORIGB

#endif /* polybori_groebner_PairManagerFacade_h_ */