<commit_before>#include "_mapnik_shield_symbolizer.rb.h"

// Rice
#include <rice/Data_Type.hpp>
#include <rice/Constructor.hpp>
#include <rice/Class.hpp>
#include <rice/Enum.hpp>

// Mapnik
#include <mapnik/text_symbolizer.hpp>  
#include <mapnik/shield_symbolizer.hpp>

Rice::Object get_shield_displacement(const mapnik::shield_symbolizer& t){
  mapnik::position pos = t.get_shield_displacement();
  Rice::Array out;
  out.push(boost::get<0>(pos));
  out.push(boost::get<1>(pos));
  return out;
}

void set_shield_displacement(mapnik::shield_symbolizer & t, Rice::Array ary){
  double x = from_ruby<double>(ary[0]);
  double y = from_ruby<double>(ary[1]);
  
  t.set_shield_displacement(x,y);
}

void register_shield_symbolizer(Rice::Module rb_mapnik){  
  /*
    @@Module_var rb_mapnik = Mapnik
  */
  Rice::Data_Type< mapnik::shield_symbolizer > rb_cshield_symbolizer = Rice::define_class_under< mapnik::shield_symbolizer, mapnik::text_symbolizer >(rb_mapnik, "ShieldSymbolizer");
  rb_cshield_symbolizer.define_constructor(Rice::Constructor< mapnik::shield_symbolizer, mapnik::expression_ptr, std::string, unsigned, mapnik::color, mapnik::path_expression_ptr >());  
  
  rb_cshield_symbolizer.define_method("shield_displacement", &get_shield_displacement);
  rb_cshield_symbolizer.define_method("shield_displacement=", &set_shield_displacement);
  
}<commit_msg>Basic Documentation for shield symbolizer<commit_after>#include "_mapnik_shield_symbolizer.rb.h"

// Rice
#include <rice/Data_Type.hpp>
#include <rice/Constructor.hpp>
#include <rice/Class.hpp>
#include <rice/Enum.hpp>

// Mapnik
#include <mapnik/text_symbolizer.hpp>  
#include <mapnik/shield_symbolizer.hpp>

namespace{

  Rice::Object get_shield_displacement(const mapnik::shield_symbolizer& t){
    mapnik::position pos = t.get_shield_displacement();
    Rice::Array out;
    out.push(boost::get<0>(pos));
    out.push(boost::get<1>(pos));
    return out;
  }

  void set_shield_displacement(mapnik::shield_symbolizer & t, Rice::Array ary){
    double x = from_ruby<double>(ary[0]);
    double y = from_ruby<double>(ary[1]);
    t.set_shield_displacement(x,y);
  }

}
void register_shield_symbolizer(Rice::Module rb_mapnik){  
  /*
    @@Module_var rb_mapnik = Mapnik
  */
  Rice::Data_Type< mapnik::shield_symbolizer > rb_cshield_symbolizer = Rice::define_class_under< mapnik::shield_symbolizer, mapnik::text_symbolizer >(rb_mapnik, "ShieldSymbolizer");
  
  /*
  * Document-method: new
  * call-seq:
  *   new(expression, face_name, size, color, file)
  *
  * @param [Mapnik::Expression] expression
  * @param [String] face_name
  * @param [Integer] size
  * @param [Mapnik::Color] color
  * @param [Mapnik::PathExpression] file
  *
  * @return [Mapnik::ShieldSymbolizer]
  */
  rb_cshield_symbolizer.define_constructor(Rice::Constructor< mapnik::shield_symbolizer, mapnik::expression_ptr, std::string, unsigned, mapnik::color, mapnik::path_expression_ptr >());  
  
  /*
  * Document-method: shield_displacement
  * @return [Array] Two element array [x,y]
  */
  rb_cshield_symbolizer.define_method("shield_displacement", &get_shield_displacement);
  
  /*
  * Document-method: shield_displacement=
  * call-seq:
  *   shield_displacement=(new_displacement)
  * @param [Array] new_displacement Two element array [x,y]
  */
  rb_cshield_symbolizer.define_method("shield_displacement=", &set_shield_displacement);
  
}
{'fraction_non_alphanumeric': 0.1383480825958702, 'fraction_numerical': 0.002359882005899705, 'mean_word_length': 6.0498960498960495, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '4145833', 'n_tokens_mistral': 1226, 'n_tokens_neox': 1181, 'n_words': 181}