0024023: Revamp the OCCT Handle -- general

Missing headers added; includes of headers "Handle_...hxx" removed.

Misuses of macro Handle() and its use in typedefs corrected.

Alias classes Profile and Option are removed from IFSelect; ones defined in MoniTool are used directly.

Removed header files defining only Handle classes (except Image_PixMap_Handle.hxx)

Classes SelectMgr_BaseFrustum and now inherit Standard_Transient and can be manipulated by Handle (not NCollection_Handle)

Fixed reference-type local variable pointing to temporary object

Use of handle in conditional expressions and comparisons to NULL are replaced by call to method IsNull()
This commit is contained in:
abv
2015-06-30 10:25:12 +03:00
parent 35c0599a42
commit c04c30b3ee
311 changed files with 725 additions and 1175 deletions

View File

@@ -128,9 +128,6 @@ is
class WorkSession; -- a set of useful facilities
deferred class WorkLibrary; -- capability of user extents
alias Option is Option from MoniTool; -- pre-defined values for a field
alias Profile is Profile from MoniTool; -- set of options bound/piloted together
class SessionFile;
deferred class SessionDumper;
class BasicDumper;

View File

@@ -18,8 +18,8 @@
#include <TColStd_SequenceOfTransient.hxx>
#include <Standard_DomainError.hxx>
#include <IFSelect_Profile.hxx>
#include <IFSelect_Option.hxx>
#include <MoniTool_Profile.hxx>
#include <MoniTool_Option.hxx>
#include <TCollection_HAsciiString.hxx>
#include <Interface_Macros.hxx>
@@ -29,7 +29,7 @@ static Handle(Dico_DictionaryOfInteger) thedico; // = new Dico_DictionaryOfInteg
static TColStd_SequenceOfInteger thenums, themodes;
static TColStd_SequenceOfTransient theacts;
static Handle(IFSelect_Profile) thealiases;
static Handle(MoniTool_Profile) thealiases;
void IFSelect_Activator::Adding
@@ -61,7 +61,6 @@ static Handle(IFSelect_Profile) thealiases;
(const Standard_Integer number, const Standard_CString command) const
{ Adding (this,number,command,1); }
void IFSelect_Activator::Remove (const Standard_CString command)
{ thedico->RemoveItem(command); }
@@ -76,10 +75,10 @@ static Handle(IFSelect_Profile) thealiases;
(const Standard_CString conf,
const Standard_CString command, const Standard_CString alias)
{
if (thealiases.IsNull()) thealiases = new IFSelect_Profile;
Handle(IFSelect_Option) opt = thealiases->Option(command);
if (thealiases.IsNull()) thealiases = new MoniTool_Profile;
Handle(MoniTool_Option) opt = thealiases->Option(command);
if (opt.IsNull()) {
opt = new IFSelect_Option(STANDARD_TYPE(TCollection_HAsciiString),command);
opt = new MoniTool_Option(STANDARD_TYPE(TCollection_HAsciiString),command);
thealiases->AddOption (opt);
}
opt->Add (conf,new TCollection_HAsciiString(alias));
@@ -101,7 +100,7 @@ static Handle(IFSelect_Profile) thealiases;
Handle(TCollection_HAsciiString) val;
if (!thealiases->Value(command,val)) return str;
str.AssignCat (val->ToCString());
return str;
return str;
}

View File

@@ -21,6 +21,7 @@
#include <TCollection_HAsciiString.hxx>
#include <IFSelect_SignType.hxx>
#include <IFSelect_SignatureList.hxx>
#include <IFSelect_ShareOut.hxx>
#include <IFSelect_IntParam.hxx>
#include <TColStd_HSequenceOfAsciiString.hxx>
#include <TColStd_HSequenceOfHAsciiString.hxx>

View File

@@ -22,6 +22,7 @@
#include <IFSelect_SelectCombine.hxx>
#include <IFSelect_SelectAnyType.hxx>
#include <IFSelect_SelectAnyList.hxx>
#include <IFSelect_ShareOut.hxx>
#include <IFSelect_Dispatch.hxx>
#include <IFSelect_Modifier.hxx>
#include <IFSelect_Transformer.hxx>