# HG changeset patch # User Sebastien Jodogne # Date 1604510804 -3600 # Node ID 5b254bd435d32190d7ae949ae89edf68df085293 # Parent 5a3374b6e7072bbdfc0603048bf023c1fd330731 fix for VS2008 diff -r 5a3374b6e707 -r 5b254bd435d3 OrthancFramework/Sources/DicomNetworking/DicomAssociation.cpp --- a/OrthancFramework/Sources/DicomNetworking/DicomAssociation.cpp Wed Nov 04 17:48:11 2020 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/DicomAssociation.cpp Wed Nov 04 18:26:44 2020 +0100 @@ -674,8 +674,8 @@ } { - std::stringstream s; // This is necessary for VS2008 - s << DcmObject::PrintHelper(dataset); + std::stringstream s; // DcmObject::PrintHelper cannot be used with VS2008 + dataset.print(s); OFString str; CLOG(TRACE, DICOM) << "Sending Storage Commitment Report:" << std::endl @@ -837,8 +837,8 @@ } { - std::stringstream s; // This is necessary for VS2008 - s << DcmObject::PrintHelper(dataset); + std::stringstream s; // DcmObject::PrintHelper cannot be used with VS2008 + dataset.print(s); OFString str; CLOG(TRACE, DICOM) << "Sending Storage Commitment Request:" << std::endl diff -r 5a3374b6e707 -r 5b254bd435d3 OrthancFramework/Sources/DicomNetworking/DicomControlUserConnection.cpp --- a/OrthancFramework/Sources/DicomNetworking/DicomControlUserConnection.cpp Wed Nov 04 17:48:11 2020 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/DicomControlUserConnection.cpp Wed Nov 04 18:26:44 2020 +0100 @@ -79,8 +79,8 @@ if (responseIdentifiers != NULL) { - std::stringstream s; // This is necessary for VS2008 - s << DcmObject::PrintHelper(*responseIdentifiers); + std::stringstream s; // DcmObject::PrintHelper cannot be used with VS2008 + responseIdentifiers->print(s); CLOG(TRACE, DICOM) << "Response Identifiers " << responseCount << ":" << std::endl << s.str(); } @@ -283,8 +283,8 @@ #endif { - std::stringstream s; // This is necessary for VS2008 - s << DcmObject::PrintHelper(*dataset); + std::stringstream s; // DcmObject::PrintHelper cannot be used with VS2008 + dataset->print(s); OFString str; CLOG(TRACE, DICOM) << "Sending Find Request:" << std::endl diff -r 5a3374b6e707 -r 5b254bd435d3 OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp --- a/OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp Wed Nov 04 17:48:11 2020 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp Wed Nov 04 18:26:44 2020 +0100 @@ -748,8 +748,8 @@ // detail information, dump this information if (statusDetail != NULL) { - std::stringstream s; // This is necessary for VS2008 - s << DcmObject::PrintHelper(*statusDetail); + std::stringstream s; // DcmObject::PrintHelper cannot be used with VS2008 + statusDetail->print(s); CLOG(TRACE, DICOM) << "Status Detail:" << std::endl << s.str(); delete statusDetail; @@ -1143,8 +1143,8 @@ assert(dataset.get() != NULL); { - std::stringstream s; // This is necessary for VS2008 - s << DcmObject::PrintHelper(*dataset); + std::stringstream s; // DcmObject::PrintHelper cannot be used with VS2008 + dataset->print(s); CLOG(TRACE, DICOM) << "Received Storage Commitment Request:" << std::endl << s.str(); } @@ -1279,8 +1279,8 @@ assert(dataset.get() != NULL); { - std::stringstream s; // This is necessary for VS2008 - s << DcmObject::PrintHelper(*dataset); + std::stringstream s; // DcmObject::PrintHelper cannot be used with VS2008 + dataset->print(s); CLOG(TRACE, DICOM) << "Received Storage Commitment Report:" << std::endl << s.str(); } diff -r 5a3374b6e707 -r 5b254bd435d3 OrthancFramework/Sources/DicomNetworking/Internals/FindScp.cpp --- a/OrthancFramework/Sources/DicomNetworking/Internals/FindScp.cpp Wed Nov 04 17:48:11 2020 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/FindScp.cpp Wed Nov 04 18:26:44 2020 +0100 @@ -212,8 +212,8 @@ if (data.lastRequest_ == NULL) { { - std::stringstream s; // This is necessary for VS2008 - s << DcmObject::PrintHelper(*requestIdentifiers); + std::stringstream s; // DcmObject::PrintHelper cannot be used with VS2008 + requestIdentifiers->print(s); CLOG(TRACE, DICOM) << "Received C-FIND Request:" << std::endl << s.str(); } @@ -331,8 +331,8 @@ if (*responseIdentifiers) { - std::stringstream s; // This is necessary for VS2008 - s << DcmObject::PrintHelper(**responseIdentifiers); + std::stringstream s; // DcmObject::PrintHelper cannot be used with VS2008 + (*responseIdentifiers)->print(s); OFString str; CLOG(TRACE, DICOM) << "Sending C-FIND Response " << responseCount << "/" << data.answers_.GetSize() << ":" << std::endl diff -r 5a3374b6e707 -r 5b254bd435d3 OrthancFramework/Sources/DicomNetworking/Internals/GetScp.cpp --- a/OrthancFramework/Sources/DicomNetworking/Internals/GetScp.cpp Wed Nov 04 17:48:11 2020 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/GetScp.cpp Wed Nov 04 18:26:44 2020 +0100 @@ -205,9 +205,9 @@ if (data.lastRequest_ == NULL) { { - std::stringstream s; // This is necessary for VS2008 - s << DcmObject::PrintHelper(*requestIdentifiers); - /*CLOG(TRACE, DICOM)*/std::cout << "Received C-GET Request:" << std::endl << s.str(); + std::stringstream s; // DcmObject::PrintHelper cannot be used with VS2008 + requestIdentifiers->print(s); + CLOG(TRACE, DICOM) << "Received C-GET Request:" << std::endl << s.str(); } DicomMap input; diff -r 5a3374b6e707 -r 5b254bd435d3 OrthancFramework/Sources/DicomNetworking/Internals/MoveScp.cpp --- a/OrthancFramework/Sources/DicomNetworking/Internals/MoveScp.cpp Wed Nov 04 17:48:11 2020 +0100 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/MoveScp.cpp Wed Nov 04 18:26:44 2020 +0100 @@ -169,8 +169,8 @@ if (data.lastRequest_ == NULL) { { - std::stringstream s; // This is necessary for VS2008 - s << DcmObject::PrintHelper(*requestIdentifiers); + std::stringstream s; // DcmObject::PrintHelper cannot be used with VS2008 + requestIdentifiers->print(s); CLOG(TRACE, DICOM) << "Received C-MOVE Request:" << std::endl << s.str(); } diff -r 5a3374b6e707 -r 5b254bd435d3 OrthancServer/Sources/OrthancGetRequestHandler.cpp --- a/OrthancServer/Sources/OrthancGetRequestHandler.cpp Wed Nov 04 17:48:11 2020 +0100 +++ b/OrthancServer/Sources/OrthancGetRequestHandler.cpp Wed Nov 04 18:26:44 2020 +0100 @@ -400,12 +400,8 @@ if (stDetail.get() != NULL) { - // It is impossible to directly use the "<<" stream construct - // with "DcmObject::PrintHelper" using MSVC2008 - std::stringstream s; - DcmObject::PrintHelper obj(*stDetail); - obj.dcmobj_.print(s); - + std::stringstream s; // DcmObject::PrintHelper cannot be used with VS2008 + stDetail->print(s); CLOG(INFO, DICOM) << " Status Detail: " << s.str(); }