    

 ## On this page

  

 

 # CustomModelTester Class Reference

 Last update: 16.07.2025 

This class can be used in python context to check if all Interface functions of a custom model are implemented correctly. [More...](class_custom_model_tester.xhtml#details)

## <a name="pub-methods"></a>Public Member Functions

virtual string [\_\_str\_\_](class_custom_model_tester.xhtml#a3031d648b73235d11d64df95db3d84ce) () Function to allow printing instances of this class in python. [More...](#a3031d648b73235d11d64df95db3d84ce)  
 <a id="a3343f987a44114a7ec902f90e3a25085"></a> [CustomModelTester](class_custom_model_tester.xhtml#a3343f987a44114a7ec902f90e3a25085) () Constructor.   
 virtual [deserializeModel](class_custom_model_tester.xhtml#a450f9bf11531eb63544171e8a826b27d) (string state) Function to deserializatize a model from its former state-string. [More...](#a450f9bf11531eb63544171e8a826b27d)  
 virtual string [serializeModel](class_custom_model_tester.xhtml#aa31948651298e7baa48185a94586a3d8) () Function to call the python models serialization function and return its state as a string. [More...](#aa31948651298e7baa48185a94586a3d8)  
 virtual bool [test](class_custom_model_tester.xhtml#a5cd36c1eb84f60075b42c405265d0fc1) ([Matrix](class_matrix.xhtml) points) Tests the model by invoking all of its API functions. Does not perform correctness checks. Just checks if the Interface is callable. [More...](#a5cd36c1eb84f60075b42c405265d0fc1)  
 virtual bool [testSerialization](class_custom_model_tester.xhtml#a63d9add55ef26eefce14e92c7efbd72b) () Tests if the models serialization functions are working. [More...](#a63d9add55ef26eefce14e92c7efbd72b)  
 ## <a name="pub-attribs"></a>Public Attributes

apply SWIGTYPE \* [DISOWN](class_custom_model_tester.xhtml#aa936348f586ed71a2a8585a4b16b20fc) Destructor. [More...](#aa936348f586ed71a2a8585a4b16b20fc)  
 <a id="details" name="details"></a>## Detailed Description

This class can be used in python context to check if all Interface functions of a custom model are implemented correctly.



## Member Function Documentation

<a id="a3031d648b73235d11d64df95db3d84ce"></a>## [◆ ](#a3031d648b73235d11d64df95db3d84ce)\_\_str\_\_()

 virtual string \_\_str\_\_  ( )   virtual 

Function to allow printing instances of this class in python.

ReturnsA string with information on the instance 



<a id="a450f9bf11531eb63544171e8a826b27d"></a>## [◆ ](#a450f9bf11531eb63544171e8a826b27d)deserializeModel()

 virtual deserializeModel  ( string  *state*)   virtual 

Function to deserializatize a model from its former state-string.

Parameters stateEncoded state of the custom model 



<a id="aa31948651298e7baa48185a94586a3d8"></a>## [◆ ](#aa31948651298e7baa48185a94586a3d8)serializeModel()

 virtual string serializeModel  ( )   virtual 

Function to call the python models serialization function and return its state as a string.

ReturnsEncoded state of the custom model 



<a id="a5cd36c1eb84f60075b42c405265d0fc1"></a>## [◆ ](#a5cd36c1eb84f60075b42c405265d0fc1)test()

 virtual bool test  ( [Matrix](class_matrix.xhtml)  *points*)   virtual 

Tests the model by invoking all of its API functions. Does not perform correctness checks. Just checks if the Interface is callable.

Parameters pointsThe points to call the models function with ReturnsTrue iff all API functions are present. 



<a id="a63d9add55ef26eefce14e92c7efbd72b"></a>## [◆ ](#a63d9add55ef26eefce14e92c7efbd72b)testSerialization()

 virtual bool testSerialization  ( )   virtual 

Tests if the models serialization functions are working.

ReturnsTrue iff both serialization and deserialization is working 



## Member Data Documentation

<a id="aa936348f586ed71a2a8585a4b16b20fc"></a>## [◆ ](#aa936348f586ed71a2a8585a4b16b20fc)DISOWN

 apply SWIGTYPE \* DISOWN

**Initial value:**{[CustomModelInterface](struct_custom_model_interface.xhtml "This class provides an API for the CustomModels to be implemented in Python. It is exported as an dir...") * model}



 virtual registerModel([CustomModelInterface](struct_custom_model_interface.xhtml "This class provides an API for the CustomModels to be implemented in Python. It is exported as an dir...") * model)



Destructor.

Internal function for the python classes to interact with the underlying cpp model Should not be called by a user, needs to be public in SWIG context.

Register a custom model with the [CustomModelTester](class_custom_model_tester.xhtml "This class can be used in python context to check if all Interface functions of a custom model are im...") Needs to be called from Python. Takes ownership of the pointer.

Parameters modelThe model to use with the model testercpp\_modelThe C++ wrapper model that can is used to manage the python model