0032352: Coding Rules - clean up code from compatibility hacks with pre-C++11 compilers Removed usage of std::auto_ptr. opencascade::std workarounds for VS2008 have been dropped, when possible. OCCT_NO_RVALUE_REFERENCE workaround for VS2008 has been removed.
0031918: Application Framework - New binary format for fast reading part of OCAF document Implementation of new format for quick reading and writing parts of the documents (sub-set of labels and sub-set of attributes). It consists in writing shapes and all their contents right in the TNaming_NamedShape attribute placement and skipping the shape section. New format 12 for Binary file types is assigned to this version. Added PCDM_ReaderFilter class that could be used in Open methods of TDocStd_Application. If it is defined, it allows to read: - into already opened document in append mode AppendMode_Protect (do not overwrite existing attributes) or AppendMode_Overwrite - only specified sub-trees of the document using AddPath (const TCollection_AsciiString& theEntryToRead) - only specified attributes using AddRead (const TCollection_AsciiString& theRead) where theRead could be "TDataStd_Name", for example - to skip specified attributes read using AddSkipped (const TCollection_AsciiString& theSkipped) where theSkipped could be "TDF_Reference", for example The current limitations: - only in Bin format - if shapes have in the document shared topology, loaded in "append" mode in different "load" operations, they will have no shared topology anymore Modifications: BinLDrivers and BinDrivers packages - modifications related to the quick part tree format flag usage, skipping shape section writing and adding labels sizes into the document to be able to pass labels during the reading quickly. BinObjMgt_Persistent and BinObjMgt_Position - to add possibility to write directly into the stream some data just after the attribute. Before this record a data-size is recorded. BinMXCAFDoc package modifications to write BinMXCAFDoc_LocationDriver location in the same way as shapes write location data right after the attribute (empty) data in this new format. BinTools package: creation of ShapeReader and ShapeWriter classes with same root class ShapeSetBase with ShapeSet class. These classes allows to write/read shapes directly to the stream. If some object is already in the stream, write a reference - relative position of the duplicated object. The old format of documents is still supported by Bin_ToolsShapeSet class. PCDM_ReaderFilter - Allows the user to create a reading filter. It contains algorithm to browse labels tree quickly, without usage of referencing by entry-strings. TDocStd, CDF and some other packages are changed for supporting reading filters API and options. Tests, documentation and upgrade information are also added for both issues: 31839 and 31918 related to this commit.
0029822: Make TDocStd_Document extensible Two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application to its parent class CDF_Application. In TDocStd_Application these methods remain redefined. These little changes allow creation of a new document only in one virtual method NewDocument(). The methods CreateDocument() in all retrieval drivers are deleted. Modified files: - CDF_Application.hxx and cxx: two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application. The input parameter TDocStd_Document is changed to parent class CDM_Document. - TDocStd_Application.hxx and cxx: redefines new virtual methods NewDocument() and InitDocument() of the parent class CDF_Application. - BinLDrivers_DocumentRetrievalDriver.hxx and cxx, StdLDrivers_DocumentRetrievalDriver.hxx and cxx, XmlLDrivers_DocumentRetrievalDriver.hxx and cxx, PCDM_Reader.hxx: a virtual method CreateDocument() is deleted. - TObj_Application.cxx, XCAFApp_Application.hxx and cxx: down-casting to a descendant class TDocStd_Document is applied. Documentation: - upgrade.md is modified.
0031946: Modeling Data - replace version numbers with enumerations in TopTools and BinTools Added enumerations BinTools_FormatVersion & TopTools_FormatVersion for more clear version tracking in the code. Added new BinTools::Write() & BRepTools::Write() overloaded functions with version & isWithTriangles parameters. Added new "readbrep"/"writebrep" DRAW commands handling reading and writing of both Binary and ASCII .brep formats and providing arguments to setup writing of triangulation data and of format version. "binrestore" is made an alias to new command "readbrep". "binsave" now is an alias to new "writebrep" saving into binary format by default ("writebrep" writes into ASCII format by default).
0029217: Application Framework - nonsense API method XmlLDrivers::SetStorageVersion() 1. Unification of usage of a storage version of an OCAF document by XML and binary file formats. 2. A new format version enumeration in TDocStd package: TDocStd_FormatVersion. 3. Removal of unnecessary methods for storage version like XmlLDrivers::StorageVersion() and BinLDrivers::StorageVersion(). 4. Support of old documents (storage version <= 9) in binary file format (came from ESA). New files: - TDocStd_FormatVersion.hxx: a new storage format version enumeration for an OCAF document. Modified files: - CDM_Document.hxx and cxx: removal of storage format version property (moved to TDocStd_Document). - TDocStd_Document.hxx and cxx: a storage format version property (moved from CDM_Document). - BinLDrivers_DocumentSection.hxx and cxx: support of old document storage version in binary file format. - BinDrivers_DocumentStorageDriver.hxx and cxx, - BinLDrivers_DocumentStorageDriver.hxx and cxx, - BinLDrivers_DocumentRetrievalDriver.cxx, - XmlLDrivers_DocumentRetrievalDriver.cxx, - XmlLDrivers_DocumentStorageDriver.cxx: usage of document storage version from TDocStd_Document in storage and retrieval drivers. - DDocStd_ApplicationCommands.cxx: draw-command name StorageVersion is replaced by StorageFormatVersion (to be the same everywhere). A corresponding script is corrected too. New test: - bugs caf bug29217: a test case for old document storage version in binary file format. It checks several attributes saved by the version TDocStd_FormatVersion_VERSION_7 (old) and the latest version. Modified test: - caf presentation M1: the test used a file in the current folder, not in {imagedir} like all other tests. - bugs caf bug28691 Documentation: - dox/upgrade/upgrade.md // All remarks are fixed.
0031785: [REGRESSION] Application Framework - application crashes on reading XBF document in background thread Class CDF_Session is removed. Integrated previously but not described: 0029195: OCAF - ensure thread safety for different documents. Static local variables are eliminated in PCDM package. Global documents metadata look-up table and directory of opened documents are removed. Look-up table is maintained now as field in instances of the CDM_Application class. Methods providing iteration by components are removed from class CDF_Store; signature of methods returned Standard_ExtString is changed to return Handle(TCollection_HExtendedString). Support of different "Presentations" of documents is eliminated.
0025748: Parallel version of progress indicator Progress indication mechanism is refactored to support incrementing progress within multithreaded algorithms. The class Message_ProgressIndicator is only an interface to the user application. It accumulates the progress provided by progress scopes. The counter is protected by mutex for thread-safety. The new class Message_ProgressScope replacing Message_ProgressSentry should be used to advance the progress. The scopes are nested to each other to reflect the nested nature of operations. The new class Message_ProgressRange should be used to pass the progress to sub-scopes. All OCCT algorithms involving progress indication have been updated to new API. Improvements in Draw_ProgressIndicator: - Separate console mode has been added in order to make possible to put the progress into std::cout instead or in addition to the draw interpreter, instead of trigger option "-tclOutput". - Treatment of Ctrl-Break signal has been added. Now any operation can be aborted by Ctrl-C or Ctrl-Break keystroke. Added new test case 'perf fclasses progr_par' for testing of parallel work of the progress.
0031353: TDocStd_Application does not have api to set progress indicator Add support of Message_ProgressIndicator in BinTools classes. Add support of Message_ProgressIndicator with possibility of user break in methods of opening and saving TDocStd_Application. Add tests of ProgressIndicator in TDocStd_Applacation.
0030895: Coding Rules - specify std namespace explicitly for std::cout and streams "endl" manipulator for Message_Messenger is renamed to "Message_EndLine". The following entities from std namespace are now used with std:: explicitly specified (from Standard_Stream.hxx): std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream, std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr, std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision, std::hex,std::dec.
0026937: Eliminate NO_CXX_EXCEPTION macro support Macro NO_CXX_EXCEPTION was removed from code. Method Raise() was replaced by explicit throw statement. Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer. Method Standard_Failure::Caught() is deprecated now. Eliminated empty constructors. Updated samples. Eliminate empty method ChangeValue from NCollection_Map class. Removed not operable methods from NCollection classes.
0027197: Configuration - fix compilation issues when using mingw AIS_ColorScale, AIS_Dimension - the protected method DrawText() has been renamed to drawText() to avoid name collisions with macros. _MSC_VER/_WIN32 misuse has been fixed in several places. Header <malloc.h> is now included where alloca() is used. Draw_Window - dllimport flag has been dropped from inline methods. TKernel - mandatory dependencies Winspool.lib and Psapi.lib are now linked explicitly (instead of msvc-specific pragma syntax). CMake scripts - the option -std=c++0x has been replaced by -std=gnu++0x for mingw to allow extensions (like _wfopen() and others). The minimum Windows version has been set to _WIN32_WINNT=0x0501. Invalid options "-z defs" and "-lm" have been dropped for mingw. Flag --export-all-symbols has been added to CMAKE_SHARED_LINKER_FLAGS to workaround missing vtable symbols when using mingw. FreeType is now linked explicitly on Windows. Draw::Load() - "lib" suffix is now prepended on mingw as well. Drop redundant declaration of _TINT from OSD_WNT_1.hxx. NCollection_UtfString::FromLocale() - platform-specific code has been moved to .cxx file. Draw_BasicCommands - fixed incorrect mingw64 version macros. genproj, cbp - added workaround for process argument list limits on Windows. TKSTEP linkage is failing on this platform due to too long list of files. The list of object files to link is now stored in dedicated file which is passed to gcc. Option "-z defs" removed from CMake linker options to avoid problems when building with different configurations of VTK on Linux Some MinGW-specific compiler warnings (potentially uninitialized vars, use of NULL, parentheses in conditional expressions) are fixed (speculatively)
0027077: OCAF: Implementation of streaming save/load (OCC26229) is incomplete/incorrect XmlOcaf reading is non-seekable // 1. Read method of XmlLDrivers_DocumentRetrievalDriver extended to read complete document (with "document" tag) in compatible mode (when reading is performed from file) // 2. the empty statement removed // 3. the description of LDOMPARSER::parse method extended
0026961: Recover possibility to read files in old persistence format -- preparation Added basic support for possibility to read filed in old persistent format. Toolkits TKStd, TKStdL, TKShape added to provide necessary tools (to be done). Obsolete interfaces are removed from classes in PCDM and Storage.