<commit_before>/// \file urbi/ustarter.hxx

// This file is part of UObject Component Architecture
// Copyright (c) 2007, 2008 <NAME>.
//
// Permission to use, copy, modify, and redistribute this software for
// non-commercial use is hereby granted.
//
// This software is provided "as is" without warranty of any kind,
// either expressed or implied, including but not limited to the
// implied warranties of fitness for a particular purpose.
//
// For more information, comments, bug reports: http://www.urbiforge.com

#ifndef URBI_STARTER_HXX
# define URBI_STARTER_HXX

# include <algorithm>
# include <string>

# include <libport/containers.hh>

# include <urbi/fwd.hh>
# include <urbi/ustarter.hh>

namespace urbi
{

  /*------------------.
  | baseURBIStarter.  |
  `------------------*/

  inline
  baseURBIStarter::baseURBIStarter(const std::string& name, bool local)
    : name(name)
    , local(local)
  {}

  inline
  baseURBIStarter::~baseURBIStarter()
  {}


  /*--------------.
  | URBIStarter.  |
  `--------------*/
  template <class T>
  inline
  URBIStarter<T>::URBIStarter(const std::string& name, UStartlist& slist, bool local)
    : baseURBIStarter(name, local)
    , slist_(slist)
  {
    slist_.push_back(this);
  }

  template <class T>
  inline
  URBIStarter<T>::~URBIStarter()
  {
    clean();
  }

  template <class T>
  inline
  void
  URBIStarter<T>::clean()
  {
    delete getUObject();
    UStartlist::iterator i = libport::find(slist_, this);
    if (i != slist_.end())
      slist_.erase(i);
  }

  template <class T>
  inline
  void
  URBIStarter<T>::copy(const std::string& objname)
  {
    URBIStarter<T>* ustarter = new URBIStarter<T>(objname, slist_, local);
    ustarter->init(objname);
    UObject* uso = ustarter->object;<commit_msg>Remove an uobject.hh to Boost dependency.<commit_after>/// \file urbi/ustarter.hxx

// This file is part of UObject Component Architecture
// Copyright (c) 2007, 2008 <NAME>.
//
// Permission to use, copy, modify, and redistribute this software for
// non-commercial use is hereby granted.
//
// This software is provided "as is" without warranty of any kind,
// either expressed or implied, including but not limited to the
// implied warranties of fitness for a particular purpose.
//
// For more information, comments, bug reports: http://www.urbiforge.com

#ifndef URBI_STARTER_HXX
# define URBI_STARTER_HXX

# include <algorithm>
# include <string>

# include <urbi/fwd.hh>
# include <urbi/ustarter.hh>

namespace urbi
{

  /*------------------.
  | baseURBIStarter.  |
  `------------------*/

  inline
  baseURBIStarter::baseURBIStarter(const std::string& name, bool local)
    : name(name)
    , local(local)
  {}

  inline
  baseURBIStarter::~baseURBIStarter()
  {}


  /*--------------.
  | URBIStarter.  |
  `--------------*/
  template <class T>
  inline
  URBIStarter<T>::URBIStarter(const std::string& name, UStartlist& slist, bool local)
    : baseURBIStarter(name, local)
    , slist_(slist)
  {
    slist_.push_back(this);
  }

  template <class T>
  inline
  URBIStarter<T>::~URBIStarter()
  {
    clean();
  }

  template <class T>
  inline
  void
  URBIStarter<T>::clean()
  {
    delete getUObject();
    for (UStartlist::iterator i = slist_.begin();
	 i != slist_.end();
	 ++i)
      if (*i == this)
      {
	slist_.erase(i);
	break;
      }
  }

  template <class T>
  inline
  void
  URBIStarter<T>::copy(const std::string& objname)
  {
    URBIStarter<T>* ustarter = new URBIStarter<T>(objname, slist_, local);
    ustarter->init(objname);
    UObject* uso = ustarter->object;
{'fraction_non_alphanumeric': 0.16447552447552446, 'fraction_numerical': 0.0044755244755244755, 'mean_word_length': 2.895424836601307, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2121043', 'n_tokens_mistral': 1271, 'n_tokens_neox': 1212, 'n_words': 306}