![]() |
|
PhoenixGenerator
3.4.0
Generate code from template files and projects in C++, Rust, Python and wrapped C++ to Python
|
Go to the source code of this file.
Functions | |
| PString | getRustAttributeDefaultValue (const PClassAttribute &attr) |
| Get the Rust literal default value of an attribute, as written into its Default impl. | |
| PString | getRustTestValue (const PClassAttribute &attr) |
| Get a non-default Rust literal value of an attribute, to be used to exercise its setter/getter in generated tests. | |
| PString | getRustType (const PString &varType) |
| Get the Rust type matching a pdata type. | |
| bool | getRustTypeIsCopy (const PString &varType) |
| Say if the Rust type matching a pdata type implements Copy (so getters can return it by value instead of by reference). | |
| PString getRustAttributeDefaultValue | ( | const PClassAttribute & | attr | ) |
Get the Rust literal default value of an attribute, as written into its Default impl.
| attr | : attribute to be checked |
Definition at line 63 of file rust_type_utils.cpp.
References generator_typeIsList(), PClassAttribute::getDefaultValue(), getIsPointerType(), getRustAttributeDefaultValue(), getRustSimpleType(), and PClassAttribute::getType().
Referenced by generator_rust_class_file(), and getRustAttributeDefaultValue().
| PString getRustTestValue | ( | const PClassAttribute & | attr | ) |
Get a non-default Rust literal value of an attribute, to be used to exercise its setter/getter in generated tests.
| attr | : attribute to be checked |
Definition at line 94 of file rust_type_utils.cpp.
References getRustSimpleType(), getRustTestValue(), and PClassAttribute::getType().
Referenced by getRustTestValue(), and RustTraitGetterSetter::testFunction().
| PString getRustType | ( | const PString & | varType | ) |
Get the Rust type matching a pdata type.
| varType | : pdata type to be converted (eg "int", "std::string", "ConfigShadok *", "std::list<int>") |
Definition at line 34 of file rust_type_utils.cpp.
References generator_getListNestedType(), generator_typeIsList(), getIsPointerType(), getRustSimpleType(), and getRustType().
Referenced by generator_rust_class_file(), getRustType(), RustTraitGetterSetter::implMethodDeclaration(), and RustTraitGetterSetter::testFunction().
| bool getRustTypeIsCopy | ( | const PString & | varType | ) |
Say if the Rust type matching a pdata type implements Copy (so getters can return it by value instead of by reference).
| varType | : pdata type to be checked |
Definition at line 53 of file rust_type_utils.cpp.
References generator_typeIsList(), getIsPointerType(), getRustSimpleType(), and getRustTypeIsCopy().
Referenced by getRustTypeIsCopy(), RustTraitGetterSetter::implMethodDeclaration(), and RustTraitGetterSetter::testFunction().