<commit_before>/*************************************************************************
 * Copyright (c) 2014 eProsima. All rights reserved.
 *
 * This copy of eProsima Fast RTPS is licensed to you under the terms described in the
 * FASTRTPS_LIBRARY_LICENSE file included in this distribution.
 *
 *************************************************************************/

/**
 * @file EDPSimpleListeners.h
 *
 */

#ifndef EDPSIMPLELISTENER_H_
#define EDPSIMPLELISTENER_H_
#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
#include "../../../reader/ReaderListener.h"

namespace eprosima {
namespace fastrtps{
namespace rtps {

class EDPSimple;
class RTPSReader;
struct CacheChange_t;

/**
 * Class EDPSimplePUBReaderListener, used to define the behavior when a new WriterProxyData is received.
 *@ingroup DISCOVERY_MODULE
 */
class EDPSimplePUBListener:public ReaderListener{
public:
	/**
	Constructor
	* @param p Pointer to the EDPSimple associated with this listener.
	*/
	EDPSimplePUBListener(EDPSimple* p):mp_SEDP(p){};
	virtual ~EDPSimplePUBListener(){};
	/**
	* Virtual method, 
	* @param reader
	* @param change
	*/
	void onNewCacheChangeAdded(RTPSReader* reader,const CacheChange_t* const  change);
	/**
	* Compute the Key from a CacheChange_t
	* @param change Pointer to the change.
	*/
	bool computeKey(CacheChange_t* change);
	//!Pointer to the EDPSimple
	EDPSimple* mp_SEDP;
};
/**
 * Class EDPSimpleSUBReaderListener, used to define the behavior when a new ReaderProxyData is received.
 *@ingroup DISCOVERY_MODULE
 */
class EDPSimpleSUBListener:public ReaderListener{
public:
	/**
	* @param p
	*/
	EDPSimpleSUBListener(EDPSimple* p):mp_SEDP(p){}
<commit_msg>Changed simpleEDPReaderListener to derive from Infectable<commit_after>/*************************************************************************
 * Copyright (c) 2014 eProsima. All rights reserved.
 *
 * This copy of eProsima Fast RTPS is licensed to you under the terms described in the
 * FASTRTPS_LIBRARY_LICENSE file included in this distribution.
 *
 *************************************************************************/

/**
 * @file EDPSimpleListeners.h
 *
 */

#ifndef EDPSIMPLELISTENER_H_
#define EDPSIMPLELISTENER_H_
#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
#include "../../../reader/ReaderListener.h"

namespace eprosima {
namespace fastrtps{
namespace rtps {

class EDPSimple;
class RTPSReader;
struct CacheChange_t;

/**
 * Class EDPSimplePUBReaderListener, used to define the behavior when a new WriterProxyData is received.
 *@ingroup DISCOVERY_MODULE
 */
class EDPSimplePUBListener:public InfectableReaderListener{
public:
	/**
	Constructor
	* @param p Pointer to the EDPSimple associated with this listener.
	*/
	EDPSimplePUBListener(EDPSimple* p):mp_SEDP(p){};
	virtual ~EDPSimplePUBListener(){};
	/**
	* Virtual method, 
	* @param reader
	* @param change
	*/
	void onNewCacheChangeAdded(RTPSReader* reader,const CacheChange_t* const  change);
	/**
	* Compute the Key from a CacheChange_t
	* @param change Pointer to the change.
	*/
	bool computeKey(CacheChange_t* change);
	//!Pointer to the EDPSimple
	EDPSimple* mp_SEDP;
};
/**
 * Class EDPSimpleSUBReaderListener, used to define the behavior when a new ReaderProxyData is received.
 *@ingroup DISCOVERY_MODULE
 */
class EDPSimpleSUBListener:public InfectableReaderListener{
public:
	/**
	* @param p
	*/
	EDPSimpleSUBListener(EDPSimple* p):mp_SEDP(p){}

{'fraction_non_alphanumeric': 0.17324690630524456, 'fraction_numerical': 0.002357100766057749, 'mean_word_length': 5.503831417624521, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5396938', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1031, 'n_words': 289}