CppClass.add_output_stream() documentation and unit tests.
This commit is contained in:
1 parent
3623b67c43
commit
8a890c4875
5 files changed
+23
No files matched your search
@@ -1085,6 +1085,17 @@ public:
|
||||
self.has_trivial_constructor = True
|
||||
|
||||
def add_output_stream_operator(self):
|
||||
"""
|
||||
Add str() support based on C++ output stream operator.
|
||||
|
||||
Calling this method enables wrapping of an assumed to be defined operator function::
|
||||
|
||||
std::ostream & operator << (std::ostream &, MyClass const &);
|
||||
|
||||
The wrapper will be registered as an str() python operator,
|
||||
and will call the C++ operator function to convert the value
|
||||
to a string.
|
||||
"""
|
||||
self.has_output_stream_operator = True
|
||||
|
||||
def add_constructor(self, *args, **kwargs):
|
||||
|
||||
Reference in new issue
Block a user