.TH "shevek::istring" 3 "Wed Jul 9 2014" "libshevek" \" -*- nroff -*- .ad l .nh .SH NAME shevek::istring \- .PP \fBshevek::istring\fP is a C++ version of scanf\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBistring\fP ()" .br .RI "\fICreate a new istring with no data\&. \fP" .ti -1c .RI "\fBistring\fP (Glib::ustring const &str)" .br .RI "\fICreate a new istring with data\&. \fP" .ti -1c .RI "void \fBinit\fP (Glib::ustring const &str)" .br .RI "\fISet new data to an existing istring\&. \fP" .ti -1c .RI "void \fBpush\fP ()" .br .RI "\fIPush the current position to the stack so it can be restored later\&. \fP" .ti -1c .RI "int \fBpop\fP (bool keep=false)" .br .RI "\fIPop the last pushed position from the stack\&. \fP" .ti -1c .RI "void \fBreset\fP ()" .br .RI "\fISet the current position to 0, but don't change the stack\&. \fP" .ti -1c .RI "Glib::ustring \fBrest\fP () const " .br .RI "\fIGet remaining string\&. \fP" .ti -1c .RI "void \fBskip\fP (Glib::ustring::size_type p)" .br .RI "\fISkip some characters\&. \fP" .ti -1c .RI "bool \fBoperator()\fP (Glib::ustring const &format)" .br .RI "\fIRead a constant string from the input\&. \fP" .ti -1c .RI "template bool \fBoperator()\fP (Glib::ustring const &format, T1 &arg1)" .br .RI "\fIRead a string containing one argument from the input\&. \fP" .ti -1c .RI "template bool \fBoperator()\fP (Glib::ustring const &format, T1 &arg1, T2 &arg2)" .br .RI "\fIRead a string containing two arguments from the input\&. \fP" .ti -1c .RI "template bool \fBoperator()\fP (Glib::ustring const &format, T1 &arg1, T2 &arg2, T3 &arg3)" .br .RI "\fIRead a string containing three arguments from the input\&. \fP" .ti -1c .RI "template bool \fBoperator()\fP (Glib::ustring const &format, T1 &arg1, T2 &arg2, T3 &arg3, T4 &arg4)" .br .RI "\fIRead a string containing four arguments from the input\&. \fP" .ti -1c .RI "template bool \fBoperator()\fP (Glib::ustring const &format, T1 &arg1, T2 &arg2, T3 &arg3, T4 &arg4, T5 &arg5)" .br .RI "\fIRead a string containing five arguments from the input\&. \fP" .ti -1c .RI "template bool \fBoperator()\fP (Glib::ustring const &format, T1 &arg1, T2 &arg2, T3 &arg3, T4 &arg4, T5 &arg5, T6 &arg6)" .br .RI "\fIRead a string containing six arguments from the input\&. \fP" .ti -1c .RI "template bool \fBoperator()\fP (Glib::ustring const &format, T1 &arg1, T2 &arg2, T3 &arg3, T4 &arg4, T5 &arg5, T6 &arg6, T7 &arg7)" .br .RI "\fIRead a string containing seven arguments from the input\&. \fP" .ti -1c .RI "template bool \fBoperator()\fP (Glib::ustring const &format, T1 &arg1, T2 &arg2, T3 &arg3, T4 &arg4, T5 &arg5, T6 &arg6, T7 &arg7, T8 &arg8)" .br .RI "\fIRead a string containing eight arguments from the input\&. \fP" .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "template static T \fBdirect\fP (Glib::ustring const &data, Glib::ustring const &format, T def=T())" .br .RI "\fIRead a variable from given data and return it\&. \fP" .in -1c .SH "Detailed Description" .PP \fBshevek::istring\fP is a C++ version of scanf\&. It uses templates to allow expanding it to user-defined types, but it still uses a format string to make it better translatable\&. .SH "Member Function Documentation" .PP .SS "template static T shevek::istring::direct (Glib::ustring const &data, Glib::ustring const &format, Tdef = \fCT ()\fP)\fC [inline]\fP, \fC [static]\fP" .PP Read a variable from given data and return it\&. This allows using a \fBshevek::istring\fP in an expression without the need to create a new variable for it\&. If the input doesn't match the format, def is returned\&. .SS "int shevek::istring::pop (boolkeep = \fCfalse\fP)" .PP Pop the last pushed position from the stack\&. If keep is true or not given, the current position is restored to the last position\&. If it is false, the current position is not changed\&. .SH "Author" .PP Generated automatically by Doxygen for libshevek from the source code\&.