.Dd January 12, 2020 .Os libzt 0.3.1 .Dt zt_visitor 3 PRM .Sh NAME .Nm zt_visitor , zt_visitor_vtab .Nd interface for discovering test suites and test cases .Sh SYNOPSIS .In zt.h .Vt typedef struct zt_visitor { ... } zt_visitor; .Bl -column "struct zt_visitor_vtab * " "vtab " Description" .It Sy Type Ta Sy Entry Ta Sy Description .It Vt void * Ta id Ta Object implementing the interface .It Vt struct zt_visitor_vtab * Ta vtab Ta Table of interface functions .El .Sh DESCRIPTION .Nm is an interface for exploring test suites and test cases. The visitor type is used as an argument to all test suites. Test suites can enumerate test cases and other test suites. It is a part of the implementation and is not expected to be implemented by library users. .Pp .Nm zt_visitor_vtab is an opaque type comprised of functions that define the interface. The interface is only used internally so the implementation is private. .Sh IMPLEMENTATION NOTES Interface values combine an object pointer with a function table pointer and are passed by value. .Pp An interface can use the NULL pointer as an object pointer if there is no need to refer to any data specific to an instance. The function table pointer cannot be null as it defines the unique aspect of the implementation. .Sh SEE ALSO .Xr zt_visit_test_case 3 , .Xr zt_visit_test_suite 3 .Sh HISTORY .Nm first appeared in libzt 0.1 .Sh AUTHORS .An "Zygmunt Krynicki" Aq Mt me@zygoon.pl