<commit_before>#ifndef CMSPublisher_H
#define CMSPublisher_H

#include "MsgPublisher.h"
#include "MqttPublisher.h"
#ifdef HAVE_ActiveMQ_CPP
#include <activemq/util/Config.h>
#include <cms/Connection.h>
#include <cms/Session.h>
#include <cms/BytesMessage.h>
#include <cms/ExceptionListener.h>
#include <cms/MessageListener.h>
#include <activemq/core/ActiveMQConnectionFactory.h>
#include <decaf/lang/System.h>
#include <activemq/library/ActiveMQCPP.h>
#endif

using namespace activemq::core;
using namespace decaf::util::concurrent;
using namespace decaf::util;
using namespace decaf::lang;
using namespace cms;
using namespace std;

class CMSPublisher : public MsgPublisher {
private:
#ifdef HAVE_ActiveMQ_CPP
    Connection* connection;
    Session* session;
    Destination* destination;
    MessageProducer* producer;
#endif

public:
    CMSPublisher(string brokerUrl, string clientID, string userName, string password)
            : MsgPublisher(brokerUrl, clientID, userName, password) {
        activemq::library::ActiveMQCPP::initializeLibrary();
    }

    virtual void start(bool asyncMode);

    virtual void stop();

    virtual void queueForPublish(string const &destinationName, MqttQOS qos, byte *payload, size_t len);

    virtual void publish(string const &destinationName, MqttQOS qos, byte *payload, size_t len);

    virtual void publish(string const &destinationName, Beacon &beacon);
    // TODO
    virtual void publish(vector<Beacon> events) {}
    virtual void publishStatus(Beacon& beacon) {}

    virtual void publishProperties(string const &destinationName, map<string,string> const &properties);
};
#endif


<commit_msg>Move cms specific namespaces into HAVE_ActiveMQ_CPP section<commit_after>#ifndef CMSPublisher_H
#define CMSPublisher_H

#include "MsgPublisher.h"
#include "MqttPublisher.h"
#ifdef HAVE_ActiveMQ_CPP
#include <activemq/util/Config.h>
#include <cms/Connection.h>
#include <cms/Session.h>
#include <cms/BytesMessage.h>
#include <cms/ExceptionListener.h>
#include <cms/MessageListener.h>
#include <activemq/core/ActiveMQConnectionFactory.h>
#include <decaf/lang/System.h>
#include <activemq/library/ActiveMQCPP.h>
using namespace activemq::core;
using namespace decaf::util::concurrent;
using namespace decaf::util;
using namespace decaf::lang;
using namespace cms;
#endif

using namespace std;

class CMSPublisher : public MsgPublisher {
private:
#ifdef HAVE_ActiveMQ_CPP
    Connection* connection;
    Session* session;
    Destination* destination;
    MessageProducer* producer;
#endif

public:
    CMSPublisher(string brokerUrl, string clientID, string userName, string password)
            : MsgPublisher(brokerUrl, clientID, userName, password) {
        activemq::library::ActiveMQCPP::initializeLibrary();
    }

    virtual void start(bool asyncMode);

    virtual void stop();

    virtual void queueForPublish(string const &destinationName, MqttQOS qos, byte *payload, size_t len);

    virtual void publish(string const &destinationName, MqttQOS qos, byte *payload, size_t len);

    virtual void publish(string const &destinationName, Beacon &beacon);
    // TODO
    virtual void publish(vector<Beacon> events) {}
    virtual void publishStatus(Beacon& beacon) {}

    virtual void publishProperties(string const &destinationName, map<string,string> const &properties);
};
#endif



{'fraction_non_alphanumeric': 0.10113704368641532, 'fraction_numerical': 0.0, 'mean_word_length': 5.3919694072657744, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '7417341', 'n_tokens_mistral': 1048, 'n_tokens_neox': 976, 'n_words': 268}