-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
namespace MED
{
//----------------------------------------------------------------------------
- class TFile;
- typedef boost::shared_ptr<TFile> PFile;
+ class TFileInternal;
+ typedef std::shared_ptr<TFileInternal> PFileInternal;
typedef enum {eLECTURE, eLECTURE_ECRITURE, eLECTURE_AJOUT, eCREATION} EModeAcces;
TWrapper& operator=(const TWrapper&);
public:
- TWrapper(const std::string& theFileName);
+ TWrapper(const std::string& theFileName, bool write, TFileInternal *tfileInst = nullptr, TInt theMajor=-1, TInt theVersion=-1);
virtual
~TWrapper();
EModeSwitch theMode = eFULL_INTERLACE,
ERepere theSystem = eCART,
EBooleen theIsElemNum = eVRAI,
- EBooleen theIsElemNames = eVRAI);
+ EBooleen theIsElemNames = eFAUX);
//! Create a MEDWrapper MED Nodes representation
virtual
TInt theNbElem,
EConnectivite theConnMode = eNOD,
EBooleen theIsElemNum = eVRAI,
- EBooleen theIsElemNames = eVRAI,
+ EBooleen theIsElemNames = eFAUX,
EModeSwitch theMode = eFULL_INTERLACE);
//! Create a MEDWrapper MED Cells representation
TErr* theErr = NULL);
protected:
- PFile myFile;
+ PFileInternal myFile;
+ TInt myMajor;
+ TInt myMinor;
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
//! Specialization of SharedPtr for TWrapper
template<>
- class MEDWRAPPER_EXPORT SharedPtr<TWrapper>: public boost::shared_ptr<TWrapper>
+ class MEDWRAPPER_EXPORT SharedPtr<TWrapper>: public std::shared_ptr<TWrapper>
{
public:
SharedPtr() {}
SharedPtr(TWrapper* p):
- boost::shared_ptr<TWrapper>(p)
+ std::shared_ptr<TWrapper>(p)
{}
template<class Y>
explicit SharedPtr(Y* p):
- boost::shared_ptr<TWrapper>(p)
+ std::shared_ptr<TWrapper>(p)
{}
template<class Y>
SharedPtr(const SharedPtr<Y>& r):
- boost::shared_ptr<TWrapper>(boost::dynamic_pointer_cast<TWrapper,Y>(r))
+ std::shared_ptr<TWrapper>(boost::dynamic_pointer_cast<TWrapper,Y>(r))
{}
template<class Y>
TWrapper*
get() const // never throws
{
- return boost::shared_ptr<TWrapper>::get();
+ return std::shared_ptr<TWrapper>::get();
}
};
}