Accessing the deserialization constructor
The persistence mechanism is based on the fact that serialization saves the objects' class names, which allows deserialization to instantiate the proper class.
When deserialization takes place, it reads a class name from the input stream and attempts to locate the deserialization constructor for that class. The association between a class name and the constructor is done using the macro IlvRegisterClass(), which is invoked in the different serialization-aware classes header files.
Therefore, if you want an application to be able to create instances of classes by reading data files, you must make sure all the expected classes header files are properly referenced in the application source files.
Published date: 05/24/2022
Last modified date: 02/24/2022