Salome HOME
Update Help for VISU module.
[modules/visu.git] / src / VISU_I / VISU_DumpPython.cc
index 343f15efeec7aa169eccfd7d72f03067bcd83907..91b8ef80fbdc5f9a9d214cca5d7dd3585dbea8ff 100644 (file)
@@ -1,23 +1,23 @@
 //  VISU OBJECT : interactive object for VISU entities implementation
 //
 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
 //
 //
 //  File   : VISU_DumpPython.cc
 #include "VISU_CutLines_i.hh"
 #include "VISU_Vectors_i.hh"
 #include "VISU_StreamLines_i.hh"
+#include "VISU_Plot3D_i.hh"
 #include "VISU_Table_i.hh"
 
 #include "utilities.h"
 
-#include <cctype>      
-#include <strstream>   
-#include <functional>  
+#include <cctype>
+#include <strstream>
+#include <functional>
 
 #include <qstring.h>
 #include <qfileinfo.h>
@@ -59,8 +60,8 @@ namespace VISU{
   typedef std::map<std::string,std::string> TEntry2NameMap;
 
   inline
-  std::string 
-  GenerateName(std::string theName, 
+  std::string
+  GenerateName(std::string theName,
               SALOMEDS::SObject_ptr theSObject,
               TName2EntryMap& theName2EntryMap,
               TEntry2NameMap& theEntry2NameMap,
@@ -86,7 +87,7 @@ namespace VISU{
   };
 
   inline
-  std::string 
+  std::string
   GetName(SALOMEDS::SObject_ptr theSObject)
   {
     CORBA::String_var aString = theSObject->GetName();
@@ -103,7 +104,7 @@ namespace VISU{
   }
 
   inline
-  std::string 
+  std::string
   GenerateName(SALOMEDS::SObject_ptr theSObject,
               TName2EntryMap& theName2EntryMap,
               TEntry2NameMap& theEntry2NameMap)
@@ -141,7 +142,7 @@ namespace VISU{
   //===========================================================================
   std::string
   ScalarMapToPython(SALOMEDS::SObject_ptr theSObject,
-                   VISU::ScalarMap_i* theServant, 
+                   VISU::ScalarMap_i* theServant,
                    std::ostream& theStr,
                    std::string& theName,
                    const std::string& theConstructorName,
@@ -177,7 +178,7 @@ namespace VISU{
     theStr<<thePrefix<<"aName2ObjectMap['"<<theName<<"'] = "<<theName<<endl;
 
     theStr<<thePrefix<<theName<<".SetScalarMode("<<theServant->GetScalarMode()<<")"<<endl;
-    
+
     switch(theServant->GetScaling()){
     case LINEAR:
       aParam = "VISU.LINEAR";
@@ -188,7 +189,7 @@ namespace VISU{
     }
     theStr<<thePrefix<<theName<<".SetScaling("<<aParam<<")"<<endl;
     theStr<<thePrefix<<theName<<".SetRange("<<theServant->GetMin()<<","<<theServant->GetMax()<<")"<<endl;
-    
+
     switch(theServant->GetBarOrientation()){
     case ScalarMap::HORIZONTAL:
       aParam = "VISU.ScalarMap.HORIZONTAL";
@@ -198,7 +199,7 @@ namespace VISU{
       break;
     }
     theStr<<thePrefix<<theName<<".SetBarOrientation("<<aParam<<")"<<endl;
-    
+
     theStr<<thePrefix<<theName<<".SetPosition("<<theServant->GetPosX()<<","<<theServant->GetPosY()<<")"<<endl;
     theStr<<thePrefix<<theName<<".SetSize("<<theServant->GetWidth()<<","<<theServant->GetHeight()<<")"<<endl;
     theStr<<thePrefix<<theName<<".SetNbColors("<<theServant->GetNbColors()<<")"<<endl;
@@ -212,7 +213,7 @@ namespace VISU{
   //===========================================================================
   std::string
   DeformedShapeToPython(SALOMEDS::SObject_ptr theSObject,
-                       VISU::DeformedShape_i* theServant, 
+                       VISU::DeformedShape_i* theServant,
                        std::ostream& theStr,
                        std::string& theName,
                        const std::string& theConstructorName,
@@ -240,7 +241,7 @@ namespace VISU{
                            TEntry2NameMap& theEntry2NameMap,
                            std::string theArgumentName,
                            std::string thePrefix);
-  
+
   //===========================================================================
   template<class TTableAttr>
   void
@@ -256,13 +257,13 @@ namespace VISU{
                    std::string theArgumentName,
                    std::string thePrefix)
   {
-    SALOMEDS::GenericAttribute_var anAttr; 
+    SALOMEDS::GenericAttribute_var anAttr;
     SALOMEDS::SObject_var aFatherSObject = theSObject->GetFather();
     if(aFatherSObject->FindAttribute(anAttr,"AttributeComment")){
-      SALOMEDS::AttributeComment_var aComment = 
+      SALOMEDS::AttributeComment_var aComment =
        SALOMEDS::AttributeComment::_narrow(anAttr);
       CORBA::String_var aValue = aComment->Value();
-      Storable::TRestoringMap aMap;      
+      Storable::TRestoringMap aMap;
       Storable::StrToMap(aValue.in(),aMap);
       bool anIsExist;
       QString aMethodName = VISU::Storable::FindValue(aMap,"myComment",&anIsExist);
@@ -354,7 +355,7 @@ namespace VISU{
       theStr<<thePrefix<<"anID = "<<aSObjectName<<".GetID()"<<endl;
       theStr<<thePrefix<<aName<<" = aVisu.CreateTable(anID)"<<endl;
       theArgumentName = aName;
-      
+
       theStr<<thePrefix<<"if "<<aName<<":"<<endl;
       std::string aPrefix2 = thePrefix + PREFIX;
 
@@ -418,9 +419,9 @@ namespace VISU{
   {
     SALOMEDS::GenericAttribute_var anAttr;
     if(theSObject->FindAttribute(anAttr,"AttributeTableOfInteger")){
-      SALOMEDS::AttributeTableOfInteger_var aTableAttr =  
+      SALOMEDS::AttributeTableOfInteger_var aTableAttr =
        SALOMEDS::AttributeTableOfInteger::_narrow(anAttr);
-      
+
       TableAttrToPython(theStudy,
                        theIsPublished,
                        theIsValidScript,
@@ -432,11 +433,11 @@ namespace VISU{
                        theEntry2NameMap,
                        theArgumentName,
                        thePrefix);
-      
+
     }else if(theSObject->FindAttribute(anAttr,"AttributeTableOfReal")){
-      SALOMEDS::AttributeTableOfReal_var aTableAttr =  
+      SALOMEDS::AttributeTableOfReal_var aTableAttr =
        SALOMEDS::AttributeTableOfReal::_narrow(anAttr);
-      
+
       TableAttrToPython(theStudy,
                        theIsPublished,
                        theIsValidScript,
@@ -486,14 +487,14 @@ namespace VISU{
              case Result_i::eImportFile:
                theStr<<thePrefix<<aName<<" = aVisu.ImportFile('"<<aFileName<<"')"<<endl;
                break;
-             case Result_i::eCopyAndImportFile: 
+             case Result_i::eCopyAndImportFile:
                theStr<<thePrefix<<aName<<" = aVisu.CopyAndImportFile('"<<aFileName<<"')"<<endl;
                break;
              }
 
              theStr<<thePrefix<<"if "<<aName<<":"<<endl;
              thePrefix += PREFIX;
-             
+
              theArgumentName = aName;
              DumpChildrenToPython(theStudy,
                                   theIsPublished,
@@ -504,7 +505,7 @@ namespace VISU{
                                   theEntry2NameMap,
                                   theArgumentName,
                                   thePrefix);
-             
+
              theStr<<thePrefix<<"pass"<<endl<<endl;
            }else{
              SALOMEDS::SObject_var aRefSObj;
@@ -521,7 +522,7 @@ namespace VISU{
                  thePrefix += PREFIX;
 
                  switch(anId){
-                 case Result_i::eImportMed: 
+                 case Result_i::eImportMed:
                    theStr<<thePrefix<<aName<<" = aVisu.ImportMed(aSObject)"<<endl;
                    break;
                  case Result_i::eImportMedField:
@@ -532,7 +533,7 @@ namespace VISU{
                  theStr<<thePrefix<<"if "<<aName<<":"<<endl;
                  std::string aPrefix2 = thePrefix;
                  thePrefix += PREFIX;
-                 
+
                  theArgumentName = aName;
                  DumpChildrenToPython(theStudy,
                                       theIsPublished,
@@ -543,7 +544,7 @@ namespace VISU{
                                       theEntry2NameMap,
                                       theArgumentName,
                                       thePrefix);
-             
+
                  theStr<<thePrefix<<"pass"<<endl<<endl;
                  theStr<<aPrefix2<<"pass"<<endl<<endl;
                  theStr<<aPrefix1<<"pass"<<endl<<endl;
@@ -572,7 +573,7 @@ namespace VISU{
                aParam = "VISU.CELL";
                break;
              }
-             
+
              if(aSubMeshName == "")
                theStr<<thePrefix<<aName<<" = aVisu.MeshOnEntity("<<theArgumentName<<
                  ",'"<<aServant->GetMeshName()<<"'"<<
@@ -589,7 +590,7 @@ namespace VISU{
                ",'"<<aServant->GetMeshName()<<"'"<<
                ",'"<<aSubMeshName<<"'"<<
                ")"<<endl;
-           
+
            theStr<<thePrefix<<"if "<<aName<<":"<<endl;
            thePrefix += PREFIX;
 
@@ -599,15 +600,15 @@ namespace VISU{
            aColor = aServant->GetCellColor();
            theStr<<thePrefix<<aName<<".SetCellColor(SALOMEDS.Color("<<
              aColor.R<<","<<aColor.G<<","<<aColor.B<<"))"<<endl;
-           
+
            aColor = aServant->GetNodeColor();
            theStr<<thePrefix<<aName<<".SetNodeColor(SALOMEDS.Color("<<
              aColor.R<<","<<aColor.G<<","<<aColor.B<<"))"<<endl;
-           
+
            aColor = aServant->GetLinkColor();
            theStr<<thePrefix<<aName<<".SetLinkColor(SALOMEDS.Color("<<
              aColor.R<<","<<aColor.G<<","<<aColor.B<<"))"<<endl;
-           
+
            std::string aParam;
            switch(aServant->GetPresentationType()){
            case POINT:
@@ -641,7 +642,7 @@ namespace VISU{
                                 theEntry2NameMap,
                                 theArgumentName,
                                 thePrefix);
-             
+
            theStr<<thePrefix<<"pass"<<endl<<endl;
            return;
           }
@@ -661,7 +662,7 @@ namespace VISU{
         case VISU::TSTREAMLINES:
           if(StreamLines_i* aServant = dynamic_cast<StreamLines_i*>(GetServant(anObj).in())){
            thePrefix = DeformedShapeToPython(theSObject,aServant,theStr,aName,"StreamLinesOnField",theArgumentName,thePrefix);
-           
+
            std::string aParam;
            switch(aServant->GetDirection()){
            case StreamLines::FORWARD:
@@ -687,7 +688,7 @@ namespace VISU{
                theStr<<thePrefix<<"aPrs3d = aName2ObjectMap['"<<anArg<<"']"<<endl;
              }
            }
-           
+
            theStr<<thePrefix<<aName<<".SetParams("<<
              aServant->GetIntegrationStep()<<","<<
              aServant->GetPropagationTime()<<","<<
@@ -703,9 +704,9 @@ namespace VISU{
         case VISU::TVECTORS:
           if(Vectors_i* aServant = dynamic_cast<Vectors_i*>(GetServant(anObj).in())){
            thePrefix = DeformedShapeToPython(theSObject,aServant,theStr,aName,"VectorsOnField",theArgumentName,thePrefix);
-           
+
            theStr<<thePrefix<<aName<<".SetLineWidth("<<aServant->GetLineWidth()<<")"<<endl;
-           
+
            std::string aParam;
            switch(aServant->GetGlyphType()){
            case Vectors::ARROW:
@@ -722,7 +723,7 @@ namespace VISU{
              break;
            }
            theStr<<thePrefix<<aName<<".SetGlyphType("<<aParam<<")"<<endl;
-           
+
            switch(aServant->GetGlyphPos()){
            case Vectors::CENTER:
              aParam = "VISU.Vectors.CENTER";
@@ -749,7 +750,7 @@ namespace VISU{
         case VISU::TCUTPLANES:
           if(CutPlanes_i* aServant = dynamic_cast<CutPlanes_i*>(GetServant(anObj).in())){
            thePrefix = ScalarMapToPython(theSObject,aServant,theStr,aName,"CutPlanesOnField",theArgumentName,thePrefix);
-           
+
            std::string aParam;
            switch(aServant->GetOrientationType()){
            case CutPlanes::XY:
@@ -763,11 +764,11 @@ namespace VISU{
              break;
            }
            theStr<<thePrefix<<aName<<".SetOrientation("<<aParam<<","<<aServant->GetRotateX()<<","<<aServant->GetRotateY()<<")"<<endl;
-           
+
            theStr<<thePrefix<<aName<<".SetDisplacement("<<aServant->GetDisplacement()<<")"<<endl;
            CORBA::Long aNbPlanes = aServant->GetNbPlanes();
            theStr<<thePrefix<<aName<<".SetNbPlanes("<<aNbPlanes<<")"<<endl;
-           
+
            for(CORBA::Long anId = 0; anId < aNbPlanes; anId++){
              if(!aServant->IsDefault(anId))
                theStr<<thePrefix<<aName<<".SetPlanePosition("<<anId<<","<<aServant->GetPlanePosition(anId)<<")"<<endl;
@@ -779,7 +780,7 @@ namespace VISU{
         case VISU::TCUTLINES:
           if(CutLines_i* aServant = dynamic_cast<CutLines_i*>(GetServant(anObj).in())){
            thePrefix = ScalarMapToPython(theSObject,aServant,theStr,aName,"CutLinesOnField",theArgumentName,thePrefix);
-           
+
            std::string aParam;
            switch(aServant->GetOrientationType()){
            case CutPlanes::XY:
@@ -793,7 +794,7 @@ namespace VISU{
              break;
            }
            theStr<<thePrefix<<aName<<".SetOrientation("<<aParam<<","<<aServant->GetRotateX()<<","<<aServant->GetRotateY()<<")"<<endl;
-           
+
            switch(aServant->GetOrientationType2()){
            case CutPlanes::XY:
              aParam = "VISU.CutPlanes.XY";
@@ -806,13 +807,13 @@ namespace VISU{
              break;
            }
            theStr<<thePrefix<<aName<<".SetOrientation2("<<aParam<<","<<aServant->GetRotateX2()<<","<<aServant->GetRotateY2()<<")"<<endl;
-           
+
            theStr<<thePrefix<<aName<<".SetDisplacement("<<aServant->GetDisplacement()<<")"<<endl;
            theStr<<thePrefix<<aName<<".SetDisplacement2("<<aServant->GetDisplacement2()<<")"<<endl;
-           
+
            if(!aServant->IsDefault())
              theStr<<thePrefix<<aName<<".SetBasePlanePosition("<<aServant->GetBasePlanePosition()<<")"<<endl;
-           
+
            CORBA::Long aNbLines = aServant->GetNbLines();
            theStr<<thePrefix<<aName<<".SetNbLines("<<aNbLines<<")"<<endl;
            for(CORBA::Long anId = 0; anId < aNbLines; anId++){
@@ -836,6 +837,26 @@ namespace VISU{
            theStr<<thePrefix<<"pass"<<endl<<endl;
           }
           return;
+        case VISU::TPLOT3D:
+          if (Plot3D_i* aServant = dynamic_cast<Plot3D_i*>(GetServant(anObj).in())) {
+            thePrefix = ScalarMapToPython(theSObject, aServant, theStr, aName,
+                                         "Plot3DOnField", theArgumentName, thePrefix);
+
+           std::string aParam;
+           switch(aServant->GetOrientationType()){
+           case CutPlanes::XY: aParam = "VISU.Plot3D.XY"; break;
+           case CutPlanes::YZ: aParam = "VISU.Plot3D.YZ"; break;
+           case CutPlanes::ZX: aParam = "VISU.Plot3D.ZX"; break;
+           }
+           theStr<<thePrefix<<aName<<".SetOrientation("<<aParam<<","<<aServant->GetRotateX()<<","<<aServant->GetRotateY()<<")"<<endl;
+
+           theStr<<thePrefix<<aName<<".SetPlanePosition("<<aServant->GetPlanePosition()<<","<<aServant->IsPositionRelative()<<")"<<endl;
+           theStr<<thePrefix<<aName<<".SetScaleFactor("<<aServant->GetScaleFactor()<<")"<<endl;
+            theStr<<thePrefix<<aName<<".SetContourPrs("<<aServant->GetIsContourPrs()<<")"<<endl;
+            theStr<<thePrefix<<aName<<".SetNbOfContours("<<aServant->GetNbOfContours()<<")"<<endl;
+            theStr<<thePrefix<<"pass"<<endl<<endl;
+          }
+          return;
         case VISU::TCURVE:
           if(Curve_i* aServant = dynamic_cast<Curve_i*>(GetServant(anObj).in()))
           {
@@ -847,7 +868,7 @@ namespace VISU{
            SALOMEDS::Color aColor = aServant->GetColor();
            theStr << ",SALOMEDS.Color("<<
              aColor.R<<","<<aColor.G<<","<<aColor.B<<")"; // color
-           
+
            std::string aParam;
            switch(aServant->GetMarker()){
            case Curve::NONE:      aParam = "VISU.Curve.NONE";      break;
@@ -882,7 +903,7 @@ namespace VISU{
              using namespace SALOMEDS;
              AttributeComment_var aComment = AttributeComment::_narrow(anAttr);
              CORBA::String_var aValue = aComment->Value();
-             Storable::TRestoringMap aMap;       
+             Storable::TRestoringMap aMap;
              Storable::StrToMap(aValue.in(),aMap);
              bool anIsExist;
              QString aSourceId = VISU::Storable::FindValue(aMap,"mySourceId",&anIsExist);
@@ -901,7 +922,7 @@ namespace VISU{
                  theStr<<thePrefix<<"anID = aSObject.GetID()"<<endl;
                  theStr<<thePrefix<<aName<<" = aVisu.CreateTable(anID)"<<endl;
                  theStr<<endl;
-                 
+
                  theArgumentName = aName;
                  DumpChildrenToPython(theStudy,
                                       theIsPublished,
@@ -912,7 +933,7 @@ namespace VISU{
                                       theEntry2NameMap,
                                       theArgumentName,
                                       thePrefix);
-                 
+
                  theStr<<thePrefix<<"pass"<<endl<<endl;
                  theStr<<aPrefix<<"pass"<<endl<<endl;
                }else if(strcmp(aSourceId.latin1(),"TableFile") == 0){
@@ -920,7 +941,7 @@ namespace VISU{
                  theStr<<thePrefix<<"anIsFound, aSObject = "<<theArgumentName<<".FindSubObject("<<aTag<<")"<<endl;
                  theStr<<thePrefix<<"if anIsFound:"<<endl;
                  thePrefix += PREFIX;
-                 
+
                  theStr<<thePrefix<<"anID = aSObject.GetID()"<<endl;
                  theStr<<thePrefix<<aName<<" = aVisu.CreateTable(anID)"<<endl;
                  theStr<<endl;
@@ -935,7 +956,7 @@ namespace VISU{
                                       theEntry2NameMap,
                                       theArgumentName,
                                       thePrefix);
-                 
+
                  theStr<<thePrefix<<"pass"<<endl<<endl;
                }else if(strcmp(aSourceId.latin1(),"TableAttr") == 0){
                  theArgumentName = aName;
@@ -958,10 +979,10 @@ namespace VISU{
     }else{
       SALOMEDS::GenericAttribute_var anAttr;
       if(theSObject->FindAttribute(anAttr,"AttributeComment")){
-       SALOMEDS::AttributeComment_var aComment = 
+       SALOMEDS::AttributeComment_var aComment =
          SALOMEDS::AttributeComment::_narrow(anAttr);
        CORBA::String_var aValue = aComment->Value();
-       Storable::TRestoringMap aMap;     
+       Storable::TRestoringMap aMap;
        Storable::StrToMap(aValue.in(),aMap);
        bool anIsExist;
        QString aTypeName = VISU::Storable::FindValue(aMap,"myComment",&anIsExist);
@@ -984,7 +1005,7 @@ namespace VISU{
                                   theEntry2NameMap,
                                   theArgumentName,
                                   thePrefix);
-                 
+
              theStr<<thePrefix<<"pass"<<endl<<endl;
              return;
            }
@@ -1045,13 +1066,13 @@ namespace VISU{
     SALOMEDS::SObject_var aTargetRefSObj;
     if(theSObject->ReferencedObject(aTargetRefSObj)){
       CORBA::Object_var anObj = SObjectToObject(aTargetRefSObj);
-      if(CORBA::is_nil(anObj)) 
+      if(CORBA::is_nil(anObj))
        return;
-      
+
       VISU::Base_var aBase = VISU::Base::_narrow(anObj);
-      if(CORBA::is_nil(aBase)) 
+      if(CORBA::is_nil(aBase))
        return;
-      
+
       if(aBase->GetType() == VISU::TCURVE){
        CORBA::String_var anID = aTargetRefSObj->GetID();
        std::string anArg = theEntry2NameMap[anID.in()];
@@ -1081,11 +1102,11 @@ namespace VISU{
     for(aChildItet->InitEx(false); aChildItet->More(); aChildItet->Next()){
       SALOMEDS::SObject_var aSObject = aChildItet->Value();
       CORBA::Object_var anObj = SObjectToObject(aSObject);
-      if(CORBA::is_nil(anObj)) 
+      if(CORBA::is_nil(anObj))
        continue;
 
       VISU::Base_var aBase = VISU::Base::_narrow(anObj);
-      if(CORBA::is_nil(aBase)) 
+      if(CORBA::is_nil(aBase))
        continue;
 
       if(aBase->GetType() == VISU::TCONTAINER){
@@ -1109,14 +1130,14 @@ namespace VISU{
 
 
   //===========================================================================
-  Engines::TMPFile* 
+  Engines::TMPFile*
   VISU_Gen_i::
   DumpPython(CORBA::Object_ptr theStudy,
             CORBA::Boolean theIsPublished,
             CORBA::Boolean& theIsValidScript)
   {
     SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(theStudy);
-    if(CORBA::is_nil(aStudy)) 
+    if(CORBA::is_nil(aStudy))
       return new Engines::TMPFile(0);
 
     TName2EntryMap aName2EntryMap;
@@ -1125,7 +1146,7 @@ namespace VISU{
 #ifndef COUT
     ostringstream aStr;
 #else
-#define aStr cout    
+#define aStr cout
 #endif
 
     std::string aPrefix(PREFIX);
@@ -1159,11 +1180,10 @@ namespace VISU{
     CORBA::ULong aSize = aResult.size() + 1;
     char* aBuffer = new char[aSize];
     strcpy(aBuffer,&aResult[0]);
-    return new Engines::TMPFile(aSize,aSize,(CORBA::Octet*)aBuffer,1); 
+    return new Engines::TMPFile(aSize,aSize,(CORBA::Octet*)aBuffer,1);
 #else
 #undef aStr
     return new Engines::TMPFile(0);
 #endif
   }
-
 }