FBB::A2x(3bobcat)

Text to X convertor
(libbobcat-dev_6.02.02)

2005-2022

NAME

FBB::A2x - Objects performing ascii-to-x (anything) conversions

SYNOPSIS

#include <bobcat/a2x>
Linking option: -lbobcat

DESCRIPTION

FBB::A2x objects offer the C++ equivalent of the standard C++ string conversion functions like stol, stoul, stod etc. These standard C++ string functions are extremely useful and should probably be preferred over using the members of A2x objects, but A2x offers additional benefits in that it generalizes these functions to any type that can be extracted from a istream objects.

NAMESPACE

FBB
All constructors, members, and operators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

std::istringstream

CONSTRUCTORS

The copy and move constructors are available.

STATIC MEMBER FUNCTION

MEMBER FUNCTION

All members of the istringstream class are available.

OVERLOADED OPERATORS

The overloaded assignment operator is available

EXAMPLE


    int x = A2x("12");

    A2x a2x("12.50");

    double d;

    d = a2x;

    a2x = "err";

    d = a2x;        // d now 0

    a2x = " a";

    char c = a2x;   // c now 'a'

                    // explicit conversion to `double'
    cout << A2x("12.4").to<double>() << endl;
        

FILES

bobcat/a2x - defines the class interface

SEE ALSO

bobcat(7), x2a(3bobcat)

BUGS

None Reported.

BOBCAT PROJECT FILES

BOBCAT

Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.

COPYRIGHT

This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).