<commit_before>/*
 * Copyright (c) 2005, <NAME> and IFS Institute for Software at HSR Rapperswil, Switzerland
 * All rights reserved.
 *
 * This library/application is free software; you can redistribute and/or modify it under the terms of
 * the license that is included with this library/application in the file license.txt.
 */

#ifndef _FirstNonEmptyRenderer_H
#define _FirstNonEmptyRenderer_H

#include "config_renderer.h"
#include "Renderer.h"

//---- FirstNonEmptyRenderer ----------------------------------------------------------
//! <b>Renders the first non-empty slot of the configuration Anything onto the stream</b>
/*! @section FirstNonEmptyRendererDescription
 * The main principle is to render the content of the first indexed configuration slot if its Renderer specification
 * results in a non empty String.
 * @subsection FirstNonEmptyRendererConfiguration FirstNonEmptyRenderer Configuration
\code
{
	/NamedSlot		Rendererspec	optional, gets output if the rendered content is not empty
	"unnamed slot"	Rendererspec	optional, gets output if the rendered content is not empty
	{ some complicated /ContextLookupRenderer whatever  configuration }
	...
}
\endcode
 * @subsection FirstNonEmptyRendererExample FirstNonEmptyRenderer Example<commit_msg>added missing doxygen section text<commit_after>/*
 * Copyright (c) 2005, <NAME> and IFS Institute for Software at HSR Rapperswil, Switzerland
 * All rights reserved.
 *
 * This library/application is free software; you can redistribute and/or modify it under the terms of
 * the license that is included with this library/application in the file license.txt.
 */

#ifndef _FirstNonEmptyRenderer_H
#define _FirstNonEmptyRenderer_H

#include "config_renderer.h"
#include "Renderer.h"

//---- FirstNonEmptyRenderer ----------------------------------------------------------
//! <b>Renders the first non-empty slot of the configuration Anything onto the stream</b>
/*! @section FirstNonEmptyRendererDescription FirstNonEmptyRenderer Description
 * The main principle is to render the content of the first indexed configuration slot if its Renderer specification
 * results in a non empty String.
 * @subsection FirstNonEmptyRendererConfiguration FirstNonEmptyRenderer Configuration
\code
{
	/NamedSlot		Rendererspec	optional, gets output if the rendered content is not empty
	"unnamed slot"	Rendererspec	optional, gets output if the rendered content is not empty
	{ some complicated /ContextLookupRenderer whatever  configuration }
	...
}
\endcode
 * @subsection FirstNonEmptyRendererExample FirstNonEmptyRenderer Example
{'fraction_non_alphanumeric': 0.10383572258814414, 'fraction_numerical': 0.0030995738086013174, 'mean_word_length': 3.9941972920696327, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6027315', 'n_tokens_mistral': 619, 'n_tokens_neox': 614, 'n_words': 267}