0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / src / XSControl / XSControl_Functions.cxx
index 727bf05..09c3e14 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#include <XSControl_Functions.ixx>
 
-#include <XSControl.hxx>
-#include <XSControl_Controller.hxx>
-#include <MoniTool_Profile.hxx>
-#include <MoniTool_Option.hxx>
-#include <MoniTool_TypedValue.hxx>
-#include <Interface_Static.hxx>
-#include <TColStd_HSequenceOfAsciiString.hxx>
-
-#include <XSControl_WorkSession.hxx>
+#include <Dico_IteratorOfDictionaryOfInteger.hxx>
 #include <IFSelect_Act.hxx>
-#include <IFSelect_SessionPilot.hxx>
+#include <IFSelect_CheckCounter.hxx>
 #include <IFSelect_Functions.hxx>
+#include <IFSelect_SessionPilot.hxx>
+#include <Interface_CheckIterator.hxx>
+#include <Interface_InterfaceModel.hxx>
+#include <Interface_Macros.hxx>
+#include <Interface_Static.hxx>
+#include <Message.hxx>
+#include <Message_Messenger.hxx>
+#include <MoniTool_Option.hxx>
+#include <MoniTool_Profile.hxx>
+#include <MoniTool_TypedValue.hxx>
 #include <TCollection_HAsciiString.hxx>
+#include <TColStd_HSequenceOfAsciiString.hxx>
 #include <TColStd_HSequenceOfHAsciiString.hxx>
-
-#include <Interface_InterfaceModel.hxx>
-#include <Transfer_TransientProcess.hxx>
-#include <Transfer_FinderProcess.hxx>
+#include <TColStd_HSequenceOfTransient.hxx>
 #include <Transfer_Binder.hxx>
-#include <Interface_CheckIterator.hxx>
-#include <IFSelect_CheckCounter.hxx>
-#include <Transfer_TransferIterator.hxx>
+#include <Transfer_FinderProcess.hxx>
 #include <Transfer_IteratorOfProcessForTransient.hxx>
-
-#include <Dico_IteratorOfDictionaryOfInteger.hxx>
+#include <Transfer_ResultFromModel.hxx>
+#include <Transfer_TransferIterator.hxx>
+#include <Transfer_TransientProcess.hxx>
+#include <XSControl.hxx>
+#include <XSControl_Controller.hxx>
+#include <XSControl_Functions.hxx>
+#include <XSControl_SelectForTransfer.hxx>
+#include <XSControl_TransferReader.hxx>
+#include <XSControl_TransferWriter.hxx>
+#include <XSControl_WorkSession.hxx>
 
 //#include <TransferBRep_ShapeBinder.hxx>
 //#include <TransferBRep_ShapeListBinder.hxx>
 //#include <TransferBRep_ShapeMapper.hxx>
 //#include <TransferBRep_OrientedShapeMapper.hxx>
-
-#include <XSControl_TransferWriter.hxx>
-#include <XSControl_TransferReader.hxx>
-#include <TColStd_HSequenceOfTransient.hxx>
-#include <Transfer_ResultFromModel.hxx>
-#include <XSControl_SelectForTransfer.hxx>
-
-#include <Interface_Macros.hxx>
-#include <Message_Messenger.hxx>
-#include <Message.hxx>
-
 // #######################################################################
 // ##                                                                  ##
 // ##                                                                  ##
@@ -61,8 +55,6 @@
 // ##                                                                  ##
 // ##                                                                  ##
 // #######################################################################
-
-
 //=======================================================================
 //function : xinit
 //=======================================================================
@@ -332,7 +324,8 @@ static IFSelect_ReturnStatus XSControl_xoption(const Handle(IFSelect_SessionPilo
     Handle(Interface_Static) param = Interface_Static::Static(parname);
     if (param.IsNull()) { sout<<"No static parameter is named "<<parname<<endl;
                          return IFSelect_RetError; }
-    Handle(MoniTool_Option) opt = new MoniTool_Option(param,arg2);
+    const Handle(MoniTool_TypedValue)& aparam = param; // to avoid ambiguity
+    Handle(MoniTool_Option) opt = new MoniTool_Option(aparam,arg2);
     prof->AddOption (opt);
     return IFSelect_RetDone;
   }
@@ -450,16 +443,16 @@ static IFSelect_ReturnStatus XSControl_tpstat(const Handle(IFSelect_SessionPilot
   if (mod1 < -1) sout<<"Unknown Mode"<<endl;
   if (mod1 < 0) {
     sout<<"Modes available :\n"
-      <<"g : general    c : checks (count)  C (list)"<<"\n"
-      <<"               f : fails  (count)  F (list)"<<"\n"
-      <<"  n : numbers of transferred entities (on TRANSFER ROOTS)"<<"\n"
-      <<"  s : their status (type entity-result , presence checks)"<<"\n"
-      <<"  b : detail of binders"<<"\n"
-      <<"  t : count per entity type    r : per type/status result"<<"\n"
-      <<"  l : count per couple  type entity/result"<<"\n"
-      <<"  L : list  per couple  type entity/result"<<"\n"
-      <<"  *n  *s  *b  *t  *r  *l  *L : idem on ALL recorded items"<<"\n"
-      <<"  ?n  ?s  ?b  ?t ... : idem on abnormal items"<<"\n"
+      <<"g : general    c : checks (count)  C (list)\n"
+      <<"               f : fails  (count)  F (list)\n"
+      <<"  n : numbers of transferred entities (on TRANSFER ROOTS)\n"
+      <<"  s : their status (type entity-result , presence checks)\n"
+      <<"  b : detail of binders\n"
+      <<"  t : count per entity type    r : per type/status result\n"
+      <<"  l : count per couple  type entity/result\n"
+      <<"  L : list  per couple  type entity/result\n"
+      <<"  *n  *s  *b  *t  *r  *l  *L : idem on ALL recorded items\n"
+      <<"  ?n  ?s  ?b  ?t ... : idem on abnormal items\n"
       <<"  n select : n applied on a selection   idem for  s b t r l"<<endl;
     if (mod1 < -1) return IFSelect_RetError;
     return IFSelect_RetVoid;