4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief Format inline non-template implementation */
30 #define prefix_ inline
31 ///////////////////////////////cci.p///////////////////////////////////////
33 prefix_ senf::format::eng::eng(float v, float d)
34 : v_ (v), d_ (d), haveWidth_ (false), width_ (0), havePrecision_ (false), precision_ (0),
35 haveFill_ (false), fill_ (' '), mask_ (), flags_ ()
38 prefix_ senf::format::eng const & senf::format::eng::setw(unsigned w)
46 prefix_ senf::format::eng const & senf::format::eng::setprecision(unsigned p)
49 havePrecision_ = true;
54 prefix_ senf::format::eng const & senf::format::eng::setfill(char c)
62 prefix_ senf::format::eng const & senf::format::eng::showbase()
65 mask_ |= std::ios_base::showbase;
66 flags_ |= std::ios_base::showbase;
70 prefix_ senf::format::eng const & senf::format::eng::noshowbase()
73 mask_ |= std::ios_base::showbase;
74 flags_ &= ~std::ios_base::showbase;
78 prefix_ senf::format::eng const & senf::format::eng::showpos()
81 mask_ |= std::ios_base::showpos;
82 flags_ |= std::ios_base::showpos;
86 prefix_ senf::format::eng const & senf::format::eng::noshowpos()
89 mask_ |= std::ios_base::showpos;
90 flags_ &= ~std::ios_base::showpos;
94 prefix_ senf::format::eng const & senf::format::eng::showpoint()
97 mask_ |= std::ios_base::showpoint;
98 flags_ |= std::ios_base::showpoint;
102 prefix_ senf::format::eng const & senf::format::eng::noshowpoint()
105 mask_ |= std::ios_base::showpoint;
106 flags_ &= ~std::ios_base::showpoint;
110 prefix_ senf::format::eng const & senf::format::eng::uppercase()
113 mask_ |= std::ios_base::uppercase;
114 flags_ |= std::ios_base::uppercase;
118 prefix_ senf::format::eng const & senf::format::eng::nouppercase()
121 mask_ |= std::ios_base::uppercase;
122 flags_ &= ~std::ios_base::uppercase;
126 prefix_ senf::format::eng const & senf::format::eng::left()
129 mask_ |= std::ios_base::adjustfield;
130 flags_ &= ~std::ios_base::adjustfield;
131 flags_ |= std::ios_base::left;
135 prefix_ senf::format::eng const & senf::format::eng::internal()
138 mask_ |= std::ios_base::adjustfield;
139 flags_ &= ~std::ios_base::adjustfield;
140 flags_ |= std::ios_base::internal;
144 prefix_ senf::format::eng const & senf::format::eng::right()
147 mask_ |= std::ios_base::adjustfield;
148 flags_ &= ~std::ios_base::adjustfield;
149 flags_ |= std::ios_base::right;
153 prefix_ std::ostream & senf::format::operator<<(std::ostream & os, senf::format::IndentHelper const & indent)
155 for (unsigned int i = 0; i < indent.static_level; ++i)
160 ///////////////////////////////cci.e///////////////////////////////////////
167 // comment-column: 40
168 // c-file-style: "senf"
169 // indent-tabs-mode: nil
170 // ispell-local-dictionary: "american"
171 // compile-command: "scons -u test"