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.
private:
- opencascade::std::shared_ptr<GeomPlate_BuildPlateSurface> myBuilder;
+ std::shared_ptr<GeomPlate_BuildPlateSurface> myBuilder;
BRepFill_SequenceOfEdgeFaceAndOrder myBoundary;
BRepFill_SequenceOfEdgeFaceAndOrder myConstraints;
BRepFill_SequenceOfFaceAndOrder myFreeConstraints;
const Message_ProgressRange& theProgress)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (theFile, std::ios::out);
+ std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (theFile, std::ios::out);
if (aStream.get() == NULL || !aStream->good())
{
return Standard_False;
const Message_ProgressRange& theProgress)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aStream = aFileSystem->OpenIStream (File, std::ios::in);
+ std::shared_ptr<std::istream> aStream = aFileSystem->OpenIStream (File, std::ios::in);
if (aStream.get() == NULL)
{
return Standard_False;
{
const std::pair<int, int> aNode = aQueue.front();
- BVH::Array<T, N>::Append (aQBVH->myMinPointBuffer, BVH::Array<T, N>::Value (this->myMinPointBuffer, opencascade::std::get<0> (aNode)));
- BVH::Array<T, N>::Append (aQBVH->myMaxPointBuffer, BVH::Array<T, N>::Value (this->myMaxPointBuffer, opencascade::std::get<0> (aNode)));
+ BVH::Array<T, N>::Append (aQBVH->myMinPointBuffer, BVH::Array<T, N>::Value (this->myMinPointBuffer, std::get<0> (aNode)));
+ BVH::Array<T, N>::Append (aQBVH->myMaxPointBuffer, BVH::Array<T, N>::Value (this->myMaxPointBuffer, std::get<0> (aNode)));
BVH_Vec4i aNodeInfo;
- if (this->IsOuter (opencascade::std::get<0> (aNode))) // is leaf node
+ if (this->IsOuter (std::get<0> (aNode))) // is leaf node
{
aNodeInfo = BVH_Vec4i (1 /* leaf flag */,
- this->BegPrimitive (opencascade::std::get<0> (aNode)), this->EndPrimitive (opencascade::std::get<0> (aNode)), opencascade::std::get<1> (aNode) /* level */);
+ this->BegPrimitive (std::get<0> (aNode)), this->EndPrimitive (std::get<0> (aNode)), std::get<1> (aNode) /* level */);
}
else
{
NCollection_Vector<int> aGrandChildNodes;
- const int aLftChild = Child<0> (opencascade::std::get<0> (aNode));
- const int aRghChild = Child<1> (opencascade::std::get<0> (aNode));
+ const int aLftChild = Child<0> (std::get<0> (aNode));
+ const int aRghChild = Child<1> (std::get<0> (aNode));
if (this->IsOuter (aLftChild)) // is leaf node
{
aGrandChildNodes.Append (aLftChild);
for (int aNodeIdx = 0; aNodeIdx < aGrandChildNodes.Size(); ++aNodeIdx)
{
- aQueue.push_back (std::make_pair (aGrandChildNodes (aNodeIdx), opencascade::std::get<1> (aNode) + 1));
+ aQueue.push_back (std::make_pair (aGrandChildNodes (aNodeIdx), std::get<1> (aNode) + 1));
}
aNodeInfo = BVH_Vec4i (0 /* inner flag */,
- aNbNodes, aGrandChildNodes.Size() - 1, opencascade::std::get<1> (aNode) /* level */);
+ aNbNodes, aGrandChildNodes.Size() - 1, std::get<1> (aNode) /* level */);
- aQBVH->myDepth = Max (aQBVH->myDepth, opencascade::std::get<1> (aNode) + 1);
+ aQBVH->myDepth = Max (aQBVH->myDepth, std::get<1> (aNode) + 1);
aNbNodes += aGrandChildNodes.Size();
}
if (Size (theArray) == theCount)
{
#ifdef _STD_VECTOR_SHRINK
-
-#if(defined(_MSC_VER) && (_MSC_VER < 1600))
- BVH_ArrayNt aTmpArray(theArray);
- theArray.swap(aTmpArray);
-#else
theArray.shrink_to_fit();
-#endif
-
#endif
}
else
const Message_ProgressRange& theRange)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aFileStream = aFileSystem->OpenIStream (theFileName, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aFileStream = aFileSystem->OpenIStream (theFileName, std::ios::in | std::ios::binary);
if (aFileStream.get() != NULL && aFileStream->good())
{
myFileName = theFileName;
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out | std::ios::binary);
+ std::shared_ptr<std::ostream> aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out | std::ios::binary);
if (aFileStream.get() != NULL && aFileStream->good())
{
const Message_ProgressRange& theRange)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary);
+ std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary);
aStream->precision (15);
if (aStream.get() == NULL || !aStream->good())
return Standard_False;
const Message_ProgressRange& theRange)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aStream = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aStream = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary);
if (aStream.get() == NULL)
{
return Standard_False;
radius = Max(dis, radiusspine);
locfleche = radius*1.e-2; //graphic criterion
-#if (defined(_MSC_VER) && (_MSC_VER < 1600))
- std::auto_ptr<BlendFunc_GenChamfer> pFunc;
- std::auto_ptr<BlendFunc_GenChamfInv> pFInv;
-#else
std::unique_ptr<BlendFunc_GenChamfer> pFunc;
std::unique_ptr<BlendFunc_GenChamfInv> pFInv;
-#endif
if (chsp->Mode() == ChFiDS_ClassicChamfer)
{
pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide));
radius = Max(radius, radiusspine);
locfleche = radius*1.e-2; //graphic criterion
-#if (defined(_MSC_VER) && (_MSC_VER < 1600))
- std::auto_ptr<BlendFunc_GenChamfer> pFunc;
- std::auto_ptr<BlendFunc_GenChamfInv> pFInv;
-#else
std::unique_ptr<BlendFunc_GenChamfer> pFunc;
std::unique_ptr<BlendFunc_GenChamfInv> pFInv;
-#endif
if (chsp->Mode() == ChFiDS_ClassicChamfer)
{
pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide));
Standard_Real dis;
chsp->GetDist(dis);
-#if (defined(_MSC_VER) && (_MSC_VER < 1600))
- std::auto_ptr<BlendFunc_GenChamfer> pFunc;
-#else
std::unique_ptr<BlendFunc_GenChamfer> pFunc;
-#endif
if (chsp->Mode() == ChFiDS_ClassicChamfer)
{
pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide));
Standard_Real dis1, dis2;
chsp->Dists(dis1, dis2);
-#if (defined(_MSC_VER) && (_MSC_VER < 1600))
- std::auto_ptr<BlendFunc_GenChamfer> pFunc;
-#else
std::unique_ptr<BlendFunc_GenChamfer> pFunc;
-#endif
if (chsp->Mode() == ChFiDS_ClassicChamfer)
{
pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide));
if (chsp->IsChamfer() == ChFiDS_Sym) {
-#if (defined(_MSC_VER) && (_MSC_VER < 1600))
- std::auto_ptr<BlendFunc_GenChamfer> pFunc;
- std::auto_ptr<BlendFunc_GenChamfInv> pFInv;
-#else
std::unique_ptr<BlendFunc_GenChamfer> pFunc;
std::unique_ptr<BlendFunc_GenChamfInv> pFInv;
-#endif
if (chsp->Mode() == ChFiDS_ClassicChamfer)
{
pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide));
Standard_Real d1, d2;
chsp->Dists(d1,d2);
-#if (defined(_MSC_VER) && (_MSC_VER < 1600))
- std::auto_ptr<BlendFunc_GenChamfer> pFunc;
- std::auto_ptr<BlendFunc_GenChamfInv> pFInv;
-#else
std::unique_ptr<BlendFunc_GenChamfer> pFunc;
std::unique_ptr<BlendFunc_GenChamfInv> pFInv;
-#endif
if (chsp->Mode() == ChFiDS_ClassicChamfer)
{
pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide));
{
// probe file header to recognize format
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (aFileName, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (aFileName, std::ios::in | std::ios::binary);
if (aFile.get() == NULL)
{
theDI << "Error: cannot read the file '" << aFileName << "'";
if (anUseStream)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aFileStream = aFileSystem->OpenIStream (path, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aFileStream = aFileSystem->OpenIStream (path, std::ios::in | std::ios::binary);
theStatus = A->Open (*aFileStream, D, aFilter, aProgress->Start());
}
if (anUseStream)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aFileStream = aFileSystem->OpenOStream (path, std::ios::out | std::ios::binary);
+ std::shared_ptr<std::ostream> aFileStream = aFileSystem->OpenOStream (path, std::ios::out | std::ios::binary);
theStatus = A->SaveAs (D, *aFileStream, aProgress->Start());
}
else
const char* aName = theArgVec[2];
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (aName, std::ios::out);
+ std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (aName, std::ios::out);
aStream->precision (15);
if (aStream.get() == NULL || !aStream->good())
{
const char* aVarName = theArgVec[2];
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aStream = aFileSystem->OpenIStream (aFileName, std::ios::in);
+ std::shared_ptr<std::istream> aStream = aFileSystem->OpenIStream (aFileName, std::ios::in);
if (aStream.get() == NULL)
{
theDI << "Error: cannot open file for reading: '" << aFileName << "'";
(const Standard_CString file, const Standard_Boolean fnes)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (file, std::ios::out);
+ std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (file, std::ios::out);
if (aStream.get() == NULL)
{
return Standard_False;
if (igesmod.IsNull() || prot.IsNull()) return Standard_False;
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out);
+ std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out);
if (aStream.get() == NULL)
{
ctx.CCheck(0)->AddFail("IGES File could not be created");
const int64_t theFileOffset)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary);
char aHeader[128] = {};
if (aFile.get() == NULL || !aFile->good())
{
}
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (thePath, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (thePath, std::ios::in | std::ios::binary);
if (aFile.get() == NULL)
{
Message::SendFail (TCollection_AsciiString ("Error: Image file '") + thePath + "' cannot be opened");
else
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary);
if (aFileIn.get() == NULL)
{
Message::SendFail (TCollection_AsciiString ("Error: Unable to open file '") + myImagePath + "'");
Standard_Boolean Image_Texture::WriteImage (const TCollection_AsciiString& theFile)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aFileOut = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary | std::ios::trunc);
+ std::shared_ptr<std::ostream> aFileOut = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary | std::ios::trunc);
if (aFileOut.get() == NULL)
{
Message::SendFail (TCollection_AsciiString ("Error: Unable to create file '") + theFile + "'");
}
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary);
if (aFileIn.get() == NULL)
{
Message::SendFail (TCollection_AsciiString ("Error: Unable to open file ") + myImagePath + "!");
Standard_Boolean IsIntCSdone = Standard_False;
TColStd_SequenceOfReal Params;
-#if (defined(_MSC_VER) && (_MSC_VER < 1600))
- std::auto_ptr<math_FunctionAllRoots> pSol;
-#else
std::unique_ptr<math_FunctionAllRoots> pSol;
-#endif
math_FunctionSample Echant(Pdeb,Pfin,NbEchant);
}
} //for (;;)
}
+
//=======================================================================
-//function : Destroy
-//purpose :
+//function : ~IntTools_FClass2d
+//purpose :
//=======================================================================
-void IntTools_FClass2d::Destroy()
-{
- Standard_Integer nbtabclass = TabClass.Length();
- for(Standard_Integer d=1; d<=nbtabclass;d++) {
- if(TabClass(d)) {
+IntTools_FClass2d::~IntTools_FClass2d()
+{
+ Standard_Integer nbtabclass = TabClass.Length();
+ for (Standard_Integer d = 1; d <= nbtabclass; d++)
+ {
+ if (TabClass(d))
+ {
delete ((CSLib_Class2d *)TabClass(d));
TabClass(d)=NULL;
}
}
}
-
-
DEFINE_STANDARD_ALLOC
-
-
//! Empty constructor
Standard_EXPORT IntTools_FClass2d();
-
//! Initializes algorithm by the face F
//! and tolerance Tol
Standard_EXPORT IntTools_FClass2d(const TopoDS_Face& F, const Standard_Real Tol);
-
//! Initializes algorithm by the face F
//! and tolerance Tol
Standard_EXPORT void Init (const TopoDS_Face& F, const Standard_Real Tol);
-
//! Returns state of infinite 2d point relatively to (0, 0)
Standard_EXPORT TopAbs_State PerformInfinitePoint() const;
-
//! Returns state of the 2d point Puv.
- //! If RecadreOnPeriodic is true (defalut value),
+ //! If RecadreOnPeriodic is true (default value),
//! for the periodic surface 2d point, adjusted to period, is
//! classified.
Standard_EXPORT TopAbs_State Perform (const gp_Pnt2d& Puv, const Standard_Boolean RecadreOnPeriodic = Standard_True) const;
-
//! Destructor
- Standard_EXPORT void Destroy();
-~IntTools_FClass2d()
-{
- Destroy();
-}
-
+ Standard_EXPORT ~IntTools_FClass2d();
//! Test a point with +- an offset (Tol) and returns
//! On if some points are OUT an some are IN
//! (Caution: Internal use . see the code for more details)
Standard_EXPORT TopAbs_State TestOnRestriction (const gp_Pnt2d& Puv, const Standard_Real Tol, const Standard_Boolean RecadreOnPeriodic = Standard_True) const;
-
- Standard_EXPORT Standard_Boolean IsHole() const;
-
-
-
-
-protected:
-
-
-
+ Standard_EXPORT Standard_Boolean IsHole() const;
private:
-
-
BRepTopAdaptor_SeqOfPtr TabClass;
TColStd_SequenceOfInteger TabOrien;
Standard_Real Toluv;
Standard_Real Vmax;
Standard_Boolean myIsHole;
-#ifdef _MSC_VER
-#if _MSC_VER < 1600
- mutable std::auto_ptr<BRepClass_FaceExplorer> myFExplorer;
-#else
mutable std::unique_ptr<BRepClass_FaceExplorer> myFExplorer;
-#endif
-#else
- mutable std::unique_ptr<BRepClass_FaceExplorer> myFExplorer;
-#endif
};
-
-
-
-
-
-
#endif // _IntTools_FClass2d_HeaderFile
Standard_Boolean LDOMParser::parse (const char * const aFileName)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aFileStream = aFileSystem->OpenIStream (aFileName, std::ios::in);
+ std::shared_ptr<std::istream> aFileStream = aFileSystem->OpenIStream (aFileName, std::ios::in);
if (aFileStream.get() != NULL && aFileStream->good())
{
}
}
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move constructor
NCollection_AliasedArray (NCollection_AliasedArray&& theOther)
: myData (theOther.myData), myStride (theOther.myStride), mySize (theOther.mySize), myDeletable (theOther.myDeletable)
{
theOther.myDeletable = false;
}
-#endif
//! Constructor wrapping pre-allocated C-array of values without copying them.
template<typename Type_t>
return Assign (theOther);
}
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move assignment operator; @sa Move()
NCollection_AliasedArray& operator= (NCollection_AliasedArray&& theOther)
{
return Move (theOther);
}
-#endif
//! Resizes the array to specified bounds.
//! No re-allocation will be done if length of array does not change,
Assign (theOther);
}
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move constructor
NCollection_Array1 (NCollection_Array1&& theOther)
: myLowerBound (theOther.myLowerBound),
{
theOther.myDeletable = false;
}
-#endif
//! C array-based constructor.
//!
return Assign (theOther);
}
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move assignment operator; @sa Move()
NCollection_Array1& operator= (NCollection_Array1&& theOther)
{
return Move (theOther);
}
-#endif
//! @return first element
const TheItemType& First() const
*this = theOther;
}
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move constructor
NCollection_Array2 (NCollection_Array2&& theOther)
: myLowerRow (theOther.myLowerRow),
theOther.myData = NULL;
theOther.myDeletable = false;
}
-#endif
//! C array-based constructor
NCollection_Array2(const TheItemType& theBegin,
return Assign (theOther);
}
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move assignment operator; @sa Move()
NCollection_Array2& operator= (NCollection_Array2&& theOther)
{
return Move (theOther);
}
-#endif
//! Constant value access
const TheItemType& Value (const Standard_Integer theRow,
template<class Category, class BaseIterator, class ItemType, bool IsConstant>
class NCollection_StlIterator :
public std::iterator<Category, ItemType, ptrdiff_t,
- typename opencascade::std::conditional<IsConstant, const ItemType*, ItemType*>::type,
- typename opencascade::std::conditional<IsConstant, const ItemType&, ItemType&>::type>
+ typename std::conditional<IsConstant, const ItemType*, ItemType*>::type,
+ typename std::conditional<IsConstant, const ItemType&, ItemType&>::type>
{
public:
// an appropriate method based on template arguments (at instantiation time).
template<bool Condition>
- typename opencascade::std::enable_if<!Condition, ItemType&>::type Reference() const
+ typename std::enable_if<!Condition, ItemType&>::type Reference() const
{
return myIterator.ChangeValue();
}
template<bool Condition>
- typename opencascade::std::enable_if<Condition, const ItemType&>::type Reference() const
+ typename std::enable_if<Condition, const ItemType&>::type Reference() const
{
return myIterator.Value();
}
private:
// ---------- PRIVATE FIELDS ----------
- UBTree& myTree;
- NCollection_Vector<ObjBnd> mySeqPtr;
- opencascade::std::mt19937 myRandGen; //!< random number generator
- Standard_Boolean myIsFullRandom;
+ UBTree& myTree;
+ NCollection_Vector<ObjBnd> mySeqPtr;
+ std::mt19937 myRandGen; //!< random number generator
+ Standard_Boolean myIsFullRandom;
};
//=======================================================================
//! Standard_Utf16Char on Windows and to Standard_Utf32Char on Linux.
template <typename TypeChar>
class CharTypeChooser :
- public opencascade::std::conditional< sizeof(TypeChar) == 1, Standard_Utf8Char,
- typename opencascade::std::conditional< sizeof(TypeChar) == 2, Standard_Utf16Char,
- typename opencascade::std::conditional< sizeof(TypeChar) == 4, Standard_Utf32Char, void >::type >::type >
+ public std::conditional< sizeof(TypeChar) == 1, Standard_Utf8Char,
+ typename std::conditional< sizeof(TypeChar) == 2, Standard_Utf16Char,
+ typename std::conditional< sizeof(TypeChar) == 4, Standard_Utf32Char, void >::type >::type >
{
};
//! @param theCopy string to copy.
NCollection_UtfString (const NCollection_UtfString& theCopy);
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move constructor
NCollection_UtfString (NCollection_UtfString&& theOther);
-#endif
//! Copy constructor from UTF-8 string.
//! @param theCopyUtf8 UTF-8 string to copy
//! Copy from another string.
const NCollection_UtfString& operator= (const NCollection_UtfString& theOther) { return Assign (theOther); }
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move assignment operator.
NCollection_UtfString& operator= (NCollection_UtfString&& theOther) { Swap (theOther); return *this; }
-#endif
//! Copy from UTF-8 NULL-terminated string.
const NCollection_UtfString& operator= (const char* theStringUtf8);
strCopy ((Standard_Byte* )myString, (const Standard_Byte* )theCopy.myString, mySize);
}
-#ifndef OCCT_NO_RVALUE_REFERENCE
// =======================================================================
// function : NCollection_UtfString
// purpose :
theOther.mySize = 0;
theOther.myLength = 0;
}
-#endif
// =======================================================================
// function : NCollection_UtfString
// function : IsOpenIStream
// purpose :
//=======================================================================
-Standard_Boolean OSD_CachedFileSystem::IsOpenIStream (const opencascade::std::shared_ptr<std::istream>& theStream) const
+Standard_Boolean OSD_CachedFileSystem::IsOpenIStream (const std::shared_ptr<std::istream>& theStream) const
{
return myLinkedFS->IsOpenIStream (theStream);
}
// function : IsOpenOStream
// purpose :
//=======================================================================
-Standard_Boolean OSD_CachedFileSystem::IsOpenOStream (const opencascade::std::shared_ptr<std::ostream>& theStream) const
+Standard_Boolean OSD_CachedFileSystem::IsOpenOStream (const std::shared_ptr<std::ostream>& theStream) const
{
return myLinkedFS->IsOpenOStream (theStream);
}
// function : OpenIStream
// purpose :
//=======================================================================
-opencascade::std::shared_ptr<std::istream> OSD_CachedFileSystem::OpenIStream (const TCollection_AsciiString& theUrl,
- const std::ios_base::openmode theParams,
- const int64_t theOffset,
- const opencascade::std::shared_ptr<std::istream>& /*theOldStream*/)
+std::shared_ptr<std::istream> OSD_CachedFileSystem::OpenIStream (const TCollection_AsciiString& theUrl,
+ const std::ios_base::openmode theParams,
+ const int64_t theOffset,
+ const std::shared_ptr<std::istream>& /*theOldStream*/)
{
if (myStream.Url != theUrl)
{
// function : OpenOStream
// purpose :
//=======================================================================
-opencascade::std::shared_ptr<std::ostream> OSD_CachedFileSystem::OpenOStream (const TCollection_AsciiString& theUrl,
- const std::ios_base::openmode theMode)
+std::shared_ptr<std::ostream> OSD_CachedFileSystem::OpenOStream (const TCollection_AsciiString& theUrl,
+ const std::ios_base::openmode theMode)
{
return myLinkedFS->OpenOStream (theUrl, theMode);
}
// function : OpenStreamBuffer
// purpose :
//=======================================================================
-opencascade::std::shared_ptr<std::streambuf> OSD_CachedFileSystem::OpenStreamBuffer (const TCollection_AsciiString& theUrl,
- const std::ios_base::openmode theMode,
- const int64_t theOffset,
- int64_t* theOutBufSize)
+std::shared_ptr<std::streambuf> OSD_CachedFileSystem::OpenStreamBuffer (const TCollection_AsciiString& theUrl,
+ const std::ios_base::openmode theMode,
+ const int64_t theOffset,
+ int64_t* theOutBufSize)
{
if ((theMode & std::ios::out) == std::ios::out)
{
Standard_EXPORT virtual Standard_Boolean IsSupportedPath (const TCollection_AsciiString& theUrl) const Standard_OVERRIDE;
//! Returns TRUE if current input stream is opened for reading operations.
- Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr<std::istream>& theStream) const Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const std::shared_ptr<std::istream>& theStream) const Standard_OVERRIDE;
//! Returns TRUE if current output stream is opened for writing operations.
- Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const opencascade::std::shared_ptr<std::ostream>& theStream) const Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const std::shared_ptr<std::ostream>& theStream) const Standard_OVERRIDE;
//! Opens stream for specified file URL for reading operations or returns previously created stream pointing to the same URL.
- Standard_EXPORT virtual opencascade::std::shared_ptr<std::istream> OpenIStream
+ Standard_EXPORT virtual std::shared_ptr<std::istream> OpenIStream
(const TCollection_AsciiString& theUrl,
const std::ios_base::openmode theParams,
const int64_t theOffset,
- const opencascade::std::shared_ptr<std::istream>& theOldStream) Standard_OVERRIDE;
+ const std::shared_ptr<std::istream>& theOldStream) Standard_OVERRIDE;
//! Opens stream for specified file URL for writing operations (std::ostream) by calling parent's method.
- Standard_EXPORT virtual opencascade::std::shared_ptr<std::ostream> OpenOStream (const TCollection_AsciiString& theUrl,
- const std::ios_base::openmode theMode) Standard_OVERRIDE;
+ Standard_EXPORT virtual std::shared_ptr<std::ostream> OpenOStream (const TCollection_AsciiString& theUrl,
+ const std::ios_base::openmode theMode) Standard_OVERRIDE;
//! Opens stream buffer for specified file URL.
- Standard_EXPORT virtual opencascade::std::shared_ptr<std::streambuf> OpenStreamBuffer
+ Standard_EXPORT virtual std::shared_ptr<std::streambuf> OpenStreamBuffer
(const TCollection_AsciiString& theUrl,
const std::ios_base::openmode theMode,
const int64_t theOffset = 0,
// Auxiliary structure to save shared stream with path to it.
struct OSD_CachedStream
{
- TCollection_AsciiString Url;
- opencascade::std::shared_ptr<std::istream> Stream;
- opencascade::std::shared_ptr<std::streambuf> StreamBuf;
+ TCollection_AsciiString Url;
+ std::shared_ptr<std::istream> Stream;
+ std::shared_ptr<std::streambuf> StreamBuf;
void Reset()
{
// function : openIStream
// purpose :
//=======================================================================
-opencascade::std::shared_ptr<std::istream> OSD_FileSystem::OpenIStream (const TCollection_AsciiString& theUrl,
- const std::ios_base::openmode theMode,
- const int64_t theOffset,
- const opencascade::std::shared_ptr<std::istream>& theOldStream)
+std::shared_ptr<std::istream> OSD_FileSystem::OpenIStream (const TCollection_AsciiString& theUrl,
+ const std::ios_base::openmode theMode,
+ const int64_t theOffset,
+ const std::shared_ptr<std::istream>& theOldStream)
{
Standard_ASSERT_RAISE (theOffset >= -1, "Incorrect negative stream position during stream opening");
- opencascade::std::shared_ptr<std::istream> aNewStream;
- opencascade::std::shared_ptr<OSD_IStreamBuffer> anOldStream = opencascade::std::dynamic_pointer_cast<OSD_IStreamBuffer> (theOldStream);
+ std::shared_ptr<std::istream> aNewStream;
+ std::shared_ptr<OSD_IStreamBuffer> anOldStream = std::dynamic_pointer_cast<OSD_IStreamBuffer> (theOldStream);
if (anOldStream.get() != NULL
&& theUrl.IsEqual (anOldStream->Url().c_str())
&& IsOpenIStream (anOldStream))
}
if (aNewStream.get() == NULL)
{
- opencascade::std::shared_ptr<std::streambuf> aFileBuf = OpenStreamBuffer (theUrl, theMode | std::ios_base::in);
+ std::shared_ptr<std::streambuf> aFileBuf = OpenStreamBuffer (theUrl, theMode | std::ios_base::in);
if (aFileBuf.get() == NULL)
{
- return opencascade::std::shared_ptr<std::istream>();
+ return std::shared_ptr<std::istream>();
}
aNewStream.reset (new OSD_IStreamBuffer (theUrl.ToCString(), aFileBuf));
// function : OpenOStream
// purpose :
//=======================================================================
-opencascade::std::shared_ptr<std::ostream> OSD_FileSystem::OpenOStream (const TCollection_AsciiString& theUrl,
- const std::ios_base::openmode theMode)
+std::shared_ptr<std::ostream> OSD_FileSystem::OpenOStream (const TCollection_AsciiString& theUrl,
+ const std::ios_base::openmode theMode)
{
- opencascade::std::shared_ptr<std::ostream> aNewStream;
- opencascade::std::shared_ptr<std::streambuf> aFileBuf = OpenStreamBuffer (theUrl, theMode | std::ios_base::out);
+ std::shared_ptr<std::ostream> aNewStream;
+ std::shared_ptr<std::streambuf> aFileBuf = OpenStreamBuffer (theUrl, theMode | std::ios_base::out);
if (aFileBuf.get() == NULL)
{
- return opencascade::std::shared_ptr<std::ostream>();
+ return std::shared_ptr<std::ostream>();
}
aNewStream.reset(new OSD_OStreamBuffer (theUrl.ToCString(), aFileBuf));
virtual Standard_Boolean IsSupportedPath (const TCollection_AsciiString& theUrl) const = 0;
//! Returns TRUE if current input stream is opened for reading operations.
- virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr<std::istream>& theStream) const = 0;
+ virtual Standard_Boolean IsOpenIStream (const std::shared_ptr<std::istream>& theStream) const = 0;
//! Returns TRUE if current output stream is opened for writing operations.
- virtual Standard_Boolean IsOpenOStream(const opencascade::std::shared_ptr<std::ostream>& theStream) const = 0;
+ virtual Standard_Boolean IsOpenOStream(const std::shared_ptr<std::ostream>& theStream) const = 0;
//! Opens stream for specified file URL for reading operations (std::istream).
//! Default implementation create a stream from file buffer returned by OSD_FileSystem::OpenFileBuffer().
//! -1 would keep seek position undefined (in case of re-using theOldStream)
//! @param theOldStream [in] a pointer to existing stream pointing to theUrl to be reused (without re-opening)
//! @return pointer to newly created opened stream, to theOldStream if it can be reused or NULL in case of failure.
- Standard_EXPORT virtual opencascade::std::shared_ptr<std::istream> OpenIStream
+ Standard_EXPORT virtual std::shared_ptr<std::istream> OpenIStream
(const TCollection_AsciiString& theUrl,
const std::ios_base::openmode theMode,
const int64_t theOffset = 0,
- const opencascade::std::shared_ptr<std::istream>& theOldStream = opencascade::std::shared_ptr<std::istream>());
+ const std::shared_ptr<std::istream>& theOldStream = std::shared_ptr<std::istream>());
//! Opens stream for specified file URL for writing operations (std::ostream).
//! Default implementation create a stream from file buffer returned by OSD_FileSystem::OpenFileBuffer().
//! @param theUrl [in] path to open
//! @param theMode [in] flags describing the requested output mode for the stream (std::ios_base::out will be implicitly added)
//! @return pointer to newly created opened stream or NULL in case of failure.
- Standard_EXPORT virtual opencascade::std::shared_ptr<std::ostream> OpenOStream (const TCollection_AsciiString& theUrl,
- const std::ios_base::openmode theMode);
+ Standard_EXPORT virtual std::shared_ptr<std::ostream> OpenOStream (const TCollection_AsciiString& theUrl,
+ const std::ios_base::openmode theMode);
//! Opens stream buffer for specified file URL.
//! @param theUrl [in] path to open
//! @param theOffset [in] expected stream position from the beginning of the buffer (beginning of the stream buffer by default)
//! @param theOutBufSize [out] total buffer size (only if buffer is opened for read)
//! @return pointer to newly created opened stream buffer or NULL in case of failure.
- virtual opencascade::std::shared_ptr<std::streambuf> OpenStreamBuffer (const TCollection_AsciiString& theUrl,
- const std::ios_base::openmode theMode,
- const int64_t theOffset = 0,
- int64_t* theOutBufSize = NULL) = 0;
+ virtual std::shared_ptr<std::streambuf> OpenStreamBuffer (const TCollection_AsciiString& theUrl,
+ const std::ios_base::openmode theMode,
+ const int64_t theOffset = 0,
+ int64_t* theOutBufSize = NULL) = 0;
//! Constructor.
Standard_EXPORT OSD_FileSystem();
// function : IsOpenIStream
// purpose :
//=======================================================================
-Standard_Boolean OSD_FileSystemSelector::IsOpenIStream (const opencascade::std::shared_ptr<std::istream>& theStream) const
+Standard_Boolean OSD_FileSystemSelector::IsOpenIStream (const std::shared_ptr<std::istream>& theStream) const
{
- opencascade::std::shared_ptr<OSD_IStreamBuffer> aFileStream = opencascade::std::dynamic_pointer_cast<OSD_IStreamBuffer> (theStream);
+ std::shared_ptr<OSD_IStreamBuffer> aFileStream = std::dynamic_pointer_cast<OSD_IStreamBuffer> (theStream);
if (aFileStream.get() == NULL)
{
return false;
// function : IsOpenOStream
// purpose :
//=======================================================================
-Standard_Boolean OSD_FileSystemSelector::IsOpenOStream (const opencascade::std::shared_ptr<std::ostream>& theStream) const
+Standard_Boolean OSD_FileSystemSelector::IsOpenOStream (const std::shared_ptr<std::ostream>& theStream) const
{
- opencascade::std::shared_ptr<OSD_OStreamBuffer> aFileStream = opencascade::std::dynamic_pointer_cast<OSD_OStreamBuffer> (theStream);
+ std::shared_ptr<OSD_OStreamBuffer> aFileStream = std::dynamic_pointer_cast<OSD_OStreamBuffer> (theStream);
if (aFileStream.get() == NULL)
{
return false;
// function : OpenIStream
// purpose :
//=======================================================================
-opencascade::std::shared_ptr<std::istream> OSD_FileSystemSelector::OpenIStream (const TCollection_AsciiString& theUrl,
- const std::ios_base::openmode theMode,
- const int64_t theOffset,
- const opencascade::std::shared_ptr<std::istream>& theOldStream)
+std::shared_ptr<std::istream> OSD_FileSystemSelector::OpenIStream (const TCollection_AsciiString& theUrl,
+ const std::ios_base::openmode theMode,
+ const int64_t theOffset,
+ const std::shared_ptr<std::istream>& theOldStream)
{
for (NCollection_List<Handle(OSD_FileSystem)>::Iterator aProtIter (myProtocols); aProtIter.More(); aProtIter.Next())
{
const Handle(OSD_FileSystem)& aFileSystem = aProtIter.Value();
if (aFileSystem->IsSupportedPath (theUrl))
{
- opencascade::std::shared_ptr<std::istream> aStream = aFileSystem->OpenIStream (theUrl, theMode, theOffset, theOldStream);
+ std::shared_ptr<std::istream> aStream = aFileSystem->OpenIStream (theUrl, theMode, theOffset, theOldStream);
if (aStream.get() != NULL)
{
return aStream;
}
}
}
- return opencascade::std::shared_ptr<std::istream>();
+ return std::shared_ptr<std::istream>();
}
//=======================================================================
// function : OpenOStream
// purpose :
//=======================================================================
-opencascade::std::shared_ptr<std::ostream> OSD_FileSystemSelector::OpenOStream (const TCollection_AsciiString& theUrl,
- const std::ios_base::openmode theMode)
+std::shared_ptr<std::ostream> OSD_FileSystemSelector::OpenOStream (const TCollection_AsciiString& theUrl,
+ const std::ios_base::openmode theMode)
{
for (NCollection_List<Handle(OSD_FileSystem)>::Iterator aProtIter (myProtocols); aProtIter.More(); aProtIter.Next())
{
const Handle(OSD_FileSystem)& aFileSystem = aProtIter.Value();
if (aFileSystem->IsSupportedPath (theUrl))
{
- opencascade::std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (theUrl, theMode);
+ std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (theUrl, theMode);
if (aStream.get() != NULL)
{
return aStream;
}
}
}
- return opencascade::std::shared_ptr<std::ostream>();
+ return std::shared_ptr<std::ostream>();
}
//=======================================================================
// function : OpenStreamBuffer
// purpose :
//=======================================================================
-opencascade::std::shared_ptr<std::streambuf> OSD_FileSystemSelector::OpenStreamBuffer (const TCollection_AsciiString& theUrl,
- const std::ios_base::openmode theMode,
- const int64_t theOffset,
- int64_t* theOutBufSize)
+std::shared_ptr<std::streambuf> OSD_FileSystemSelector::OpenStreamBuffer (const TCollection_AsciiString& theUrl,
+ const std::ios_base::openmode theMode,
+ const int64_t theOffset,
+ int64_t* theOutBufSize)
{
for (NCollection_List<Handle(OSD_FileSystem)>::Iterator aProtIter (myProtocols); aProtIter.More(); aProtIter.Next())
{
const Handle(OSD_FileSystem)& aFileSystem = aProtIter.Value();
if (aFileSystem->IsSupportedPath (theUrl))
{
- opencascade::std::shared_ptr<std::streambuf> aBuf = aFileSystem->OpenStreamBuffer (theUrl, theMode, theOffset, theOutBufSize);
+ std::shared_ptr<std::streambuf> aBuf = aFileSystem->OpenStreamBuffer (theUrl, theMode, theOffset, theOutBufSize);
if (aBuf.get() != NULL)
{
return aBuf;
}
}
}
- return opencascade::std::shared_ptr<std::streambuf>();
+ return std::shared_ptr<std::streambuf>();
}
Standard_EXPORT virtual bool IsSupportedPath (const TCollection_AsciiString& theUrl) const Standard_OVERRIDE;
//! Returns TRUE if current input stream is opened for reading operations.
- Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr<std::istream>& theStream) const Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const std::shared_ptr<std::istream>& theStream) const Standard_OVERRIDE;
//! Returns TRUE if current output stream is opened for writing operations.
- Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const opencascade::std::shared_ptr<std::ostream>& theStream) const Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const std::shared_ptr<std::ostream>& theStream) const Standard_OVERRIDE;
//! Opens input stream using one of registered protocols.
- Standard_EXPORT virtual opencascade::std::shared_ptr<std::istream> OpenIStream
+ Standard_EXPORT virtual std::shared_ptr<std::istream> OpenIStream
(const TCollection_AsciiString& theUrl,
const std::ios_base::openmode theMode,
const int64_t theOffset = 0,
- const opencascade::std::shared_ptr<std::istream>& theOldStream = opencascade::std::shared_ptr<std::istream>()) Standard_OVERRIDE;
+ const std::shared_ptr<std::istream>& theOldStream = std::shared_ptr<std::istream>()) Standard_OVERRIDE;
//! Opens output stream using one of registered protocols.
- Standard_EXPORT virtual opencascade::std::shared_ptr<std::ostream> OpenOStream (const TCollection_AsciiString& theUrl,
- const std::ios_base::openmode theMode) Standard_OVERRIDE;
+ Standard_EXPORT virtual std::shared_ptr<std::ostream> OpenOStream (const TCollection_AsciiString& theUrl,
+ const std::ios_base::openmode theMode) Standard_OVERRIDE;
//! Opens stream buffer using one of registered protocols.
- Standard_EXPORT virtual opencascade::std::shared_ptr<std::streambuf> OpenStreamBuffer
+ Standard_EXPORT virtual std::shared_ptr<std::streambuf> OpenStreamBuffer
(const TCollection_AsciiString& theUrl,
const std::ios_base::openmode theMode,
const int64_t theOffset = 0,
// function : IsOpenIStream
// purpose :
//=======================================================================
-Standard_Boolean OSD_LocalFileSystem::IsOpenIStream (const opencascade::std::shared_ptr<std::istream>& theStream) const
+Standard_Boolean OSD_LocalFileSystem::IsOpenIStream (const std::shared_ptr<std::istream>& theStream) const
{
- opencascade::std::shared_ptr<OSD_IStreamBuffer> aFileStream = opencascade::std::dynamic_pointer_cast<OSD_IStreamBuffer> (theStream);
+ std::shared_ptr<OSD_IStreamBuffer> aFileStream = std::dynamic_pointer_cast<OSD_IStreamBuffer> (theStream);
if (aFileStream.get() == NULL)
{
return false;
// function : IsOpenOStream
// purpose :
//=======================================================================
-Standard_Boolean OSD_LocalFileSystem::IsOpenOStream (const opencascade::std::shared_ptr<std::ostream>& theStream) const
+Standard_Boolean OSD_LocalFileSystem::IsOpenOStream (const std::shared_ptr<std::ostream>& theStream) const
{
- opencascade::std::shared_ptr<OSD_OStreamBuffer> aFileStream = opencascade::std::dynamic_pointer_cast<OSD_OStreamBuffer> (theStream);
+ std::shared_ptr<OSD_OStreamBuffer> aFileStream = std::dynamic_pointer_cast<OSD_OStreamBuffer> (theStream);
if (aFileStream.get() == NULL)
{
return false;
// function : OpenStreamBuffer
// purpose :
//=======================================================================
-opencascade::std::shared_ptr<std::streambuf> OSD_LocalFileSystem::OpenStreamBuffer (const TCollection_AsciiString& theUrl,
- const std::ios_base::openmode theMode,
- const int64_t theOffset,
- int64_t* theOutBufSize)
+std::shared_ptr<std::streambuf> OSD_LocalFileSystem::OpenStreamBuffer (const TCollection_AsciiString& theUrl,
+ const std::ios_base::openmode theMode,
+ const int64_t theOffset,
+ int64_t* theOutBufSize)
{
Standard_ASSERT_RAISE (theOffset >= 0, "Incorrect negative stream position during stream buffer opening");
- opencascade::std::shared_ptr<std::filebuf> aNewBuf(new std::filebuf());
+ std::shared_ptr<std::filebuf> aNewBuf(new std::filebuf());
if (!OSD_OpenStream (*aNewBuf, TCollection_ExtendedString(theUrl), theMode))
{
- return opencascade::std::shared_ptr<std::streambuf>();
+ return std::shared_ptr<std::streambuf>();
}
// if buffer is opened for read, find the file size
if (theOutBufSize && ((theMode & std::ios::in) != 0))
if (aNewBuf->pubseekoff ((std::streamoff )theOffset, std::ios_base::beg, std::ios_base::in) < 0)
{
*theOutBufSize = 0;
- return opencascade::std::shared_ptr<std::streambuf>();
+ return std::shared_ptr<std::streambuf>();
}
}
else if (theOffset > 0 && aNewBuf->pubseekoff ((std::streamoff )theOffset, std::ios_base::beg,
(theMode & std::ios::in) != 0 ? std::ios_base::in : std::ios_base::out) < 0)
{
- return opencascade::std::shared_ptr<std::streambuf>();
+ return std::shared_ptr<std::streambuf>();
}
return aNewBuf;
}
Standard_EXPORT virtual Standard_Boolean IsSupportedPath (const TCollection_AsciiString& theUrl) const Standard_OVERRIDE;
//! Returns TRUE if current input stream is opened for reading operations.
- Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr<std::istream>& theStream) const Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const std::shared_ptr<std::istream>& theStream) const Standard_OVERRIDE;
//! Returns TRUE if current output stream is opened for writing operations.
- Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const opencascade::std::shared_ptr<std::ostream>& theStream) const Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const std::shared_ptr<std::ostream>& theStream) const Standard_OVERRIDE;
//! Opens stream buffer for specified file URL.
- Standard_EXPORT virtual opencascade::std::shared_ptr<std::streambuf> OpenStreamBuffer
+ Standard_EXPORT virtual std::shared_ptr<std::streambuf> OpenStreamBuffer
(const TCollection_AsciiString& theUrl,
const std::ios_base::openmode theMode,
const int64_t theOffset = 0,
}
private:
-#if (defined(_MSC_VER) && (_MSC_VER < 1600))
- std::auto_ptr<IteratorInterface> myPtr;
-#else
std::unique_ptr<IteratorInterface> myPtr;
-#endif
};
//! Interface class representing functor object.
//! Main constructor.
OSD_StreamBuffer (const std::string& theUrl,
- const opencascade::std::shared_ptr<std::streambuf>& theBuffer)
+ const std::shared_ptr<std::streambuf>& theBuffer)
: T (theBuffer.get()), myUrl (theUrl), myBuffer (theBuffer) {}
//! Return an opened URL.
protected:
- std::string myUrl;
- opencascade::std::shared_ptr<std::streambuf> myBuffer;
+ std::string myUrl;
+ std::shared_ptr<std::streambuf> myBuffer;
};
typedef OSD_StreamBuffer<std::istream> OSD_IStreamBuffer;
//! Assignment operator; @sa Assign()
Poly_ArrayOfNodes& operator= (const Poly_ArrayOfNodes& theOther) { return Assign (theOther); }
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move constructor
Poly_ArrayOfNodes (Poly_ArrayOfNodes&& theOther)
: NCollection_AliasedArray (std::move (theOther))
{
return Move (theOther);
}
-#endif
public:
//! Assignment operator; @sa Assign()
Poly_ArrayOfUVNodes& operator= (const Poly_ArrayOfUVNodes& theOther) { return Assign (theOther); }
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move constructor
Poly_ArrayOfUVNodes (Poly_ArrayOfUVNodes&& theOther)
: NCollection_AliasedArray (std::move (theOther))
{
return Move (theOther);
}
-#endif
public:
else
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (anImgPath, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (anImgPath, std::ios::in | std::ios::binary);
if (aFile.get() == NULL)
{
std::cout << "Syntax error: image file '" << anImgPath << "' cannot be found\n";
// Generate data;
Standard_Integer aSize = Draw::Atoi (theArgv[1]);
- opencascade::std::mt19937 aGen (42);
+ std::mt19937 aGen (42);
NCollection_Array2<double> aMat1 (0, aSize - 1, 0, aSize - 1);
NCollection_Array2<double> aMat2 (0, aSize - 1, 0, aSize - 1);
NCollection_Array2<double> aMatResRef(0, aSize - 1, 0, aSize - 1);
Handle(NCollection_Buffer) aBuffer;
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (aFilePath, std::ios::binary | std::ios::in);
+ std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (aFilePath, std::ios::binary | std::ios::in);
if (aFile.get() == NULL)
{
std::cout << "Error: input file '" << aFilePath << "' cannot be read\n";
}
Handle(Standard_Transient) aHandle = new Standard_Transient();
- opencascade::std::shared_ptr<Standard_Transient> aSharePtr (new Standard_Transient());
+ std::shared_ptr<Standard_Transient> aSharePtr (new Standard_Transient());
theDI << "Time of creating and destroying " << aNbIters << " smart pointers to the same object, per item, ns:";
{
{
{
QATimer aTimer (theDI, "\nC++ shared_ptr: ", QATimer::ns, aNbIters);
{
- std::vector< opencascade::std::shared_ptr<Standard_Transient> > aSharePointers (aNbIters);
+ std::vector< std::shared_ptr<Standard_Transient> > aSharePointers (aNbIters);
for (Standard_Integer anIter = 0; anIter < aNbIters; ++anIter)
{
aSharePointers[anIter] = aSharePtr;
aPSentry.Show();
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary);
if (aFile.get() == NULL || !aFile->good())
{
Message::SendFail (TCollection_AsciiString ("File '") + theFile + "' is not found");
myBinDataLen64 = 0;
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aBinFile = aFileSystem->OpenOStream (myBinFileNameFull, std::ios::out | std::ios::binary);
+ std::shared_ptr<std::ostream> aBinFile = aFileSystem->OpenOStream (myBinFileNameFull, std::ios::out | std::ios::binary);
if (aBinFile.get() == NULL
|| !aBinFile->good())
{
const TCollection_AsciiString aFileNameGltf = myFile;
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aGltfContentFile = aFileSystem->OpenOStream (aFileNameGltf, std::ios::out | std::ios::binary);
+ std::shared_ptr<std::ostream> aGltfContentFile = aFileSystem->OpenOStream (aFileNameGltf, std::ios::out | std::ios::binary);
if (aGltfContentFile.get() == NULL
|| !aGltfContentFile->good())
{
if (aFullLen64 < std::numeric_limits<uint32_t>::max())
{
{
- opencascade::std::shared_ptr<std::istream> aBinFile = aFileSystem->OpenIStream (myBinFileNameFull, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aBinFile = aFileSystem->OpenIStream (myBinFileNameFull, std::ios::in | std::ios::binary);
if (aBinFile.get() == NULL || !aBinFile->good())
{
Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' cannot be opened");
RWMesh_CoordinateSystemConverter myCSTrsf; //!< transformation from OCCT to glTF coordinate system
XCAFPrs_Style myDefaultStyle; //!< default material definition to be used for nodes with only color defined
- opencascade::std::shared_ptr<RWGltf_GltfOStreamWriter>
- myWriter; //!< JSON writer
+ std::shared_ptr<RWGltf_GltfOStreamWriter> myWriter; //!< JSON writer
Handle(RWGltf_GltfMaterialMap) myMaterialMap; //!< map of defined materials
RWGltf_GltfBufferView myBuffViewPos; //!< current buffer view with nodes positions
RWGltf_GltfBufferView myBuffViewNorm; //!< current buffer view with nodes normals
const Handle(OSD_FileSystem)& theFileSystem) const
{
const Handle(OSD_FileSystem)& aFileSystem = !theFileSystem.IsNull() ? theFileSystem : OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aSharedStream = aFileSystem->OpenIStream
+ std::shared_ptr<std::istream> aSharedStream = aFileSystem->OpenIStream
(theGltfData.StreamUri, std::ios::in | std::ios::binary, theGltfData.StreamOffset);
if (aSharedStream.get() == NULL)
{
{
const TCollection_AsciiString& aName = theSourceGltfMesh->Id();
const Handle(OSD_FileSystem)& aFileSystem = !theFileSystem.IsNull() ? theFileSystem : OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aSharedStream = aFileSystem->OpenIStream (theGltfData.StreamUri, std::ios::in | std::ios::binary, theGltfData.StreamOffset);
+ std::shared_ptr<std::istream> aSharedStream = aFileSystem->OpenIStream (theGltfData.StreamUri, std::ios::in | std::ios::binary, theGltfData.StreamOffset);
if (aSharedStream.get() == NULL)
{
reportError (TCollection_AsciiString("Buffer '") + aName + "' refers to invalid file '" + theGltfData.StreamUri + "'.");
theFile.SystemName (aPath);
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary);
if (aStream.get() == NULL)
{
return Handle(Poly_Triangulation)();
const Message_ProgressRange& theProgress)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aStream = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aStream = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary);
if (aStream.get() == NULL)
{
Message::SendFail (TCollection_AsciiString("Error: file '") + theFile + "' is not found");
BeginScope();
}
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move constructor
handle (handle&& theHandle) : entity(theHandle.entity)
{
theHandle.entity = 0;
}
-#endif
//! Destructor
~handle ()
return *this;
}
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move operator
handle& operator= (handle&& theHandle)
{
std::swap (this->entity, theHandle.entity);
return *this;
}
-#endif
//! STL-like cast to pointer to referred object (note non-const).
//! @sa std::shared_ptr::get()
BeginScope();
}
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Generalized move constructor
template <class T2>
handle (handle<T2>&& theHandle, typename std::enable_if <is_base_but_not_same <T, T2>::value>::type* = nullptr)
{
theHandle.entity = 0;
}
-#endif
//! Generalized assignment operator.
template <class T2>
return *this;
}
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Generalized move operator
template <class T2>
handle& operator= (handle<T2>&& theHandle)
std::swap (this->entity, theHandle.entity);
return *this;
}
-#endif
#else
#ifndef _Standard_Macro_HeaderFile
# define _Standard_Macro_HeaderFile
+#if defined(_MSC_VER) && (_MSC_VER < 1600)
+ #error C++11 compatible compiler is required (Visual Studio 2010 or newer)
+#endif
+
//! @def Standard_OVERRIDE
//! Should be used in declarations of virtual methods overridden in the
//! derived classes, to cause compilation error in the case if that virtual
//! function disappears or changes its signature in the base class.
//!
//! Expands to C++11 keyword "override" on compilers that are known to
-//! suppot it; empty in other cases.
+//! support it; empty in other cases.
#if defined(__cplusplus) && (__cplusplus >= 201100L)
// part of C++11 standard
#define Standard_OVERRIDE override
#define Standard_ENABLE_DEPRECATION_WARNINGS
#endif
-//! @def OCCT_NO_RVALUE_REFERENCE
-//! Disables methods and constructors that use rvalue references
-//! (C++11 move semantics) not supported by obsolete compilers.
-#if (defined(_MSC_VER) && (_MSC_VER < 1600))
- #define OCCT_NO_RVALUE_REFERENCE
-#endif
-
# ifdef _WIN32
// We must be careful including windows.h: it is really poisonous stuff!
// import all available standard stuff from std namespace
using namespace ::std;
-// for old MSVC compiler, some standard templates are defined in std::tr1 namespace,
-// and some missing ones are implemented here
-#if (defined(_MSC_VER) && (_MSC_VER < 1600))
- using namespace ::std::tr1;
-
- // C++11 template class enable_if
- template <bool Test, class Type = void>
- struct enable_if
- { // type is undefined for assumed !_Test
- };
-
- template <class _Type>
- struct enable_if<true, _Type>
- { // type is _Type for _Test
- typedef _Type type;
- };
-
- template <bool Condition, typename TypeTrue, typename TypeFalse>
- struct conditional
- {
- typedef TypeTrue type;
- };
-
- template <typename TypeTrue, typename TypeFalse>
- struct conditional<false, TypeTrue, TypeFalse>
- {
- typedef TypeFalse type;
- };
-
-#endif
-
} // namespace std
//! Trait yielding true if class T1 is base of T2 but not the same
static_assert(opencascade::has_type<Base, direct_base_classes>::type::value, "OCCT RTTI definition is incorrect: " #Base " is not direct base class of " #Class); \
static_assert(&get_type_name == &Class::get_type_name, "OCCT RTTI definition is misplaced: current class is not " #Class);
-#elif (defined(_MSC_VER) && (_MSC_VER < 1600))
-
-// VC9 does not support static_assert and decltype at all
-#define OCCT_CHECK_BASE_CLASS(Class,Base)
-
#elif (defined(_MSC_VER) && (_MSC_VER >= 1900))
// VC14+ allow using address of member functions in static checks,
#include <cstddef>
#include <ctime>
-// VC9 does not have stdint.h
-#if(defined(_MSC_VER) && (_MSC_VER < 1600))
- // old MSVC - hasn't stdint header
- typedef unsigned __int8 uint8_t;
- typedef unsigned __int16 uint16_t;
- typedef unsigned __int32 uint32_t;
- typedef unsigned __int64 uint64_t;
-
- typedef signed __int8 int8_t;
- typedef signed __int16 int16_t;
- typedef signed __int32 int32_t;
- typedef signed __int64 int64_t;
-#else
- #include <stdint.h>
-#endif
+#include <stdint.h>
#if(defined(_MSC_VER) && (_MSC_VER < 1800))
// only Visual Studio 2013 (vc12) provides <cinttypes> header
if (stepmodel.IsNull() || stepro.IsNull()) return Standard_False;
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out | std::ios::trunc);
+ std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out | std::ios::trunc);
if (aStream.get() == NULL) {
ctx.CCheck(0)->AddFail("Step File could not be created");
//! Initializes a AsciiString with another AsciiString.
Standard_EXPORT TCollection_AsciiString(const TCollection_AsciiString& astring);
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move constructor
TCollection_AsciiString (TCollection_AsciiString&& theOther)
: mystring (theOther.mystring),
theOther.mystring = NULL;
theOther.mylength = 0;
}
-#endif
//! Initializes a AsciiString with copy of another AsciiString
//! concatenated with the message character.
//! Exchange the data of two strings (without reallocating memory).
Standard_EXPORT void Swap (TCollection_AsciiString& theOther);
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move assignment operator
TCollection_AsciiString& operator= (TCollection_AsciiString&& theOther) { Swap (theOther); return *this; }
-#endif
//! Frees memory allocated by AsciiString.
Standard_EXPORT ~TCollection_AsciiString();
//! Initializes a ExtendedString with another ExtendedString.
Standard_EXPORT TCollection_ExtendedString(const TCollection_ExtendedString& astring);
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move constructor
TCollection_ExtendedString (TCollection_ExtendedString&& theOther)
: mystring (theOther.mystring),
theOther.mystring = NULL;
theOther.mylength = 0;
}
-#endif
//! Creation by converting an Ascii string to an extended
//! string. The string is treated as having UTF-8 coding.
//! Exchange the data of two strings (without reallocating memory).
Standard_EXPORT void Swap (TCollection_ExtendedString& theOther);
-#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move assignment operator
TCollection_ExtendedString& operator= (TCollection_ExtendedString&& theOther) { Swap (theOther); return *this; }
-#endif
//! Frees memory allocated by ExtendedString.
Standard_EXPORT ~TCollection_ExtendedString();
if (anUseStream)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aFileStream = aFileSystem->OpenOStream (argv[2], std::ios::out | std::ios::binary);
+ std::shared_ptr<std::ostream> aFileStream = aFileSystem->OpenOStream (argv[2], std::ios::out | std::ios::binary);
isSaved = aModel->SaveAs (*aFileStream);
}
else
if (anUseStream)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aFileStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary);
+ std::shared_ptr<std::istream> aFileStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary);
isLoaded = aModel->Load (*aFileStream);
}
else
return Assign(Other);
}
-#ifndef OCCT_NO_RVALUE_REFERENCE
-
//! Move constructor
TopLoc_SListOfItemLocation (TopLoc_SListOfItemLocation&& theOther)
: myNode(std::move (theOther.myNode))
return *this;
}
-#endif
-
//! Returne true if this list is empty
Standard_Boolean IsEmpty() const
{
//! Creates a NULL Shape referring to nothing.
TopoDS_Shape() : myOrient (TopAbs_EXTERNAL) {}
-#ifndef OCCT_NO_RVALUE_REFERENCE
-
//! Generalized move constructor, accepting also sub-classes
//! (TopoDS_Shape hierarchy declares only fake sub-classes with no extra fields).
template<class T2>
return *this;
}
-#endif
-
//! Returns true if this shape is null. In other words, it
//! references no underlying shape with the potential to
//! be given a location and an orientation.
};
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aMatFile, anObjFile, aHtmlFile;
+ std::shared_ptr<std::ostream> aMatFile, anObjFile, aHtmlFile;
if (aDumpFile.EndsWith (".obj")
|| aDumpFile.EndsWith (".mtl"))
{
}
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aHtmlFile;
+ std::shared_ptr<std::ostream> aHtmlFile;
TCollection_AsciiString aFileNameBase, aFolder;
if (aDumpFile.EndsWith (".htm")
|| aDumpFile.EndsWith (".html"))
}
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aFile = aFileSystem->OpenOStream (aFilePath, std::ios::out | std::ios::trunc);
+ std::shared_ptr<std::ostream> aFile = aFileSystem->OpenOStream (aFilePath, std::ios::out | std::ios::trunc);
if (aFile.get() == NULL || !aFile->good())
{
OSD_Path thePath(aFile);
TCollection_AsciiString theFile;thePath.SystemName(theFile);
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> anOutFile = aFileSystem->OpenOStream (theFile, std::ios::out);
+ std::shared_ptr<std::ostream> anOutFile = aFileSystem->OpenOStream (theFile, std::ios::out);
if (anOutFile.get() == NULL)
{
return Standard_False;
aConv.Convert(anExtFace, anExtEdge);
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> anOutStream = aFileSystem->OpenOStream (aFile, std::ios::out);
+ std::shared_ptr<std::ostream> anOutStream = aFileSystem->OpenOStream (aFile, std::ios::out);
if (anOutStream.get() != NULL)
{
*anOutStream << aScene;
aConv.ConvertDocument(theDoc);
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> anOutStream = aFileSystem->OpenOStream (theFile, std::ios::out);
+ std::shared_ptr<std::ostream> anOutStream = aFileSystem->OpenOStream (theFile, std::ios::out);
if (anOutStream.get() != NULL)
{
*anOutStream << aScene;
myFileName = theFileName;
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::istream> aFileStream = aFileSystem->OpenIStream (myFileName, std::ios::in);
+ std::shared_ptr<std::istream> aFileStream = aFileSystem->OpenIStream (myFileName, std::ios::in);
if (aFileStream.get() != NULL && aFileStream->good())
{
myFileName = theFileName;
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
- opencascade::std::shared_ptr<std::ostream> aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out);
-
+ std::shared_ptr<std::ostream> aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out);
if (aFileStream.get() != NULL && aFileStream->good())
{
Write (theDocument, *aFileStream, theRange);