XS::Framework::Manual::SVAPI::Io - XS::Framework IO C++ class reference
The Io class is the wrapper around Perls IO* type. As with other type, it might hold an underlying Perl SV* or might not.
Io
IO*
SV*
The Io object does not holds undef; if undef is assigned or supplied in constructor, the object is considered empty. In other words the undef and NULL have the same meaning for the class.
undef
NULL
An IO is a structure which corresponds to a Perl file handles, sockets, pipes, etc, for example *STDOUT{IO}.
IO
*STDOUT{IO}
To create an wrapper around existing IO* the following constructors can be used:
Io (std::nullptr_t = nullptr) Io (SV* sv, bool policy = INCREMENT) Io (GV* sv, bool policy = INCREMENT) Io (IO* sv, bool policy = INCREMENT) Io (const Io& oth) Io (Io&& oth) Io (const Sv& oth) Io (Sv&& oth)
If arguments is undef or NULL, the returned Io object will be empty.
Supported values are
Otherwise, if unappropriate value is supplied, then exception will be thrown.
As with all other SVAPI classes, assigment operators, get, set and dereferencing are supported.
get
set
Returns file descriptor of underlying PerlIO. This method is NULL-unsafe.
Returns the type of underlying PerlIO as per IoTYPE(). This method is NULL-unsafe.
IoTYPE()
To install XS::Framework, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XS::Framework
CPAN shell
perl -MCPAN -e shell install XS::Framework
For more information on module installation, please visit the detailed CPAN module installation guide.