Program Listing for File grid_index_map.hpp

Return to documentation for file (rcppsw/ds/graph/grid_index_map.hpp)

#pragma once

/*******************************************************************************
 * Includes
 ******************************************************************************/
#include <map>
#include <functional>

#include "rcppsw/patterns/decorator/decorator.hpp"

/*******************************************************************************
 * Namespaces/Decls
 ******************************************************************************/
namespace rcppsw::ds::graph {

/*******************************************************************************
 * Class Definitions
 ******************************************************************************/
template <typename TGrid,
          typename TVertex,
          typename TCompare = std::less<TGrid>>
class grid_index_map : public rpdecorator::decorator<
  std::map<TGrid, TVertex, TCompare>
  > {
 public:
  using decorator_type = typename rpdecorator::decorator<
   std::map<TGrid, TVertex, TCompare>
   >::decorator_type;
  using decoratee_type = typename decorator_type::decoratee_type;

  using decorator_type::decoratee;

  RCPPSW_DECORATE_CT();

  RCPPSW_DECORATE_DECLDEF(insert);
  RCPPSW_DECORATE_DECLDEF(operator[]);
  RCPPSW_DECORATE_DECLDEF(find, const);
  RCPPSW_DECORATE_DECLDEF(find);
  RCPPSW_DECORATE_DECLDEF(begin);
  RCPPSW_DECORATE_DECLDEF(end);
  RCPPSW_DECORATE_DECLDEF(begin, const);
  RCPPSW_DECORATE_DECLDEF(end, const);
  RCPPSW_DECORATE_DECLDEF(size, const);
};

} /* namespace rcppsw::ds::graph */