MLIR  16.0.0git
Public Member Functions | List of all members
mlir::detail::CallbackOstream Class Reference

A simple raw ostream subclass that forwards write_impl calls to the user-supplied callback together with opaque user-supplied data. More...

#include "mlir/CAPI/Utils.h"

+ Inheritance diagram for mlir::detail::CallbackOstream:
+ Collaboration diagram for mlir::detail::CallbackOstream:

Public Member Functions

 CallbackOstream (std::function< void(MlirStringRef, void *)> callback, void *opaqueData)
 
void write_impl (const char *ptr, size_t size) override
 
uint64_t current_pos () const override
 

Detailed Description

A simple raw ostream subclass that forwards write_impl calls to the user-supplied callback together with opaque user-supplied data.

Definition at line 30 of file Utils.h.

Constructor & Destructor Documentation

◆ CallbackOstream()

mlir::detail::CallbackOstream::CallbackOstream ( std::function< void(MlirStringRef, void *)>  callback,
void opaqueData 
)
inline

Definition at line 32 of file Utils.h.

Member Function Documentation

◆ current_pos()

uint64_t mlir::detail::CallbackOstream::current_pos ( ) const
inlineoverride

Definition at line 43 of file Utils.h.

◆ write_impl()

void mlir::detail::CallbackOstream::write_impl ( const char *  ptr,
size_t  size 
)
inlineoverride

Definition at line 37 of file Utils.h.

References mlirStringRefCreate().


The documentation for this class was generated from the following file: