<commit_before>/*	opendatacon
 *
 *	Copyright (c) 2014:
 *
 *		DCrip3fJguWgVCLrZFfA7sIGgvx1Ou3fHfCxnrz4svAi
 *		yxeOtDhDCXf1Z4ApgXvX5ahqQmzRfJ2DoX8S05SqHA==
 *	
 *	Licensed under the Apache License, Version 2.0 (the "License");
 *	you may not use this file except in compliance with the License.
 *	You may obtain a copy of the License at
 *	
 *		http://www.apache.org/licenses/LICENSE-2.0
 *
 *	Unless required by applicable law or agreed to in writing, software
 *	distributed under the License is distributed on an "AS IS" BASIS,
 *	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *	See the License for the specific language governing permissions and
 *	limitations under the License.
 */ 
/*
 * DataConcentrator.h
 *
 *  Created on: 15/07/2014
 *      Author: <NAME> <<EMAIL>>
 */

#ifndef DATACONCENTRATOR_H_
#define DATACONCENTRATOR_H_

#include <asio.hpp>
#include <unordered_map>
#include <asiodnp3/DNP3Manager.h>
#include <opendatacon/DataPort.h>
#include <opendatacon/ConfigParser.h>

#include "DataConnector.h"
#include "AdvancedLogger.h"
#include "LogToFile.h"

#ifdef WIN32 
const std::string DYNLIBPRE = "";
const std::string DYNLIBEXT = ".dll";
#define DYNLIBLOAD(a) LoadLibraryExA(a, 0, DWORD(0))
#define DYNLIBGETSYM(a,b) GetProcAddress(a, b)
#else
const std::string DYNLIBPRE = "lib";
const std::string DYNLIBEXT = ".so";
#define DYNLIBLOAD(a) dlopen(a, RTLD_LAZY)
#define DYNLIBGETSYM(a,b) dlsym(a, b)
#endif

inline std::string GetLibFileName(const std::string LibName)
{
	return DYNLIBPRE + LibName + DYNLIBEXT;<commit_msg>Added Mac OS dylib preprocessor checks<commit_after>/*	opendatacon
 *
 *	Copyright (c) 2014:
 *
 *		DCrip3fJguWgVCLrZFfA7sIGgvx1Ou3fHfCxnrz4svAi
 *		yxeOtDhDCXf1Z4ApgXvX5ahqQmzRfJ2DoX8S05SqHA==
 *	
 *	Licensed under the Apache License, Version 2.0 (the "License");
 *	you may not use this file except in compliance with the License.
 *	You may obtain a copy of the License at
 *	
 *		http://www.apache.org/licenses/LICENSE-2.0
 *
 *	Unless required by applicable law or agreed to in writing, software
 *	distributed under the License is distributed on an "AS IS" BASIS,
 *	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *	See the License for the specific language governing permissions and
 *	limitations under the License.
 */ 
/*
 * DataConcentrator.h
 *
 *  Created on: 15/07/2014
 *      Author: <NAME> <<EMAIL>>
 */

#ifndef DATACONCENTRATOR_H_
#define DATACONCENTRATOR_H_

#include <asio.hpp>
#include <unordered_map>
#include <asiodnp3/DNP3Manager.h>
#include <opendatacon/DataPort.h>
#include <opendatacon/ConfigParser.h>

#include "DataConnector.h"
#include "AdvancedLogger.h"
#include "LogToFile.h"

#ifdef WIN32 
const std::string DYNLIBPRE = "";
const std::string DYNLIBEXT = ".dll";
#define DYNLIBLOAD(a) LoadLibraryExA(a, 0, DWORD(0))
#define DYNLIBGETSYM(a,b) GetProcAddress(a, b)
#else
const std::string DYNLIBPRE = "lib";
#ifdef __APPLE__
const std::string DYNLIBEXT = ".dylib";
#else
const std::string DYNLIBEXT = ".so";
#endif
#define DYNLIBLOAD(a) dlopen(a, RTLD_LAZY)
#define DYNLIBGETSYM(a,b) dlsym(a, b)
#endif

inline std::string GetLibFileName(const std::string LibName)
{
	return DYNLIBPRE + LibName + DYNLIBEXT;
{'fraction_non_alphanumeric': 0.11190108191653787, 'fraction_numerical': 0.021020092735703245, 'mean_word_length': 5.014869888475836, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6850405', 'n_tokens_mistral': 1283, 'n_tokens_neox': 1225, 'n_words': 326}