October 2023
Intermediate to advanced
216 pages
4h 14m
English
In the previous chapter, we learned how to export a C++ class to Lua as a user-defined type. An instance of the class is exported to Lua to serve as the prototype for the type.
The exercise from the previous chapter required you to create a factory class for the type. However, with that requirement, each type needs its own factory class.
In this chapter, we will learn how to implement a general C++ type exporter so that you can use it as the factory class for any C++ type, without redoing the work.
In this chapter, we will cover the following topics:
Read now
Unlock full access