std::ios_ba...ent_callback(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

NAME ✨

std::ios_base::event_callback β€” std::ios_base::event_callback. Okay bestie, this is the C++ Standard Libary manual page for it (section 3), and it's literally the typedef for callback functions you can register with register_callback() and get called on specific events. πŸ’…

Synopsis πŸŽ€

typedef void ( *event_callback )( event type, ios_base& ios, int
       index );

So the vibe is: event_callback is the type of function callbacks that can be registered using register_callback() to be called on specific events. No cap.

  • type β€” a value of type ios_base::event that indicates the type of the event that will invoke this callback. It's giving "which event are we in?" energy. 🌈
  • ios β€” the stream object for which the callback is invoked. The manpage says it directly: *this is passed as the argument when callbacks are invoked by std::ios_base and std::basic_ios member functions.
  • index β€” the user-provided value passed to register_callback() when registering the function. It's your little callback tag, iykyk. πŸŽ€

See also πŸ‘‘

  • copyfmt β€” copies formatting information (public member function of std::basic_ios<CharT,Traits>).
  • imbue β€” sets locale (public member function).
  • destructor β€” destructs the object [virtual] (virtual public member function).
  • register_callback β€” registers event callback function (public member function).

source bestie: http://cppreference.com β€” dated 2024.06.10 πŸ’–

πŸ“¦ where this page comes from