Skip to content

Latest commit

 

History

History
52 lines (43 loc) · 1.44 KB

loadInstance.md

File metadata and controls

52 lines (43 loc) · 1.44 KB

Arcade Memo

Project Overview:

This project involves developing game and graphical libraries in C++.

Library Requirements:

  • Each library must include:
    • A load<_>Instance function.
    • The function should return an IGame interface for game libraries or an IGraphic interface for graphical libraries.
    • The load<_>Instance function should take no parameters.

Interface Definitions:

IGame Interface:

class IGame {
public:
    virtual ~IGame() {}
    // Define game-related methods here
};

IGraphic Interface:

class IGraphic {
public:
    virtual ~IGraphic() {}
    // Define graphical-related methods here
};

Example load<_>Instance Function Prototypes:

// Prototype for a game library
extern "C" IGame *loadGameInstance();

// Prototype for a graphical library
extern "C" IGraphic *loadGraphicInstance();

Usage:

  • 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.

Conclusion:

Follow the provided structure and guidelines to develop libraries that conform to the project requirements. Ensure consistency and adherence to the defined interfaces.