20 PString name(classConfig.
getName());
22 fs << std::endl << std::endl <<
"\t\t///Get the name of the class " << name;
23 fs << std::endl <<
"\t\t.def_static(\"phoenix_get_type_name\", []() {";
24 fs << std::endl <<
"\t\t\treturn phoenix_getTypeName<" << name <<
">();}, ";
25 fs << std::endl <<
"\t\t\t\"Return the type name of " << name <<
"\")";
31 PString name(classConfig.
getName());
32 PString moduleName = baseFileName.toLower() +
"_module";
33 fs <<
"#Test Phoenix type name retrieval for " << name << std::endl;
34 fs <<
"def test_phoenix_type_name():" << std::endl;
35 fs <<
"\t\"\"\"Test Phoenix type name retrieval\"\"\"" << std::endl;
36 fs <<
"type_name = " << moduleName <<
"." << name <<
".phoenix_get_type_name()" << std::endl;
37 fs <<
"assert type_name == \"" << name <<
"\"" << std::endl << std::endl;
43 fs <<
"\ttest_phoenix_type_name()" << std::endl;
virtual void registerStaticMethod(std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) const
Registration of static method.
virtual void testFunction(std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode, const PString &baseFileName) const
Test function for type stream trait.
virtual void testCallFunction(std::ofstream &fs, const PClassConfig &classConfig, const GeneratorMode &mode) const
call the test function for type stream trait
NanobindTraitTypeStream()
Constructor of NanobindTraitTypeStream.
virtual ~NanobindTraitTypeStream()
Destructor of NanobindTraitTypeStream.
PAbstractNanobindTraitBackend()
Class to describe a basic class.
const PString & getName() const
Returns the class name.
bool enableTypeStream
True to enable type stream interface generator.