Updated OSG so that the old OSG_USE_IO_DOT_H has be removed from all headers

that used it, all references to the Standard C++ stream classes use the
std::ostream etc convention, all references to "using namespace std" and
"using namespace std::ostream etc" have been removed.
This commit is contained in:
Robert Osfield
2001-12-14 21:49:04 +00:00
parent 6070a9e1b1
commit b1f478e5d2
16 changed files with 36 additions and 107 deletions

View File

@@ -9,13 +9,7 @@
#include <osg/Vec3>
#include <osg/Vec4>
#ifdef OSG_USE_IO_DOT_H
#include <iostream.h>
#else
#include <iostream>
using std::ostream;
using std::endl;
#endif
namespace osg {
@@ -277,14 +271,14 @@ inline Vec4 Matrix::operator* (const Vec4& v) const
return postMult(v);
}
inline ostream& operator<< (ostream& os, const Matrix& m )
inline std::ostream& operator<< (std::ostream& os, const Matrix& m )
{
os << "{"<<endl;
os << "{"<<std::endl;
for(int row=0; row<4; ++row) {
os << "\t";
for(int col=0; col<4; ++col)
os << m(row,col) << " ";
os << endl;
os << std::endl;
}
os << "}" << endl;
return os;

View File

@@ -7,19 +7,8 @@
#include <osg/Export>
#ifdef OSG_USE_IO_DOT_H
#include <iostream.h>
#include <fstream.h>
#else
#include <iostream>
#include <fstream>
using std::ostream;
using std::ofstream;
using std::endl;
using std::cout;
using std::cerr;
#endif
namespace osg {
@@ -43,7 +32,7 @@ enum NotifySeverity {
SG_EXPORT extern NotifySeverity g_NotifyLevel;
/** global notify nul stream. added for Mac OSX */
SG_EXPORT extern ofstream *g_NotifyNulStream;
SG_EXPORT extern std::ofstream *g_NotifyNulStream;
/** global notify nul stream. added for Mac OSX */
SG_EXPORT extern bool g_NotifyInit;
@@ -79,19 +68,20 @@ SG_EXPORT extern bool initNotifyLevel();
// previous implementation was causing Mac OSX to misbehave. This version
// places less stress on compiler and runs on Mac
inline ostream& notify(const NotifySeverity severity)
inline std::ostream& notify(const NotifySeverity severity)
{
if (!g_NotifyInit) initNotifyLevel();
if (severity<=g_NotifyLevel)
{
if (severity<=osg::WARN) return cerr;
else return cout;
if (severity<=osg::WARN) return std::cerr;
else return std::cout;
}
return *osg::g_NotifyNulStream;
}
inline ostream& notify(void) { return notify(osg::INFO); }
inline std::ostream& notify(void) { return notify(osg::INFO); }
};
#endif

View File

@@ -7,12 +7,7 @@
#include <osg/Math>
#ifdef OSG_USE_IO_DOT_H
#include <iostream.h>
#else
#include <iostream>
using std::ostream;
#endif
namespace osg {
@@ -152,7 +147,7 @@ class Vec2
return( norm );
}
friend inline ostream& operator << (ostream& output, const Vec2& vec)
friend inline std::ostream& operator << (std::ostream& output, const Vec2& vec)
{
output << vec._v[0] << " "
<< vec._v[1];

View File

@@ -7,12 +7,7 @@
#include <osg/Math>
#ifdef OSG_USE_IO_DOT_H
#include <iostream.h>
#else
#include <iostream>
using std::ostream;
#endif
namespace osg {
@@ -178,7 +173,7 @@ class Vec3
}; // end of class Vec3
inline ostream& operator << (ostream& output, const Vec3& vec)
inline std::ostream& operator << (std::ostream& output, const Vec3& vec)
{
output << vec._v[0] << " "
<< vec._v[1] << " "

View File

@@ -7,12 +7,7 @@
#include <osg/Math>
#ifdef OSG_USE_IO_DOT_H
#include <iostream.h>
#else
#include <iostream>
using std::ostream;
#endif
namespace osg {
@@ -182,7 +177,7 @@ class Vec4
return( norm );
}
friend inline ostream& operator << (ostream& output, const Vec4& vec)
friend inline std::ostream& operator << (std::ostream& output, const Vec4& vec)
{
output << vec._v[0] << " "
<< vec._v[1] << " "

View File

@@ -10,13 +10,7 @@
#include <string.h>
#include <stdlib.h>
#ifdef OSG_USE_IO_DOT_H
#include <iostream.h>
#else
#include <iostream>
using std::istream;
using std::ifstream;
#endif
namespace osgDB {
@@ -32,7 +26,7 @@ class OSGDB_EXPORT FieldReader
virtual FieldReader& operator = (const FieldReader& ic);
void attach(istream* input);
void attach(std::istream* input);
void detach();
virtual bool eof() const;
@@ -51,7 +45,7 @@ class OSGDB_EXPORT FieldReader
void _free();
void _copy(const FieldReader& ic);
istream* _fin;
std::istream* _fin;
bool _eof;
bool findStartOfNextField();

View File

@@ -12,18 +12,13 @@
#include <string>
#include <map>
#ifdef OSG_USE_IO_DOT_H
#include <fstream.h>
#else
#include <fstream>
using std::ofstream;
#endif
namespace osgDB {
/** ofstream wrapper class for adding support for indenting.
Used in output of .osg ASCII files to improve their readability.*/
class OSGDB_EXPORT Output : public ofstream
class OSGDB_EXPORT Output : public std::ofstream
{
public:

View File

@@ -22,14 +22,6 @@
#include <string>
/*
#ifdef OSG_USE_IO_DOT_H
#include <iostream.h>
#else
#include <iostream>
using namespace std;
#endif
*/
namespace osgGLUT{
/** A basic viewer base class which provides a window, simple keyboard and mouse interaction.