<commit_before>// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-

//-----------------------------------------------------------------------------
// FunctorBase.h
// (c) <NAME> 2000
/*
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

    Contact: <EMAIL>, http://geneura.ugr.es
             <EMAIL>
    CVS Info: $Date: 2004-12-01 09:22:48 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/Functor.h,v 1.7 2004-12-01 09:22:48 evomarc Exp $ $Author: evomarc $
 */
//-----------------------------------------------------------------------------

#ifndef _core_library_FunctorBase_h
#define _core_library_FunctorBase_h

#include <functional>

namespace core_library
{

    /** @addtogroup Core
     * @{
     */

    /** Base class for functors to get a nice hierarchy diagram

	That's actually quite an understatement as it does quite a bit more than
	just that. By having all functors derive from the same base class, we can
	do some memory management that would otherwise be very hard.

	The memory management base class is called FunctorStore, and it supports
	a member add() to add a pointer to a functor. When the functorStore is
	destroyed, it will delete all those pointers. So beware: do not delete
	the functorStore before you are done with anything that might have been allocated.

	@see FunctorStore

    */
    class FunctorBase
    {
    public :
	/// virtual dtor here so there is no need to define it in derived classes
	virtual ~FunctorBase() {}

	/// tag to identify a procedure in compile time function selection @see functor_category
	struct procedure_tag {};
	/// tag to identify a unary function in compile time function selection @see functor_category
	struct unary_function_tag {};
	/// tag to identify a binary function in compile time function selection @see functor_category
	struct binary_function_tag {};
    };
    /** @example t-Functor.cpp
     */

    /** @} */

}

#endif // !_core_library_FunctorBase_h
<commit_msg>* FunctorBase: fixed a issue related to tertiary functor<commit_after>// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-

//-----------------------------------------------------------------------------
// FunctorBase.h
// (c) <NAME> 2000
/*
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

    Contact: <EMAIL>, http://geneura.ugr.es
             <EMAIL>
    CVS Info: $Date: 2004-12-01 09:22:48 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/Functor.h,v 1.7 2004-12-01 09:22:48 evomarc Exp $ $Author: evomarc $
 */
//-----------------------------------------------------------------------------

#ifndef _core_library_FunctorBase_h
#define _core_library_FunctorBase_h

#include <functional>

namespace core_library
{

    /** @addtogroup Core
     * @{
     */

    /** Base class for functors to get a nice hierarchy diagram

	That's actually quite an understatement as it does quite a bit more than
	just that. By having all functors derive from the same base class, we can
	do some memory management that would otherwise be very hard.

	The memory management base class is called FunctorStore, and it supports
	a member add() to add a pointer to a functor. When the functorStore is
	destroyed, it will delete all those pointers. So beware: do not delete
	the functorStore before you are done with anything that might have been allocated.

	@see FunctorStore

    */
    class FunctorBase
    {
    public :
	/// virtual dtor here so there is no need to define it in derived classes
	virtual ~FunctorBase() {}

	/// tag to identify a procedure in compile time function selection @see functor_category
	struct procedure_tag {};
	/// tag to identify a unary function in compile time function selection @see functor_category
	struct unary_function_tag {};
	/// tag to identify a binary function in compile time function selection @see functor_category
	struct binary_function_tag {};
	/// tag to identify a tertiary function in compile time function selection @see functor_category
	struct tertiary_function_tag {};
    };
    /** @example t-Functor.cpp
     */

    /** @} */

}

#endif // !_core_library_FunctorBase_h

{'fraction_non_alphanumeric': 0.12669437917946863, 'fraction_numerical': 0.01915778058919212, 'mean_word_length': 2.6528052805280526, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '753212', 'n_tokens_mistral': 1577, 'n_tokens_neox': 1449, 'n_words': 669}