<commit_before>/*ckwg +5
 * Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
 * KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
 * Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
 */

#ifndef VISTK_PROCESSES_FLOW_COLLATE_PROCESS_H
#define VISTK_PROCESSES_FLOW_COLLATE_PROCESS_H

#include "flow-config.h"

#include <vistk/pipeline/process.h>

#include <boost/scoped_ptr.hpp>

/**
 * \file collate_process.h
 *
 * \brief Declaration of the collating process.
 */

namespace vistk
{

/**
 * \class collate_process
 *
 * \brief A process which collating input data from multiple input edges.
 *
 * \note Edges for a \portvar{tag} may \em only be connected after the
 * \port{color/\portvar{tag}} is connected to. Before this connection happens,
 * the other ports to not exist and will cause errors. In short: The first
 * connection for any \portvar{tag} must be \port{color/\portvar{tag}}.
 *
 * \process A process for collating data from multiple sources.
 *
 * \iports
 *
 * \iport{color/\portvar{tag}} The color of the result \portvar{tag}.
 * \iport{coll/\portvar{tag}/\portvar{group}} A port to collate data for
 *                                            \portvar{tag} from. Data is
 *                                            collated from ports in
 *                                            ASCII-betical order.
 *
 * \oports
 *
 * \oport{res_\portvar{tag}} The collated result \portvar{tag}.
 *
 * \reqs
 *
 * \req Each input port \port{color/\portvar{tag}} must be connected.
 * \req Each \portvar{tag} must have at least two inputs to collate.
 * \req Each output port \port{res/\portvar{tag}} must be connected.
 *
 * \todo Add configuration to allow forcing a number of inputs for a result.
 * \todo Add configuration to allow same number of sources for all results.
 */
class VISTK_PROCESSES_FLOW_NO_EXPORT collate_process
  : public process
{
  public:
    /**
     * \brief Constructor.
     *
     * \param config Contains config for the process.
     */
    collate_process(config_t const& config);
    /**
     * \brief Destructor.
     */
    ~collate_process();
  protected:
    /**
     * \brief Checks the output port connections and the configuration.
     */
    void _init();

    /**
     * \brief Collate data from the input edges.
     */
    void _step();

    /**
     * \brief Set constraints on the process.
     */
    constraints_t _constraints() const;

    /**
     * \brief Subclass input port information.
     *
     * \param port The port to get information about.
     *
     * \returns Information about an output port.
     */
    port_info_t _input_port_info(port_t const& port);
  private:
    class priv;
    boost::scoped_ptr<priv> d;
};

}

#endif // VISTK_PROCESSES_FLOW_COLLATE_PROCESS_H<commit_msg>Fix a doxygen comment<commit_after>/*ckwg +5
 * Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
 * KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
 * Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
 */

#ifndef VISTK_PROCESSES_FLOW_COLLATE_PROCESS_H
#define VISTK_PROCESSES_FLOW_COLLATE_PROCESS_H

#include "flow-config.h"

#include <vistk/pipeline/process.h>

#include <boost/scoped_ptr.hpp>

/**
 * \file collate_process.h
 *
 * \brief Declaration of the collating process.
 */

namespace vistk
{

/**
 * \class collate_process
 *
 * \brief A process which collating input data from multiple input edges.
 *
 * \note Edges for a \portvar{tag} may \em only be connected after the
 * \port{color/\portvar{tag}} is connected to. Before this connection happens,
 * the other ports to not exist and will cause errors. In short: The first
 * connection for any \portvar{tag} must be \port{color/\portvar{tag}}.
 *
 * \process A process for collating data from multiple sources.
 *
 * \iports
 *
 * \iport{color/\portvar{tag}} The color of the result \portvar{tag}.
 * \iport{coll/\portvar{tag}/\portvar{group}} A port to collate data for
 *                                            \portvar{tag} from. Data is
 *                                            collated from ports in
 *                                            ASCII-betical order.
 *
 * \oports
 *
 * \oport{res_\portvar{tag}} The collated result \portvar{tag}.
 *
 * \reqs
 *
 * \req Each input port \port{color/\portvar{tag}} must be connected.
 * \req Each \portvar{tag} must have at least two inputs to collate.
 * \req Each output port \port{res/\portvar{tag}} must be connected.
 *
 * \todo Add configuration to allow forcing a number of inputs for a result.
 * \todo Add configuration to allow same number of sources for all results.
 */
class VISTK_PROCESSES_FLOW_NO_EXPORT collate_process
  : public process
{
  public:
    /**
     * \brief Constructor.
     *
     * \param config Contains config for the process.
     */
    collate_process(config_t const& config);
    /**
     * \brief Destructor.
     */
    ~collate_process();
  protected:
    /**
     * \brief Checks the output port connections and the configuration.
     */
    void _init();

    /**
     * \brief Collate data from the input edges.
     */
    void _step();

    /**
     * \brief Set constraints on the process.
     */
    constraints_t _constraints() const;

    /**
     * \brief Subclass input port information.
     *
     * \param port The port to get information about.
     *
     * \returns Information about an input port.
     */
    port_info_t _input_port_info(port_t const& port);
  private:
    class priv;
    boost::scoped_ptr<priv> d;
};

}

#endif // VISTK_PROCESSES_FLOW_COLLATE_PROCESS_H
{'fraction_non_alphanumeric': 0.10225457127640689, 'fraction_numerical': 0.004260607136516954, 'mean_word_length': 2.5389447236180906, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1541932', 'n_tokens_mistral': 1761, 'n_tokens_neox': 1710, 'n_words': 558}