This project involves developing game and graphical libraries in C++.
- Each library must include:
- A
load<_>Instance
function. - The function should return an
IGame
interface for game libraries or anIGraphic
interface for graphical libraries. - The
load<_>Instance
function should take no parameters.
- A
class IGame {
public:
virtual ~IGame() {}
// Define game-related methods here
};
class IGraphic {
public:
virtual ~IGraphic() {}
// Define graphical-related methods here
};
// Prototype for a game library
extern "C" IGame *loadGameInstance();
// Prototype for a graphical library
extern "C" IGraphic *loadGraphicInstance();
- Ensure that the
load<_>Instance
functions are implemented according to the specified requirements. - Please ensure that the
load<_>Instance
function is called inside your library loader to instantiate the appropriate interface.
// Load the instance of the library
dlsym(lib, "loadGameInstance");
dlsym(lib, "loadGraphicInstance");
this must be called to load the library.
Follow the provided structure and guidelines to develop libraries that conform to the project requirements. Ensure consistency and adherence to the defined interfaces.