<commit_before>/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * Copyright Projet JRL-Japan, 2009
 *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 *
 * File:      sotCOMFreezer.h
 * Project:   SOT
 * Author:    <NAME>
 *
 * Version control
 * ===============
 *
 *  $Id$
 *
 * Description
 * ============
 *
 *
 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

#ifndef __SOT_SOTCOMFREEZER_H_H
#define __SOT_SOTCOMFREEZER_H_H

/* --------------------------------------------------------------------- */
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */

/* Matrix */
#include <MatrixAbstractLayer/boost.h>
namespace ml = maal::boost;

/* SOT */
#include <dynamic-graph/entity.h>
#include <dynamic-graph/all-signals.h>
#include <sot-core/sot-core-api.h>

namespace sot {

namespace dg = dynamicgraph;

/* --------------------------------------------------------------------- */
/* --- CLASS ----------------------------------------------------------- */
/* --------------------------------------------------------------------- */

class SOT_CORE_EXPORT CoMFreezer
: public dg::Entity
{
  public:
    static const std::string CLASS_NAME;
    virtual const std::string & getClassName() const { return CLASS_NAME; }

  private:
    ml::Vector m_lastCoM;
    bool m_previousPGInProcess;
    int m_lastStopTime;

  public: /* --- CONSTRUCTION --- */
    CoMFreezer(const std::string & name);
    virtual ~CoMFreezer(void);

  public: /* --- SIGNAL --- */
    dg::SignalPtr<ml::Vector, int> CoMRefSIN;
    dg::SignalPtr<unsigned, int>  PGInProcessSIN;
    dg::SignalTimeDependent<ml::Vector, int> freezedCoMSOUT;

  public: /* --- FUNCTION --- */
    ml::Vector& computeFreezedCoM(ml::Vector & freezedCoM, const int& time);

  public: /* --- PARAMS --- */
    virtual void display(std::ostream & os) const;
};<commit_msg>Revert "com-freezer must use the API of sot-core"<commit_after>/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * Copyright Projet JRL-Japan, 2009
 *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 *
 * File:      sotCOMFreezer.h
 * Project:   SOT
 * Author:    <NAME>
 *
 * Version control
 * ===============
 *
 *  $Id$
 *
 * Description
 * ============
 *
 *
 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

#ifndef __SOT_SOTCOMFREEZER_H_H
#define __SOT_SOTCOMFREEZER_H_H

/* --------------------------------------------------------------------- */
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */

/* Matrix */
#include <MatrixAbstractLayer/boost.h>
namespace ml = maal::boost;

/* SOT */
#include <dynamic-graph/entity.h>
#include <dynamic-graph/all-signals.h>

/* --------------------------------------------------------------------- */
/* --- API ------------------------------------------------------------- */
/* --------------------------------------------------------------------- */

#if defined (WIN32)
#  if defined (com_freezer_EXPORTS)
#    define SOTCOMFREEZER_EXPORT __declspec(dllexport)
#  else
#    define SOTCOMFREEZER_EXPORT __declspec(dllimport)
#  endif
#else
#  define SOTCOMFREEZER_EXPORT
#endif


namespace sot {

namespace dg = dynamicgraph;

/* --------------------------------------------------------------------- */
/* --- CLASS ----------------------------------------------------------- */
/* --------------------------------------------------------------------- */

class SOTCOMFREEZER_EXPORT CoMFreezer
: public dg::Entity
{
  public:
    static const std::string CLASS_NAME;
    virtual const std::string & getClassName() const { return CLASS_NAME; }

  private:
    ml::Vector m_lastCoM;
    bool m_previousPGInProcess;
    int m_lastStopTime;

  public: /* --- CONSTRUCTION --- */
    CoMFreezer(const std::string & name);
    virtual ~CoMFreezer(void);

  public: /* --- SIGNAL --- */
    dg::SignalPtr<ml::Vector, int> CoMRefSIN;
    dg::SignalPtr<unsigned, int>  PGInProcessSIN;
    dg::SignalTimeDependent<ml::Vector, int> freezedCoMSOUT;

  public: /* --- FUNCTION --- */
    ml::Vector& computeFreezedCoM(ml::Vector & freezedCoM, const int& time);

  public: /* --- PARAMS --- */
    virtual void display(std::ostream & os) const;
};
{'fraction_non_alphanumeric': 0.4313149570718482, 'fraction_numerical': 0.0022593764121102574, 'mean_word_length': 1.566376811594203, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, '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': '5370947', 'n_tokens_mistral': 1263, 'n_tokens_neox': 1165, 'n_words': 216}