0024430: vviewlist draw command does not added name of viewer created by XShow draw...
[occt.git] / src / DPrsStd / DPrsStd_AISPresentationCommands.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 0ed655f..55f0237
@@ -1,8 +1,18 @@
-// File:       DPrsStd_AISPresentationCommands.cxx
-// Created:    Wed Oct  7 11:24:34 1998
-// Author:     Denis PASCAL
-//             <dp@dingox.paris1.matra-dtv.fr>
-
+// Created on: 1998-10-07
+// Created by: Denis PASCAL
+// Copyright (c) 1998-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 #include <DPrsStd.hxx>
 #include <Draw.hxx>
@@ -30,7 +40,6 @@
 #include <AIS_InteractiveObject.hxx>
 #include <AIS_Drawer.hxx> 
 #include <ViewerTest.hxx>
-#include <ViewerTest_Tool.hxx>
 #include <V3d_View.hxx>
 #include <TCollection_ExtendedString.hxx>
 #include <Quantity_NameOfColor.hxx>
@@ -52,7 +61,7 @@
 //purpose  : DDisplay (DOC,entry, not_update)
 //=======================================================================
 
-static Standard_Integer DPrsStd_AISDisplay (Draw_Interpretor& di,
+static Standard_Integer DPrsStd_AISDisplay (Draw_Interpretor&,
                                          Standard_Integer nb, 
                                          const char** arg) 
 {   
@@ -73,8 +82,6 @@ static Standard_Integer DPrsStd_AISDisplay (Draw_Interpretor& di,
     TPrsStd_AISViewer::Update(L);
     return 0;
   }
-  di << "DPrsStd_AISDisplay : Error" << "\n";
-  return 1;
 }
 
 //=======================================================================
@@ -313,7 +320,7 @@ static Standard_Integer DPrsStd_AISTransparency (Draw_Interpretor& di,
     Handle(TPrsStd_AISPresentation) prs;
     if(L.FindAttribute( TPrsStd_AISPresentation::GetID(), prs) ) {   
       if( nb == 4 ) {
-       prs->SetTransparency(atof(arg[3]));
+       prs->SetTransparency(Draw::Atof(arg[3]));
        TPrsStd_AISViewer::Update(L);
       }
       else {
@@ -380,7 +387,7 @@ static Standard_Integer DPrsStd_AISColor (Draw_Interpretor& di,
     Handle(TPrsStd_AISPresentation) prs;
     if(L.FindAttribute( TPrsStd_AISPresentation::GetID(), prs) ) {   
       if( nb == 4 ) {
-       prs->SetColor((Quantity_NameOfColor)atoi(arg[3]));
+       prs->SetColor((Quantity_NameOfColor)Draw::Atoi(arg[3]));
        TPrsStd_AISViewer::Update(L);
       }
       else
@@ -449,7 +456,7 @@ static Standard_Integer DPrsStd_AISMaterial (Draw_Interpretor& di,
     Handle(TPrsStd_AISPresentation) prs;
     if(L.FindAttribute( TPrsStd_AISPresentation::GetID(), prs) ) {   
       if( nb == 4 ) {
-       prs->SetMaterial((Graphic3d_NameOfMaterial)atoi(arg[3]));
+       prs->SetMaterial((Graphic3d_NameOfMaterial)Draw::Atoi(arg[3]));
        TPrsStd_AISViewer::Update(L);
       }
       else {