Fixes to Windows build in liu of the move to using just std::streams.
This commit is contained in:
@@ -42,12 +42,12 @@ DynamicLibrary* DynamicLibrary::loadLibrary(const std::string& libraryName)
|
||||
#ifdef WIN32
|
||||
HANDLE handle = LoadLibrary( fullLibraryName );
|
||||
if (handle) return new DynamicLibrary(libraryName,handle);
|
||||
notify(WARN) << "DynamicLibrary::failed loading "<<fullLibraryName<<endl;
|
||||
notify(WARN) << "DynamicLibrary::failed loading "<<fullLibraryName<<std::endl;
|
||||
#elif !defined(macintosh)
|
||||
HANDLE handle = dlopen( fullLibraryName, RTLD_LAZY );
|
||||
if (handle) return new DynamicLibrary(libraryName,handle);
|
||||
notify(WARN) << "DynamicLibrary::failed loading "<<fullLibraryName<<endl;
|
||||
notify(WARN) << "DynamicLibrary::error "<<dlerror()<<endl;
|
||||
notify(WARN) << "DynamicLibrary::failed loading "<<fullLibraryName<<std::endl;
|
||||
notify(WARN) << "DynamicLibrary::error "<<dlerror()<<std::endl;
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ void FieldReader::_copy(const FieldReader& ic)
|
||||
}
|
||||
|
||||
|
||||
void FieldReader::attach(istream* input)
|
||||
void FieldReader::attach(std::istream* input)
|
||||
{
|
||||
_fin = input;
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ void FieldReaderIterator::_copy(const FieldReaderIterator& ic)
|
||||
}
|
||||
|
||||
|
||||
void FieldReaderIterator::attach(istream* input)
|
||||
void FieldReaderIterator::attach(std::istream* input)
|
||||
{
|
||||
_reader.attach(input);
|
||||
}
|
||||
|
||||
@@ -74,12 +74,12 @@ void osgDB::initFilePath( void )
|
||||
char *ptr;
|
||||
if( (ptr = getenv( "OSGFILEPATH" )) )
|
||||
{
|
||||
notify(DEBUG_INFO) << "osgDB::Init("<<ptr<<")"<<endl;
|
||||
notify(DEBUG_INFO) << "osgDB::Init("<<ptr<<")"<<std::endl;
|
||||
setFilePath( ptr );
|
||||
}
|
||||
else
|
||||
{
|
||||
notify(DEBUG_INFO) << "osgDB::Init(NULL)"<<endl;
|
||||
notify(DEBUG_INFO) << "osgDB::Init(NULL)"<<std::endl;
|
||||
}
|
||||
s_filePathInitialized = true;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ void osgDB::setFilePath( const char *_path )
|
||||
{
|
||||
char buff[1024];
|
||||
|
||||
notify(DEBUG_INFO) << "In osgDB::setFilePath("<<_path<<")"<<endl;
|
||||
notify(DEBUG_INFO) << "In osgDB::setFilePath("<<_path<<")"<<std::endl;
|
||||
|
||||
buff[0] = 0;
|
||||
|
||||
@@ -145,8 +145,8 @@ char *osgDB::findFileInPath( const char *_file, const char * filePath )
|
||||
|
||||
::free(tptr);
|
||||
|
||||
if (path) notify( DEBUG_INFO ) << "FindFileInPath() : returning " << path << endl;
|
||||
else notify( DEBUG_INFO ) << "FindFileInPath() : returning NULL" << endl;
|
||||
if (path) notify( DEBUG_INFO ) << "FindFileInPath() : returning " << path << std::endl;
|
||||
else notify( DEBUG_INFO ) << "FindFileInPath() : returning NULL" << std::endl;
|
||||
|
||||
return path;
|
||||
#endif
|
||||
@@ -263,7 +263,7 @@ char *osgDB::findDSO( const char *name )
|
||||
|
||||
if ((ptr = getenv( "PATH" )))
|
||||
{
|
||||
notify(DEBUG_INFO) << "PATH = "<<ptr<<endl;
|
||||
notify(DEBUG_INFO) << "PATH = "<<ptr<<std::endl;
|
||||
strcat( path, PathDelimitor );
|
||||
strcat( path, ptr );
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace osgDB;
|
||||
|
||||
Output::Output()
|
||||
@@ -19,6 +20,10 @@ Output::Output(const char* name) : ofstream(name)
|
||||
_filename = name;
|
||||
}
|
||||
|
||||
Output::Output(const Output&) : ofstream() {}
|
||||
|
||||
Output& Output::operator = (const Output&) { return *this; }
|
||||
|
||||
Output::~Output()
|
||||
{
|
||||
}
|
||||
@@ -104,13 +109,13 @@ const std::string Output::getFileNameForOutput(const std::string& filename) cons
|
||||
case(FULL_PATH):
|
||||
{
|
||||
// need to think about how best to implement this first...
|
||||
osg::notify(osg::WARN)<<"Warning: Output::getFileNameForOutput() does not support FULL_PATH yet."<<endl;
|
||||
osg::notify(osg::WARN)<<"Warning: Output::getFileNameForOutput() does not support FULL_PATH yet."<< std::endl;
|
||||
return filename;
|
||||
}
|
||||
case(RELATIVE_PATH):
|
||||
{
|
||||
// need to think about how best to implement this as well...
|
||||
osg::notify(osg::WARN)<<"Warning: Output::getFileNameForOutput() does not support RELATIVE_PATH yet."<<endl;
|
||||
osg::notify(osg::WARN)<<"Warning: Output::getFileNameForOutput() does not support RELATIVE_PATH yet."<< std::endl;
|
||||
return filename;
|
||||
}
|
||||
case(FILENAME_ONLY):
|
||||
|
||||
@@ -13,7 +13,7 @@ Object* osgDB::readObjectFile(const std::string& filename)
|
||||
{
|
||||
ReaderWriter::ReadResult rr = Registry::instance()->readObject(filename);
|
||||
if (rr.validObject()) return rr.takeObject();
|
||||
if (rr.error()) notify(WARN) << rr.message() << endl;
|
||||
if (rr.error()) notify(WARN) << rr.message() << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ Image* osgDB::readImageFile(const std::string& filename)
|
||||
{
|
||||
ReaderWriter::ReadResult rr = Registry::instance()->readImage(filename);
|
||||
if (rr.validImage()) return rr.takeImage();
|
||||
if (rr.error()) notify(WARN) << rr.message() << endl;
|
||||
if (rr.error()) notify(WARN) << rr.message() << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,6 @@ Node* osgDB::readNodeFile(const std::string& filename)
|
||||
{
|
||||
ReaderWriter::ReadResult rr = Registry::instance()->readNode(filename);
|
||||
if (rr.validNode()) return rr.takeNode();
|
||||
if (rr.error()) notify(WARN) << rr.message() << endl;
|
||||
if (rr.error()) notify(WARN) << rr.message() << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class RegistryPtr
|
||||
// definition of the Registry
|
||||
Registry::Registry()
|
||||
{
|
||||
notify(INFO) << "Constructing osg::Registry"<<endl;
|
||||
notify(INFO) << "Constructing osg::Registry"<<std::endl;
|
||||
|
||||
_createNodeFromImage = true;
|
||||
_openingLibrary = false;
|
||||
@@ -73,16 +73,16 @@ void Registry::addDotOsgWrapper(DotOsgWrapper* wrapper)
|
||||
{
|
||||
if (wrapper==0L) return;
|
||||
|
||||
if (_openingLibrary) notify(INFO) << "Opening Library : "<<endl;
|
||||
if (_openingLibrary) notify(INFO) << "Opening Library : "<< std::endl;
|
||||
|
||||
notify(INFO) << "osg::Registry::addDotOsgWrapper("<<wrapper->getName()<<")"<<endl;
|
||||
notify(INFO) << "osg::Registry::addDotOsgWrapper("<<wrapper->getName()<<")"<< std::endl;
|
||||
const DotOsgWrapper::Associates& assoc = wrapper->getAssociates();
|
||||
|
||||
for(DotOsgWrapper::Associates::const_iterator itr=assoc.begin();
|
||||
itr!=assoc.end();
|
||||
++itr)
|
||||
{
|
||||
notify(INFO) << " ("<<*itr<<")"<<endl;
|
||||
notify(INFO) << " ("<<*itr<<")"<< std::endl;
|
||||
}
|
||||
|
||||
const std::string& name = wrapper->getName();
|
||||
@@ -111,7 +111,7 @@ void Registry::removeDotOsgWrapper(DotOsgWrapper* wrapper)
|
||||
{
|
||||
if (wrapper==0L) return;
|
||||
|
||||
//// notify(INFO) << "osg::Registry::removeReaderWriter();"<<endl;
|
||||
//// notify(INFO) << "osg::Registry::removeReaderWriter();"<< std::endl;
|
||||
|
||||
EraseMacro(_objectWrapperMap,wrapper);
|
||||
EraseMacro(_classNameWrapperMap,wrapper);
|
||||
@@ -127,9 +127,9 @@ void Registry::addReaderWriter(ReaderWriter* rw)
|
||||
{
|
||||
if (rw==0L) return;
|
||||
|
||||
if (_openingLibrary) notify(INFO) << "Opening Library : "<<endl;
|
||||
if (_openingLibrary) notify(INFO) << "Opening Library : "<< std::endl;
|
||||
|
||||
notify(INFO) << "osg::Registry::addReaderWriter("<<rw->className()<<")"<<endl;
|
||||
notify(INFO) << "osg::Registry::addReaderWriter("<<rw->className()<<")"<< std::endl;
|
||||
|
||||
_rwList.push_back(rw);
|
||||
|
||||
@@ -140,7 +140,7 @@ void Registry::removeReaderWriter(ReaderWriter* rw)
|
||||
{
|
||||
if (rw==0L) return;
|
||||
|
||||
// notify(INFO) << "osg::Registry::removeReaderWriter();"<<endl;
|
||||
// notify(INFO) << "osg::Registry::removeReaderWriter();"<< std::endl;
|
||||
|
||||
ReaderWriterList::iterator rwitr = std::find(_rwList.begin(),_rwList.end(),rw);
|
||||
if (rwitr!=_rwList.end())
|
||||
@@ -260,7 +260,7 @@ osg::Object* Registry::readObjectOfType(const osg::Object& compObj,Input& fr)
|
||||
const osg::Object* proto = wrapper->getPrototype();
|
||||
if (proto==NULL)
|
||||
{
|
||||
osg::notify(osg::WARN)<<"Token "<<fr[0].getStr()<<" read, but has no prototype, cannot load."<<endl;
|
||||
osg::notify(osg::WARN)<<"Token "<<fr[0].getStr()<<" read, but has no prototype, cannot load."<< std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ osg::Object* Registry::readObject(DotOsgWrapperMap& dowMap,Input& fr)
|
||||
const osg::Object* proto = wrapper->getPrototype();
|
||||
if (proto==NULL)
|
||||
{
|
||||
osg::notify(osg::WARN)<<"Token "<<fr[0].getStr()<<" read, but has no prototype, cannot load."<<endl;
|
||||
osg::notify(osg::WARN)<<"Token "<<fr[0].getStr()<<" read, but has no prototype, cannot load."<< std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -497,7 +497,7 @@ bool Registry::writeObject(const osg::Object& obj,Output& fw)
|
||||
std::string uniqueID;
|
||||
if (fw.getUniqueIDForObject(&obj,uniqueID))
|
||||
{
|
||||
fw.indent() << "Use " << uniqueID << endl;
|
||||
fw.indent() << "Use " << uniqueID << std::endl;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -511,7 +511,7 @@ bool Registry::writeObject(const osg::Object& obj,Output& fw)
|
||||
DotOsgWrapper* wrapper = itr->second.get();
|
||||
const DotOsgWrapper::Associates& assoc = wrapper->getAssociates();
|
||||
|
||||
fw.indent() << wrapper->getName() << " {"<<endl;
|
||||
fw.indent() << wrapper->getName() << " {"<< std::endl;
|
||||
fw.moveIn();
|
||||
|
||||
|
||||
@@ -521,7 +521,7 @@ bool Registry::writeObject(const osg::Object& obj,Output& fw)
|
||||
std::string uniqueID;
|
||||
fw.createUniqueIDForObject(&obj,uniqueID);
|
||||
fw.registerUniqueIDForObject(&obj,uniqueID);
|
||||
fw.indent() << "UniqueID " << uniqueID << endl;
|
||||
fw.indent() << "UniqueID " << uniqueID << std::endl;
|
||||
}
|
||||
|
||||
// read the local data by iterating through the associate
|
||||
@@ -542,7 +542,7 @@ bool Registry::writeObject(const osg::Object& obj,Output& fw)
|
||||
}
|
||||
|
||||
fw.moveOut();
|
||||
fw.indent() << "}"<<endl;
|
||||
fw.indent() << "}"<< std::endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -778,7 +778,7 @@ ReaderWriter::ReadResult Registry::readNode(const std::string& fileName)
|
||||
|
||||
// now look for a plug-in to load the file.
|
||||
std::string libraryName = createLibraryNameForFile(fileName);
|
||||
notify(INFO) << "Now checking for plug-in "<<libraryName<<endl;
|
||||
notify(INFO) << "Now checking for plug-in "<<libraryName<< std::endl;
|
||||
if (loadLibrary(libraryName))
|
||||
{
|
||||
for(ReaderWriterList::iterator itr=_rwList.begin();
|
||||
|
||||
@@ -15,7 +15,7 @@ using namespace osgDB;
|
||||
bool osgDB::writeObjectFile(const Object& object,const std::string& filename)
|
||||
{
|
||||
ReaderWriter::WriteResult wr = Registry::instance()->writeObject(object,filename);
|
||||
if (wr.error()) notify(WARN) << wr.message() << endl;
|
||||
if (wr.error()) notify(WARN) << wr.message() << std::endl;
|
||||
return wr.success();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ bool osgDB::writeObjectFile(const Object& object,const std::string& filename)
|
||||
bool osgDB::writeImageFile(const Image& image,const std::string& filename)
|
||||
{
|
||||
ReaderWriter::WriteResult wr = Registry::instance()->writeImage(image,filename);
|
||||
if (wr.error()) notify(WARN) << wr.message() << endl;
|
||||
if (wr.error()) notify(WARN) << wr.message() << std::endl;
|
||||
return wr.success();
|
||||
}
|
||||
|
||||
@@ -31,6 +31,6 @@ bool osgDB::writeImageFile(const Image& image,const std::string& filename)
|
||||
bool osgDB::writeNodeFile(const Node& node,const std::string& filename)
|
||||
{
|
||||
ReaderWriter::WriteResult wr = Registry::instance()->writeNode(node,filename);
|
||||
if (wr.error()) notify(WARN) << wr.message() << endl;
|
||||
if (wr.error()) notify(WARN) << wr.message() << std::endl;
|
||||
return wr.success();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user