|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81344 - in sandbox/SOC/2007/quan/boost/quan: . impl
From: pbristow_at_[hidden]
Date: 2012-11-14 11:42:20
Author: pbristow
Date: 2012-11-14 11:42:18 EST (Wed, 14 Nov 2012)
New Revision: 81344
URL: http://svn.boost.org/trac/boost/changeset/81344
Log:
Working OK NetBeans /Windows
Text files modified:
sandbox/SOC/2007/quan/boost/quan/impl/xiostream.ipp | 16 ++++++++--------
sandbox/SOC/2007/quan/boost/quan/meas.hpp | 28 ++++++++++++++--------------
2 files changed, 22 insertions(+), 22 deletions(-)
Modified: sandbox/SOC/2007/quan/boost/quan/impl/xiostream.ipp
==============================================================================
--- sandbox/SOC/2007/quan/boost/quan/impl/xiostream.ipp (original)
+++ sandbox/SOC/2007/quan/boost/quan/impl/xiostream.ipp 2012-11-14 11:42:18 EST (Wed, 14 Nov 2012)
@@ -33,7 +33,7 @@
// equivalent to out << hex << showbase << uppercase ...
std::ios_base& hexbase(std::ios_base& _I)
{
- _I.setf(std::ios_base::hex | std::ios_base::showbase | std::ios_base::uppercase, // setbits,
+ _I.setf(std::ios_base::hex | std::ios_base::showbase | std::ios_base::uppercase, // set bits,
std::ios_base::basefield | std::ios_base::showbase | std::ios_base::uppercase); // mask.
// Care: std::ios_base::basefield); doesn't set showbase & uppercase!
return _I;
@@ -44,7 +44,7 @@
// Usage: omanip<int>setw(int);
template<typename T> class omanip // Manipulator for ostream.
{
- friend std::ostream& operator<< (std::ostream&, const omanip<T>&);
+ // friend std::ostream& operator<< (std::ostream&, const omanip<T>&);
public:
omanip(std::ostream&(*f)(std::ostream&, T), T v) : func(f), val(v)
{
@@ -64,16 +64,15 @@
// where function is std::ostream& _spaces(std::ostream&, int);
// Global ostream applicator using template oapp instantiated for type int,
-// & initialised with the addresss of function with one int parameter.
+// & initialised with the address of function with one int parameter.
// Possible to use oapp<int> spaces(_spaces); which allows << spaces(5) ...
// but instead spaces, stars & chars done a simpler way, see S Teale p 181-3.
-template<class T> class oapp // Applicator for ostream.
+template<typename T> class oapp // Applicator for ostream.
{
public:
oapp(std::ostream&(*f)(std::ostream&, T)) : func(f)
{
};
- // : func(f) {} added from Watcom version to initialise & define.
omanip<T> operator()(T v)
{
return omanip<T>(func, v);
@@ -83,7 +82,7 @@
}; // class oapp
// Template Manipulator Inserter <<
-template<class T> std::ostream& operator<< (std::ostream& os, const omanip<T>& m)
+template<typename T> std::ostream& operator<< (std::ostream& os, const omanip<T>& m)
{
(*m.func)(os, m.val);
return os;
@@ -177,8 +176,9 @@
(
std::ios_base::showbase | std::ios_base::uppercase |
( 16 == s.base ? 1 : // std::ios_base::hex :std::ios_base::oct;
- 8 == s.base ? std::ios_base::oct : std::ios_base::dec) , // default dec if not 8 or 16
- std::ios_base::basefield | std::ios_base::showbase | std::ios_base::uppercase ) // mask
+ 8 == s.base ? std::ios_base::oct : std::ios_base::dec),
+ // default dec if not 8 or 16
+ std::ios_base::basefield | std::ios_base::showbase | std::ios_base::uppercase ) // mask
);
return os;
} // std::ostream& operator<< (std::ostream& os, const setupperbase& s)
Modified: sandbox/SOC/2007/quan/boost/quan/meas.hpp
==============================================================================
--- sandbox/SOC/2007/quan/boost/quan/meas.hpp (original)
+++ sandbox/SOC/2007/quan/boost/quan/meas.hpp 2012-11-14 11:42:18 EST (Wed, 14 Nov 2012)
@@ -1,9 +1,9 @@
-/*! \file
+/*! \file
\brief Class for measurement using uncertain class.
\details class meas with uncertain type UReal and measurement order & time-stamp.
*/
-// meas.hpp
+// meas.hpp
// Copyright Paul A. Bristow 2012
#ifndef MEAS_HPP
@@ -21,7 +21,7 @@
using std::ostream;
using std::istream;
#include <string>
- using std::string; // date notadate(not_a_date_time);
+ using std::string; // not_a_date_time
typedef unc<false> uncun; // Uncertain Uncorrelated (the normal case).
@@ -30,7 +30,7 @@
*/
class Meas : public uncun
-{
+{
friend ostream& operator<< (ostream&, const Meas&);
friend istream& operator>> (istream&, Meas&);
@@ -44,7 +44,7 @@
//Meas(uncun u, string id = "", int o = -1);
Meas(const Meas&); // Copy constructor.
~Meas(); // Default destructor.
-
+
// Operators.
Meas& operator= (const Meas& rhs); //!< Assignment operator.
Meas& abs (const Meas& rhs); // abs assignment operator.
@@ -56,17 +56,17 @@
bool operator> (const Meas& rhs) const; // Used by greater.
Meas operator+ (const Meas&) const // Unary +
{ // All members remain unchanged.
- return *this;
+ return *this;
}
Meas operator- (void) const // Unary -
- { // uncun measValue;
- Meas m(*this); // copy.
+ { // uncun measValue;
+ Meas m(*this); // copy.
m.value(-m.value()); // Negate only the value.
return m;
}
Meas operator- (void) // Unary -
- { // Avoid copy but cannot be const.
- Meas m(*this); // copy.
+ { // Avoid copy but cannot be const.
+ Meas m(*this); // copy.
m.value(-m.value()); // Negate only the value.
return *this;
}
@@ -81,7 +81,7 @@
static bool earlier(const Meas& l, const Meas& r); // < time.
static bool greaterU(const Meas& l, const Meas& r); // > uncertain value.
static bool greater2U(const Meas& l, const Meas& r); // > 2 * uncertain value.
- static bool equal_toUnc(const Meas& l, const Meas& r); //
+ static bool equal_toUnc(const Meas& l, const Meas& r); //
static bool lessAbsM(const Meas& l, const Meas& r); // abs value < abs value.
// Meas Member variables.
@@ -94,12 +94,12 @@
// 3 times, from which order can be calculated,
// or both order and times given, so may need to be checked for consistency.
- int order_; // Index from 0 (or 1 perhaps?) -1 == unknown?
- // time_t m_time; // Time too as time_t, notaTime if not known.
boost::posix_time::ptime time_; // Posix time from Boost.Date_time.
+ int order_; // Index from 0 (or 1 perhaps?) -1 == unknown?
+
}; // class Meas
-// Output and input operator<< & operator>>
+// Output and input operator<< & operator>>
ostream& operator<< (ostream& os, const Meas& m);
istream& operator>> (istream& is, Meas& m);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk