FBB::X2a(3bobcat)

X-to-ASCII conversions
(libbobcat-dev_4.08.03-x.tar.gz)

2005-2018

NAME

FBB::X2a - Objects performing x-to-Ascii conversions

SYNOPSIS

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

DESCRIPTION

FBB:X2a objects convert values of any (insertable) type to text. The returned text is automatically made available as a standard C++ string.

NAMESPACE

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

INHERITS FROM

std::ostringstream

CONSTRUCTORS

The copy constructor is available as well.

STATIC MEMBER FUNCTION

MEMBER FUNCTIONS

All members of std::ostringstream are available, as FBB::X2a inherits from this class. In particular ostringstream::str() can be used to obtain the contents of an X2a object's text buffer.

OVERLOADED OPERATORS

The standard overloaded assignment operator is available as well.

EXAMPLE


    string is(X2a(5));      // initializes `is' with "5"
    string ds(X2a(5.25));   // initializes `ds' with "5.25"

    cout << X2a(7.0 / 3, 4) << endl;
                            // display a value using 4 digits behind the
                            // decimal dot.
    cout << X2a(7.0 / 3, 8, 4) << endl;
                            // display a value over 8 positions, right
                            // adjusted, 4 digits behind the decimal dot.
    cout << X2a(7.0 / 3, 8, 4, std::ios::left) << endl;
                            // display a value over 8 positions, left
                            // adjusted, 4 digits behind the decimal dot.
        

FILES

bobcat/x2a - defines the class interface

SEE ALSO

bobcat(7), a2x(3bobcat)

BUGS

The functionality of this class is to a large extent also offered by the C++ function std::to_string.

DISTRIBUTION 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).