// =====================================================================================================================
//  fennec, a free and open source game engine
//  Copyright © 2025 - 2026  Medusa Slockbower
//
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  This program 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 General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <https://www.gnu.org/licenses/>.
// =====================================================================================================================

#ifndef FENNEC_PLATFORM_UNIX_UNIX_PLATFORM_H
#define FENNEC_PLATFORM_UNIX_UNIX_PLATFORM_H

#include <fennec/platform/interface/platform.h>

namespace fennec
{
/// \brief base unix platform for generic unix functionality
class unix_platform : public platform {
// Constructors & Destructor ===========================================================================================
public:

	/// \name Constructors & Destructor
	/// @{

	///
	/// \brief constructor
	explicit unix_platform()
		: platform() {
	}

	/// @}


// Shared Objects ======================================================================================================
public:

	/// \name Shared Objects
	/// @{

	///
	/// \brief shared object linker
	/// \param file the name of the shared object to link
	/// \returns a reference to the shared object
	shared_object* load_object(const cstring& file) override;

	///
	/// \brief shared object release
	/// \param obj the shared object to release
	void unload_object(shared_object* obj) override;

	///
	/// \brief shared object symbol locator
	/// \param obj the shared object to search
	/// \param name the name of the symbol to search for
	/// \returns a reference to the symbol
	symbol find_symbol(shared_object* obj, const cstring& name) override;

	/// @}


// Private Member Variables ============================================================================================
private:


	FENNEC_RTTI_CLASS_ENABLE(platform) {
	}
};

}

#endif // FENNEC_PLATFORM_UNIX_UNIX_PLATFORM_H
