1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

Error Corrections

This commit is contained in:
aba 2013-08-14 17:49:19 +04:00 committed by apn
parent aba5fc1923
commit fd45dddd93
17 changed files with 1184 additions and 241 deletions

View File

@ -55,7 +55,6 @@
#include <Transfer_FinderProcess.hxx> #include <Transfer_FinderProcess.hxx>
#include <TransferBRep_ShapeMapper.hxx> #include <TransferBRep_ShapeMapper.hxx>
#include <TransferBRep_OrientedShapeMapper.hxx>
#include <Transfer_TransientMapper.hxx> #include <Transfer_TransientMapper.hxx>
#include <Transfer_SimpleBinderOfTransient.hxx> #include <Transfer_SimpleBinderOfTransient.hxx>

View File

@ -130,7 +130,6 @@
#include <Transfer_FinderProcess.hxx> #include <Transfer_FinderProcess.hxx>
#include <TransferBRep_ShapeMapper.hxx> #include <TransferBRep_ShapeMapper.hxx>
#include <TransferBRep_OrientedShapeMapper.hxx>
#include <Transfer_TransientMapper.hxx> #include <Transfer_TransientMapper.hxx>
#include <Transfer_SimpleBinderOfTransient.hxx> #include <Transfer_SimpleBinderOfTransient.hxx>
#include <Interface_Static.hxx> #include <Interface_Static.hxx>

View File

@ -22,7 +22,7 @@
#ifndef _IGESBasic_HArray1OfHArray1Real_Handle_HeaderFile #ifndef _IGESBasic_HArray1OfHArray1Real_Handle_HeaderFile
#define _IGESBasic_HArray1OfHArray1Real_Handle_HeaderFile #define _IGESBasic_HArray1OfHArray1Real_Handle_HeaderFile
#include <IGESBasic_HArray1OfHArray1Ofreal.hxx> #include <IGESBasic_HArray1OfHArray1OfReal.hxx>
typedef Handle(IGESBasic_HArray1OfHArray1OfReal) IGESBasic_HArray1OfHArray1OfReal_Handle; typedef Handle(IGESBasic_HArray1OfHArray1OfReal) IGESBasic_HArray1OfHArray1OfReal_Handle;

View File

@ -22,7 +22,7 @@ typedef LibCtl_GlobalNode <Handle(IGESData_SpecificModule),
IGESData_GlobalNodeOfSpecificLib; IGESData_GlobalNodeOfSpecificLib;
template<> template<>
Standard_EXPORT static NCollection_Handle< IGESData_GlobalNodeOfSpecificLib >& Standard_EXPORT NCollection_Handle< IGESData_GlobalNodeOfSpecificLib >&
IGESData_SpecificLib::GetGlobal() IGESData_SpecificLib::GetGlobal()
{ {
static NCollection_Handle< IGESData_GlobalNodeOfSpecificLib > aGlobal; static NCollection_Handle< IGESData_GlobalNodeOfSpecificLib > aGlobal;

View File

@ -22,7 +22,7 @@ typedef LibCtl_GlobalNode <Handle(IGESData_ReadWriteModule),
IGESData_GlobalNodeOfWriterLib; IGESData_GlobalNodeOfWriterLib;
template<> template<>
Standard_EXPORT static NCollection_Handle< IGESData_GlobalNodeOfWriterLib >& Standard_EXPORT NCollection_Handle< IGESData_GlobalNodeOfWriterLib >&
IGESData_WriterLib::GetGlobal() IGESData_WriterLib::GetGlobal()
{ {
static NCollection_Handle< IGESData_GlobalNodeOfWriterLib > aGlobal; static NCollection_Handle< IGESData_GlobalNodeOfWriterLib > aGlobal;

View File

@ -31,7 +31,6 @@
#include <TColgp_HArray1OfXY.hxx> #include <TColgp_HArray1OfXY.hxx>
#include <TColStd_HArray1OfInteger.hxx> #include <TColStd_HArray1OfInteger.hxx>
#include <IGESBasic_HArray1OfHArray1OfInteger.hxx> #include <IGESBasic_HArray1OfHArray1OfInteger.hxx>
#include <IGESBasic_HArray1OfHArray1OfXY.hxx>
#include <IGESData_Dump.hxx> #include <IGESData_Dump.hxx>
#include <Interface_Macros.hxx> #include <Interface_Macros.hxx>

View File

@ -22,7 +22,7 @@ typedef LibCtl_GlobalNode <Handle(Interface_GeneralModule),
Interface_GlobalNodeOfGeneralLib; Interface_GlobalNodeOfGeneralLib;
template<> template<>
Standard_EXPORT static NCollection_Handle< Interface_GlobalNodeOfGeneralLib >& Standard_EXPORT NCollection_Handle< Interface_GlobalNodeOfGeneralLib >&
Interface_GeneralLib::GetGlobal() Interface_GeneralLib::GetGlobal()
{ {
static NCollection_Handle< Interface_GlobalNodeOfGeneralLib > aGlobal; static NCollection_Handle< Interface_GlobalNodeOfGeneralLib > aGlobal;

View File

@ -22,7 +22,7 @@ typedef LibCtl_GlobalNode <Handle(Interface_ReaderModule),
Interface_GlobalNodeOfReaderLib; Interface_GlobalNodeOfReaderLib;
template<> template<>
Standard_EXPORT static NCollection_Handle< Interface_GlobalNodeOfReaderLib >& Standard_EXPORT NCollection_Handle< Interface_GlobalNodeOfReaderLib >&
Interface_ReaderLib::GetGlobal() Interface_ReaderLib::GetGlobal()
{ {
static NCollection_Handle< Interface_GlobalNodeOfReaderLib > aGlobal; static NCollection_Handle< Interface_GlobalNodeOfReaderLib > aGlobal;

View File

@ -71,11 +71,11 @@ protected:
myHasNext = Standard_False; myHasNext = Standard_False;
} }
Standard_EXPORT void Interface_Recognizer::SetOK (const ResultType& theResult) Standard_EXPORT void SetOK (const ResultType& theResult)
{ {
myRes = theResult; myRes = theResult;
} }
Standard_EXPORT void Interface_Recognizer::SetKO () Standard_EXPORT void SetKO ()
{ {
myRes.Nullify(); myRes.Nullify();
} }

View File

@ -31,15 +31,14 @@ template <class ModuleType, class ProtocolType>
class LibCtl_Node class LibCtl_Node
{ {
private: private:
typedef LibCtl_GlobalNode<ModuleType, ProtocolType> LibCtl_GlobalNode;
NCollection_Handle < LibCtl_GlobalNode > myNode; NCollection_Handle < LibCtl_GlobalNode<ModuleType, ProtocolType> > myNode;
NCollection_Handle < LibCtl_Node > myNext; NCollection_Handle < LibCtl_Node > myNext;
public: public:
Standard_EXPORT LibCtl_Node (); Standard_EXPORT LibCtl_Node ();
Standard_EXPORT void AddNode (const NCollection_Handle< LibCtl_GlobalNode >& theNode); Standard_EXPORT void AddNode (const NCollection_Handle< LibCtl_GlobalNode<ModuleType, ProtocolType> >& theNode);
Standard_EXPORT const ModuleType& Module () const; Standard_EXPORT const ModuleType& Module () const;
Standard_EXPORT const ProtocolType& Protocol () const; Standard_EXPORT const ProtocolType& Protocol () const;
Standard_EXPORT const NCollection_Handle< LibCtl_Node >& Next () const; Standard_EXPORT const NCollection_Handle< LibCtl_Node >& Next () const;
@ -53,7 +52,7 @@ LibCtl_Node<ModuleType,ProtocolType>
//! Adds a couple (Module,Protocol), that is, stores it into //! Adds a couple (Module,Protocol), that is, stores it into
//! itself if not yet done, else creates a Next Node to do it. //! itself if not yet done, else creates a Next Node to do it.
template<class ModuleType, class ProtocolType> template<class ModuleType, class ProtocolType>
void LibCtl_Node<ModuleType,ProtocolType>::AddNode (const NCollection_Handle< LibCtl_GlobalNode >& theNode) void LibCtl_Node<ModuleType,ProtocolType>::AddNode (const NCollection_Handle< LibCtl_GlobalNode<ModuleType, ProtocolType> >& theNode)
{ {
if (myNode == theNode) return; if (myNode == theNode) return;
if (myNext.IsNull()) { if (myNext.IsNull()) {
@ -181,29 +180,25 @@ LibCtl_GlobalNode <ModuleType,ProtocolType>::Next () const
template <class ObjectType, class ModuleType, class ProtocolType> template <class ObjectType, class ModuleType, class ProtocolType>
class LibCtl_Library class LibCtl_Library
{ {
public:
// Type definitions for template classes
typedef LibCtl_GlobalNode<ModuleType, ProtocolType> LibCtl_GlobalNode;
typedef LibCtl_Node<ModuleType, ProtocolType> LibCtl_Node;
public: public:
// Basic data for optimization (Protocol last request) // Basic data for optimization (Protocol last request)
static ProtocolType myProtocol; static ProtocolType myProtocol;
static NCollection_Handle< LibCtl_Node > myLast; static NCollection_Handle< LibCtl_Node<ModuleType, ProtocolType> > myLast;
DEFINE_STANDARD_ALLOC DEFINE_STANDARD_ALLOC
private: private:
NCollection_Handle< LibCtl_Node > myList; NCollection_Handle< LibCtl_Node<ModuleType, ProtocolType> > myList;
NCollection_Handle< LibCtl_Node > myCurr; NCollection_Handle< LibCtl_Node<ModuleType, ProtocolType> > myCurr;
public: public:
//! Gets global list of modules //! Gets global list of modules
static NCollection_Handle< LibCtl_GlobalNode >& GetGlobal(); static NCollection_Handle< LibCtl_GlobalNode<ModuleType, ProtocolType> >& GetGlobal();
//! Supply the global list //! Supply the global list
Standard_EXPORT static void SetGlobal (const ModuleType& theModule, const ProtocolType& theProtocol) Standard_EXPORT static void SetGlobal (const ModuleType& theModule, const ProtocolType& theProtocol)
{ {
if (GetGlobal().IsNull()) GetGlobal() = new LibCtl_GlobalNode; if (GetGlobal().IsNull()) GetGlobal() = new LibCtl_GlobalNode<ModuleType, ProtocolType>;
GetGlobal()->Add(theModule,theProtocol); GetGlobal()->Add(theModule,theProtocol);
} }
@ -238,7 +233,7 @@ public:
ProtocolType aProtocol = ProtocolType::DownCast(theProtocol); ProtocolType aProtocol = ProtocolType::DownCast(theProtocol);
if (aProtocol.IsNull()) return; if (aProtocol.IsNull()) return;
NCollection_Handle< LibCtl_GlobalNode > curr; NCollection_Handle< LibCtl_GlobalNode<ModuleType, ProtocolType> > curr;
for (curr = GetGlobal(); !curr.IsNull(); ) for (curr = GetGlobal(); !curr.IsNull(); )
{ {
const ProtocolType& aProtocol = curr->Protocol(); const ProtocolType& aProtocol = curr->Protocol();
@ -248,7 +243,7 @@ public:
if (aProtocol->DynamicType() == theProtocol->DynamicType()) if (aProtocol->DynamicType() == theProtocol->DynamicType())
{ {
if (myList.IsNull()) if (myList.IsNull())
myList = new LibCtl_Node; myList = new LibCtl_Node<ModuleType, ProtocolType>;
myList->AddNode(curr); myList->AddNode(curr);
break; // UN SEUL MODULE PAR PROTOCOLE break; // UN SEUL MODULE PAR PROTOCOLE
@ -269,14 +264,14 @@ public:
Standard_EXPORT void Clear () Standard_EXPORT void Clear ()
{ {
myList = new LibCtl_Node(); myList = new LibCtl_Node <ModuleType, ProtocolType>;
} }
Standard_EXPORT void SetComplete () Standard_EXPORT void SetComplete ()
{ {
myList = new LibCtl_Node; myList = new LibCtl_Node <ModuleType, ProtocolType>;
// Take each of the protocols of the Global list // Take each of the protocols of the Global list
NCollection_Handle< LibCtl_GlobalNode > curr; NCollection_Handle< LibCtl_GlobalNode<ModuleType, ProtocolType> > curr;
for (curr = GetGlobal(); !curr.IsNull(); ) for (curr = GetGlobal(); !curr.IsNull(); )
{ {
const ProtocolType& aProtocol = curr->Protocol(); const ProtocolType& aProtocol = curr->Protocol();
@ -296,7 +291,7 @@ public:
theModule.Nullify(); theCN = 0; theModule.Nullify(); theCN = 0;
if (myList.IsNull()) if (myList.IsNull())
return Standard_False; return Standard_False;
NCollection_Handle< LibCtl_Node > curr = myList; NCollection_Handle< LibCtl_Node<ModuleType, ProtocolType> > curr = myList;
for (curr = myList; !curr.IsNull(); ) for (curr = myList; !curr.IsNull(); )
{ {
const ProtocolType& aProtocol = curr->Protocol(); const ProtocolType& aProtocol = curr->Protocol();
@ -325,7 +320,7 @@ public:
return (!myCurr.IsNull()); return (!myCurr.IsNull());
} }
Standard_EXPORT void LibCtl_Library::Next () Standard_EXPORT void Next ()
{ {
if (!myCurr.IsNull()) if (!myCurr.IsNull())
myCurr = myCurr->Next(); myCurr = myCurr->Next();

View File

@ -23,7 +23,7 @@ typedef LibCtl_GlobalNode <Handle(StepData_ReadWriteModule),
StepData_GlobalNode; StepData_GlobalNode;
template <> template <>
Standard_EXPORT static NCollection_Handle< StepData_GlobalNode > & Standard_EXPORT NCollection_Handle< StepData_GlobalNode > &
StepData_WriterLib::GetGlobal() StepData_WriterLib::GetGlobal()
{ {
static NCollection_Handle < StepData_GlobalNode > aGlobal; static NCollection_Handle < StepData_GlobalNode > aGlobal;

View File

@ -107,7 +107,7 @@ public:
//! If it is False (creation default), each add Actor is //! If it is False (creation default), each add Actor is
//! set at the beginning of the list. //! set at the beginning of the list.
//! This allows to define default Actors (which are Last). //! This allows to define default Actors (which are Last).
Standard_EXPORT void SetLast (const Standard_Boolean theMode) Standard_EXPORT void SetLast (const Standard_Boolean theMode = Standard_True)
{ {
myLast = theMode; myLast = theMode;
} }

View File

@ -39,7 +39,12 @@ IMPLEMENT_DOWNCAST(Transfer_FinderProcess,Standard_Transient)
IMPLEMENT_STANDARD_RTTI(Transfer_FinderProcess) IMPLEMENT_STANDARD_RTTI(Transfer_FinderProcess)
Transfer_FinderProcess::Transfer_FinderProcess (const Standard_Integer theNb) Transfer_FinderProcess::Transfer_FinderProcess (const Standard_Integer theNb)
: Transfer_TransferProcess (theNb) { } : Transfer_TransferProcess < Handle(Transfer_ActorOfFinderProcess),
Transfer_TransferMapOfProcessForFinder,
Handle(Transfer_Finder),
Transfer_FindHasher,
Handle(Transfer_HSequenceOfFinder),
Transfer_IteratorOfProcessForFinder > (theNb) { }
void Transfer_FinderProcess::SetModel (const Handle(Interface_InterfaceModel)& theModel) void Transfer_FinderProcess::SetModel (const Handle(Interface_InterfaceModel)& theModel)
{ {

File diff suppressed because it is too large Load Diff

View File

@ -49,7 +49,13 @@ IMPLEMENT_STANDARD_RTTI(Transfer_TransientProcess)
//======================================================================= //=======================================================================
Transfer_TransientProcess::Transfer_TransientProcess Transfer_TransientProcess::Transfer_TransientProcess
(const Standard_Integer theNb) : Transfer_TransferProcess (theNb) (const Standard_Integer theNb)
: Transfer_TransferProcess < Handle(Transfer_ActorOfTransientProcess),
Transfer_TransferMapOfProcessForTransient,
Handle(Standard_Transient),
TColStd_MapTransientHasher,
Handle(TColStd_HSequenceOfTransient),
Transfer_IteratorOfProcessForTransient > (theNb)
{ {
theTrRoots = new TColStd_HSequenceOfTransient; theTrRoots = new TColStd_HSequenceOfTransient;
} }

View File

@ -72,20 +72,20 @@ class Transfer_TransientProcess
public: public:
//! Sets TransientProcess at initial state, with an initial size <br> //! Sets TransientProcess at initial state, with an initial size <br>
Standard_EXPORT Transfer_TransientProcess(const Standard_Integer theNb = 10000); Standard_EXPORT Transfer_TransientProcess (const Standard_Integer theNb = 10000);
//! Sets an InterfaceModel, used by StartTrace, CheckList, queries <br> //! Sets an InterfaceModel, used by StartTrace, CheckList, queries <br>
//! on Integrity, to give informations significant for each norm. <br> //! on Integrity, to give informations significant for each norm. <br>
Standard_EXPORT void SetModel(const Handle(Interface_InterfaceModel)& theModel) ; Standard_EXPORT void SetModel (const Handle(Interface_InterfaceModel)& theModel) ;
//! Returns the Model used for StartTrace <br> //! Returns the Model used for StartTrace <br>
Standard_EXPORT Handle_Interface_InterfaceModel Model() const; Standard_EXPORT Handle_Interface_InterfaceModel Model () const;
//! Sets a Graph : superseedes SetModel if already done <br> //! Sets a Graph : superseedes SetModel if already done <br>
Standard_EXPORT void SetGraph(const Handle(Interface_HGraph)& theHG) ; Standard_EXPORT void SetGraph(const Handle(Interface_HGraph)& theHG) ;
Standard_EXPORT Standard_Boolean HasGraph() const; Standard_EXPORT Standard_Boolean HasGraph () const;
Standard_EXPORT Handle_Interface_HGraph HGraph() const; Standard_EXPORT Handle_Interface_HGraph HGraph () const;
Standard_EXPORT const Interface_Graph& Graph() const; Standard_EXPORT const Interface_Graph& Graph () const;
//! Sets a Context : according to receiving appli, to be <br> //! Sets a Context : according to receiving appli, to be <br>
//! interpreted by the Actor <br> //! interpreted by the Actor <br>
Standard_EXPORT void SetContext (const Standard_CString theName, Standard_EXPORT void SetContext (const Standard_CString theName,
@ -98,7 +98,7 @@ public:
Handle(Standard_Transient)& theCtx) const; Handle(Standard_Transient)& theCtx) const;
//! Returns (modifiable) the whole definition of Context <br> //! Returns (modifiable) the whole definition of Context <br>
//! Rather for internal use (ex.: preparing and setting in once) <br> //! Rather for internal use (ex.: preparing and setting in once) <br>
Standard_EXPORT Handle_Dico_DictionaryOfTransient& Context() ; Standard_EXPORT Handle_Dico_DictionaryOfTransient& Context () ;
//! Specific printing to trace an entity : prints label and type <br> //! Specific printing to trace an entity : prints label and type <br>
//! (if model is set) <br> //! (if model is set) <br>
Standard_EXPORT virtual void PrintTrace (const Handle(Standard_Transient)& theStart, Standard_EXPORT virtual void PrintTrace (const Handle(Standard_Transient)& theStart,
@ -121,7 +121,7 @@ public:
//! syntactic, or semantic check). Normally, should answer False. <br> //! syntactic, or semantic check). Normally, should answer False. <br>
//! It is not prudent to try transferring an entity which fails on <br> //! It is not prudent to try transferring an entity which fails on <br>
//! data checking <br> //! data checking <br>
Standard_EXPORT Standard_Boolean IsDataFail(const Handle(Standard_Transient)& theEnt) const; Standard_EXPORT Standard_Boolean IsDataFail (const Handle(Standard_Transient)& theEnt) const;
//! Prints statistics on a given output, according mode <br> //! Prints statistics on a given output, according mode <br>
Standard_EXPORT void PrintStats (const Standard_Integer theMode, Standard_EXPORT void PrintStats (const Standard_Integer theMode,
const Handle(Message_Messenger)& theMessenger) const; const Handle(Message_Messenger)& theMessenger) const;

View File

@ -46,7 +46,6 @@
//#include <TransferBRep_ShapeBinder.hxx> //#include <TransferBRep_ShapeBinder.hxx>
//#include <TransferBRep_ShapeListBinder.hxx> //#include <TransferBRep_ShapeListBinder.hxx>
//#include <TransferBRep_ShapeMapper.hxx> //#include <TransferBRep_ShapeMapper.hxx>
//#include <TransferBRep_OrientedShapeMapper.hxx>
#include <XSControl_TransferWriter.hxx> #include <XSControl_TransferWriter.hxx>
#include <XSControl_TransferReader.hxx> #include <XSControl_TransferReader.hxx>