FBB::X2a
Objects performing x-to-Ascii conversions
- Provided by: libbobcat-dev (Version: 3.19.01-1ubuntu1)
- Source: bobcat
- Report a bug
Objects performing x-to-Ascii conversions
#include <bobcat/x2a>
Linking option: -lbobcat
FBB:X2a objects convert values of any (insertable) type to text. The returned text is automatically made available as a standard C++ string.
FBB
All constructors, members, operators and manipulators, mentioned in this
man-page, are defined in the namespace FBB.
std::ostringstream
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.
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.
bobcat/x2a - defines the class interface
None Reported.
Bobcat is an acronym of `Brokken’s Own Base Classes And Templates’.
This is free software, distributed under the terms of the GNU General Public License (GPL).
Frank B. Brokken (f.b.brokken@rug.nl).