<commit_before>/**
 ** \file object/tag-class.cc
 ** \brief Creation of the URBI object tag.
 */

#include <boost/any.hpp>

#include <object/tag.hh>

#include <object/global.hh>
#include <object/object.hh>
#include <object/string.hh>

#include <runner/call.hh>
#include <runner/runner.hh>

#include <scheduler/tag.hh>

namespace object
{
  Tag::Tag()
    : value_(new scheduler::Tag(SYMBOL()))
  {
    proto_add(proto);
  }

  Tag::Tag(const value_type& value)
    : value_(value)
  {
    proto_add(proto);
  }

  Tag::Tag(rTag model)
    : value_(new scheduler::Tag(model->value_, model->value_->name_get()))
  {
    proto_add(proto);
  }

  const Tag::value_type&
  Tag::value_get() const
  {
    return value_;
  }

  void
  Tag::block(runner::Runner& r, objects_type& args)
  {<commit_msg>When cloning a tag, use it as prototype, not Tag.<commit_after>/**
 ** \file object/tag-class.cc
 ** \brief Creation of the URBI object tag.
 */

#include <boost/any.hpp>

#include <object/tag.hh>

#include <object/global.hh>
#include <object/object.hh>
#include <object/string.hh>

#include <runner/call.hh>
#include <runner/runner.hh>

#include <scheduler/tag.hh>

namespace object
{
  Tag::Tag()
    : value_(new scheduler::Tag(SYMBOL()))
  {
    proto_add(proto);
  }

  Tag::Tag(const value_type& value)
    : value_(value)
  {
    proto_add(proto);
  }

  Tag::Tag(rTag model)
    : value_(new scheduler::Tag(model->value_, model->value_->name_get()))
  {
    proto_add(model);
  }

  const Tag::value_type&
  Tag::value_get() const
  {
    return value_;
  }

  void
  Tag::block(runner::Runner& r, objects_type& args)
  {
{'fraction_non_alphanumeric': 0.1683107274969174, 'fraction_numerical': 0.0, 'mean_word_length': 3.650429799426934, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 25, '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': '462879', 'n_tokens_mistral': 611, 'n_tokens_neox': 597, 'n_words': 117}