<commit_before>/*
 * libgamelib
 *
 * Copyright (C) 2013 <NAME> <<EMAIL>>
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef GAMELIB_GAMELIB_H
#define GAMELIB_GAMELIB_H 1

#include <gamelib/core/common.h>

#include <gamelib/core/interface.h>

#include <boost/property_tree/ptree_fwd.hpp>

GAMELIB_NAMESPACE_START(client)

/**
 * @interface GameLib gamelib.h <gamelib/client/gamelib.h>
 *
 * Entry type for the gamelib library
 *
 * this interface has to be implemented by the specific Language Frontend. This Interface is not intented for client
 * usage at all. Refer to the specific language frontent API you want to use instead.
 *
 * @author <NAME>
 * @since 0
 */
interface PUBLIC_API GameLib
{
	/**
	 * default destructor
	 *
	 * @author <NAME>
	 * @since 0
	 */
	PUBLIC_API GAMELIB_INTERFACE_DESTRUCTOR(GameLib)
	
	/**
	 * init method for GameLib
	 *
	 * this method should be used to initialize GameLib with default options and configurations. Keep sure, that after 
	 * a call to this method, every other method must be ready to use.
	 *
	 * {@link #setConfig} doesn't have to be called before.
	 *
	 * @author <NAME>
	 * @since 0
	 */
	PUBLIC_API GAMELIB_INTERFACE_METHOD(void init())
	
	/**
	 * shutdown method for GameLib
	 *
	 * clean up GameLib so that it can be reused with a call to {@link #init} again.
	 *
	 * @author <NAME>
	 * @since 0
	 */
	PUBLIC_API GAMELIB_INTERFACE_METHOD(void shutdown())
	
	/**
	 * sets the config of the current GameLib instance
	 *
	 * this method is called usually after it was constructed. It may be called after a shutdown call or to reconfigure
	 * GameLib at runtime.
	 *
	 * It is recommend to store a copy of the passed object to create diff objects, so you can trigger updates only
	 * for changed properties.
	 *
	 * @author <NAME>
	 * @since 0
	 *
	 * @param[in] config the property tree with all the configuration properties.
	 */
	PUBLIC_API GAMELIB_INTERFACE_METHOD(void setConfig(boost::property_tree::ptree& config))
	
	/**
	 * starts the implementation specific event loop
	 *
	 * @author <NAME>
	 * @since 0
	 *
	 * @pre {@link #init} was called
	 * @post blocks the current thread of execution
	 *
	 * @param[in] config the property tree with all the configuration properties.
	 */
	PUBLIC_API GAMELIB_INTERFACE_METHOD(void startEventLoop())
}

/**
 * is used by {@link main()} to get a language specific implementation of {@link GameLib}
 *
 * This method is provided by the language frontend library, not gamelib itself.<commit_msg>client/gamelib: remove setConfig<commit_after>/*
 * libgamelib
 *
 * Copyright (C) 2013 <NAME> <<EMAIL>>
 *
 * 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef GAMELIB_GAMELIB_H
#define GAMELIB_GAMELIB_H 1

#include <gamelib/core/common.h>

#include <gamelib/core/interface.h>

GAMELIB_NAMESPACE_START(client)

/**
 * @interface GameLib gamelib.h <gamelib/client/gamelib.h>
 *
 * Entry type for the gamelib library
 *
 * this interface has to be implemented by the specific Language Frontend. This Interface is not intented for client
 * usage at all. Refer to the specific language frontent API you want to use instead.
 *
 * @author <NAME>
 * @since 0
 */
interface PUBLIC_API GameLib
{
	/**
	 * default destructor
	 *
	 * @author <NAME>
	 * @since 0
	 */
	PUBLIC_API GAMELIB_INTERFACE_DESTRUCTOR(GameLib)
	
	/**
	 * init method for GameLib
	 *
	 * this method should be used to initialize GameLib with default options and configurations. Keep sure, that after 
	 * a call to this method, every other method must be ready to use.
	 *
	 * {@link #setConfig} doesn't have to be called before.
	 *
	 * @author <NAME>
	 * @since 0
	 */
	PUBLIC_API GAMELIB_INTERFACE_METHOD(void init())
	
	/**
	 * shutdown method for GameLib
	 *
	 * clean up GameLib so that it can be reused with a call to {@link #init} again.
	 *
	 * @author <NAME>
	 * @since 0
	 */
	PUBLIC_API GAMELIB_INTERFACE_METHOD(void shutdown())
	
	/**
	 * starts the implementation specific event loop
	 *
	 * @author <NAME>
	 * @since 0
	 *
	 * @pre {@link #init} was called
	 * @post blocks the current thread of execution
	 *
	 * @param[in] config the property tree with all the configuration properties.
	 */
	PUBLIC_API GAMELIB_INTERFACE_METHOD(void startEventLoop())
}

/**
 * is used by {@link main()} to get a language specific implementation of {@link GameLib}
 *
 * This method is provided by the language frontend library, not gamelib itself.
{'fraction_non_alphanumeric': 0.08284633894809212, 'fraction_numerical': 0.00807837744929529, 'mean_word_length': 3.673895582329317, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '1534391', 'n_tokens_mistral': 1806, 'n_tokens_neox': 1665, 'n_words': 732}