vtkModuleSerialization#
- vtk_module_generate_library_serdes_registrar#
Generate functions that register (de)serialization functions for all classes in a library. module-serialization
vtk_module_generate_library_serdes_registrar( MODULE <module> EXPORT_MACRO_NAME <export_macro_name> EXPORT_FILE_NAME <export_file_name> REGISTRAR_HEADER <registrar_header> REGISTRAR_SOURCE <registrar_source> CLASSES <class>...)
Declares registrar function for
MODULEinREGISTRAR_HEADERand writes implementation of the registrar inREGISTRAR_SOURCE.MODULE: The name of a module.EXPORT_MACRO_NAME: The name of the export macro forMODULE.EXPORT_FILE_NAME: The name of the header file which definesEXPORT_MACRO_NAMEforMODULE.REGISTRAR_HEADER: This file will hold the declaration of registrar function forMODULE.REGISTRAR_SOURCE: This file will contain the implementation of registrar function forMODULE.CLASSES: List of classes that will be registered with (de)serializer in this library.
- vtk_module_generate_libraries_serdes_registrar#
Generate functions that register (de)serialization handlers for a collection of modules. module-serialization
vtk_module_generate_libraries_serdes_registrar( REGISTRAR_NAME <registrar_name> REGISTRAR_SOURCE <registrar_source> [MANDATORY_MODULES <module>...] [OPTIONAL_MODULES <module>...])
Invokes registrar functions for all modules from
OPTIONAL_MODULESandMANDATORY_MODULES. Code is generated inREGISTRAR_SOURCE.REGISTRAR_NAME: The name of the registrar function.REGISTRAR_SOURCE: This file will contain the implementation of registrar function which registers handlers for allMANDATORY_MODULESandOPTIONAL_MODULES.MANDATORY_MODULES: A list ofPUBLICorPRIVATEdependencies of the module whichREGISTRAR_SOURCEis compiled into.OPTIONAL_MODULES: A list of optional dependencies of the module whichREGISTRAR_SOURCEis compiled into.
- _vtk_module_serdes_generate_sources#
Generate (de)serialization functions for classes that belong to
MODULEinSERDES_SOURCES. module-serialization_vtk_module_serdes_generate_sources( MODULE <module> SERIALIZED_CLASSES <serialized_classes> SERDES_SOURCES <serdes_sources>)
MODULE: Generates serialization sources for all classes inMODULESERIALIZED_CLASSES: This variable will contain the list of all classes that were serialized.SERDES_SOURCES: This variable will contain the list of all sources that were generated forSERIALIZED_CLASSESinMODULE.
- vtk_module_serdes#
Generate (de)serialization code for all classes in a
MODULE. module-serializationvtk_module_serdes( MODULE <module> EXPORT_MACRO_NAME <export_macro_name> EXPORT_FILE_NAME <export_file_name> REGISTRAR_HEADER <header> REGISTRAR_SOURCE <source> SERDES_SOURCES <serdes_sources>)
MODULE: The name of a module.EXPORT_MACRO_NAME: The name of the export macro forMODULE.EXPORT_FILE_NAME: The name of the header file which definesEXPORT_MACRO_NAMEforMODULE.REGISTRAR_HEADER: This file will contain declaration of registrar function forMODULE.REGISTRAR_SOURCE: This file will contain implementation of registrar function forMODULE.SERDES_SOURCES: This variable holds the list of generated source files with vtkWrapSerDes for all classes inMODULE.
- vtk_module_add_serdes_wasm_package#
Adds a WebAssembly package that facilitates deserialization of VTK classes in a WASM environment for
MODULE. |module-wrapping-serdes|vtk_module_add_serdes_wasm_package( [ASYNC] MODULE <module> OUTPUT_NAME <output_name> [INSTALL_COMPONENT <install_component>] [INSTALL_DESTINATION <install_destination>] [EXTRA_SOURCES <extra_sources>...] [EXTRA_COMPILE_OPTIONS <extra_compile_options>...] [EXTRA_LINK_OPTIONS <extra_link_options>...])
ASYNC: If specified, the generated package will be linked with -sJSPI=1 flag. The generated package will support asynchronous string-based method calls. This option is required ifMODULEdepends onVTK::RenderingWebGPUto support asynchronous webgpu APIs.MODULE: The name of a module.OUTPUT_NAME: The name of the output file that will be generated. This file will contain the bindings for the WebAssembly module.INSTALL_COMPONENT: Installation component of the install rules created by this function. Defaults toruntime.INSTALL_DESTINATION: The destination directory where the generated WebAssembly package will be installed. Defaults to${CMAKE_INSTALL_BINDIR}.EXTRA_SOURCES: Additional sources that will be compiled into the WebAssembly package. This is useful for adding custom JavaScript wrappers or other C++ sources that are not part of the VTK module but are needed for the WebAssembly package.EXTRA_COMPILE_OPTIONS: Additional compile options that will be passed to the WebAssembly package.EXTRA_LINK_OPTIONS: Additional link options that will be passed to the WebAssembly package.