]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
IMP PAL13614: Replaced AttributeComment with AttributeString
authorsrn <srn@opencascade.com>
Tue, 17 Oct 2006 10:37:39 +0000 (10:37 +0000)
committersrn <srn@opencascade.com>
Tue, 17 Oct 2006 10:37:39 +0000 (10:37 +0000)
13 files changed:
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_Module.cxx
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx
src/VISUGUI/VisuGUI_Selection.cxx
src/VISUGUI/VisuGUI_StreamLinesDlg.cxx
src/VISUGUI/VisuGUI_Tools.cxx
src/VISU_I/VISUConfig.cc
src/VISU_I/VISU_DumpPython.cc
src/VISU_I/VISU_Gen_i.cc
src/VISU_I/VISU_Result_i.cc
src/VISU_I/VISU_Table_i.cc
src/VISU_I/VISU_TimeAnimation.cxx
src/VISU_I/VISU_View_i.cc

index 64573fb3b5bb10e61443ba713aaeb8e875877ada..aadd869dd0946964eb6998c711b2c7daffe5c8a2 100644 (file)
@@ -1702,9 +1702,9 @@ OnShowAnimation()
 
   VISU::Storable::TRestoringMap aMap;
   _PTR(GenericAttribute) anAttr;
-  if (!aSObj->FindAttribute(anAttr, "AttributeComment")) return;
+  if (!aSObj->FindAttribute(anAttr, "AttributeString")) return;
 
-  _PTR(AttributeComment) aComment (anAttr);
+  _PTR(AttributeString) aComment (anAttr);
   string aComm = aComment->Value();
   QString strIn (aComm.c_str());
   VISU::Storable::StrToMap(strIn, aMap);
@@ -2667,8 +2667,8 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, Q
       CORBA::Object_var aCORBAObject = VISU::ClientSObjectToObject(aSObject);
       if (CORBA::is_nil(aCORBAObject)) {
         _PTR(GenericAttribute) anAttr;
-        if (aSObject->FindAttribute(anAttr, "AttributeComment")) {
-          _PTR(AttributeComment) aComment (anAttr);
+        if (aSObject->FindAttribute(anAttr, "AttributeString")) {
+          _PTR(AttributeString) aComment (anAttr);
           string aComm = aComment->Value();
           QString strIn (aComm.c_str());
           VISU::Storable::TRestoringMap pMap;
@@ -2707,8 +2707,8 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, Q
       if ( !aSObject )
        continue;
       _PTR(GenericAttribute) anAttr;
-      if (aSObject->FindAttribute(anAttr, "AttributeComment")) {
-        _PTR(AttributeComment) aComment (anAttr);
+      if (aSObject->FindAttribute(anAttr, "AttributeString")) {
+        _PTR(AttributeString) aComment (anAttr);
         string aComm = aComment->Value();
         QString strIn (aComm.c_str());
         VISU::Storable::TRestoringMap pMap;
index 3cab58e224a742fe5619f2fdb435a6901702865d..06beae6b31e980edee3dd8ffaf22c09fbd12ce7c 100644 (file)
@@ -1315,8 +1315,8 @@ namespace
     Storable::DataToStream(aStream,"mySubId",theSelection.mySubId);
 
     _PTR(GenericAttribute) anAttr;
-    anAttr = theStudyBuilder->FindOrCreateAttribute(aNewObj,"AttributeComment");
-    _PTR(AttributeComment) aComment(anAttr);
+    anAttr = theStudyBuilder->FindOrCreateAttribute(aNewObj,"AttributeString");
+    _PTR(AttributeString) aComment(anAttr);
     aComment->SetValue(aStream.str());
   }
 
@@ -1346,8 +1346,8 @@ namespace
          
          // To update selection
          _PTR(GenericAttribute) anAttr;
-         if(aChildSObject->FindAttribute(anAttr,"AttributeComment")){
-           _PTR(AttributeComment) aComment(anAttr);
+         if(aChildSObject->FindAttribute(anAttr,"AttributeString")){
+           _PTR(AttributeString) aComment(anAttr);
            
            QString aStream(aComment->Value().c_str());
            Storable::TRestoringMap aMap;
@@ -1419,8 +1419,8 @@ namespace
          Handle(SALOME_InteractiveObject) anIO = aListIter.Value();
          _PTR(SObject) aSObject = aCStudy->FindObjectID(anIO->getEntry());
          _PTR(GenericAttribute) anAttr;
-         if(aSObject->FindAttribute(anAttr,"AttributeComment")){
-           _PTR(AttributeComment) aComment(anAttr);
+         if(aSObject->FindAttribute(anAttr,"AttributeString")){
+           _PTR(AttributeString) aComment(anAttr);
            std::string aCommentValue(aComment->Value());
            if(aCommentValue.compare("myComment=GAUSSVIEW") >= 0){
              aComment->SetValue(aValue.c_str());
@@ -1474,8 +1474,8 @@ namespace
     _PTR(Study) aCStudy = GetCStudy(GetAppStudy(theModule));
 
     _PTR(GenericAttribute) anAttr;
-    if(theSObject->FindAttribute(anAttr,"AttributeComment")){
-      _PTR(AttributeComment) aComment(anAttr);
+    if(theSObject->FindAttribute(anAttr,"AttributeString")){
+      _PTR(AttributeString) aComment(anAttr);
       QString aStream(aComment->Value().c_str());
       Storable::TRestoringMap aMap;
       Storable::StrToMap(aStream,aMap);
@@ -1521,8 +1521,8 @@ OnRestoreConfiguration()
     _PTR(SObject) aSObject = aCStudy->FindObjectID(anIO->getEntry());
     myConfigSObject = aSObject;
     _PTR(GenericAttribute) anAttr;
-    if(aSObject->FindAttribute(anAttr,"AttributeComment")){
-      _PTR(AttributeComment) aComment(anAttr);
+    if(aSObject->FindAttribute(anAttr,"AttributeString")){
+      _PTR(AttributeString) aComment(anAttr);
       QString aStream(aComment->Value().c_str());
       Storable::TRestoringMap aMap;
       Storable::StrToMap(aStream,aMap);
index b65bf0c282ed8e167c7b22e3bde0c1602a2436cf..b152a88d5aa1995cb3a12b8e800977595892237b 100644 (file)
@@ -47,7 +47,7 @@
 
 #include "SALOME_ListIO.hxx"
 
-#include "SALOMEDSClient_AttributeComment.hxx"
+#include "SALOMEDSClient_AttributeString.hxx"
 #include "SALOMEDSClient_AttributeName.hxx"
 
 #include <qlayout.h>
@@ -188,8 +188,8 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject
        _PTR(SObject) aSObject = aActiveStudy->FindObjectID(aIO->getEntry());
 
        _PTR(GenericAttribute) anTmpAttr;
-       if (aSObject->FindAttribute(anTmpAttr, "AttributeComment")) {
-         _PTR(AttributeComment) aTmpComment (anTmpAttr);
+       if (aSObject->FindAttribute(anTmpAttr, "AttributeString")) {
+         _PTR(AttributeString) aTmpComment (anTmpAttr);
          string aTmpComm = aTmpComment->Value();
          QString aTmpstrIn (aTmpComm.c_str());
          VISU::Storable::TRestoringMap aTmpaMap;
@@ -247,8 +247,8 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject
         CORBA::Object_var aChildObject = VISU::ClientSObjectToObject(aChildSObj);
 
         _PTR(GenericAttribute) anAttr;
-        if (aChildSObj->FindAttribute(anAttr, "AttributeComment")) {
-          _PTR(AttributeComment) aComment (anAttr);
+        if (aChildSObj->FindAttribute(anAttr, "AttributeString")) {
+          _PTR(AttributeString) aComment (anAttr);
           string aComm = aComment->Value();
           QString strIn (aComm.c_str());
           VISU::Storable::TRestoringMap aMap;
index 6ddd429f89265398c21e28e0acaa80bfddba71f6..346deb29d01d4cae7dbf540e2cc9ef8f51b9d996 100644 (file)
@@ -397,8 +397,8 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
     VISU::Storable::TRestoringMap aMap;
     if (aSObject) {
       _PTR(GenericAttribute) anAttr;
-      if (aSObject->FindAttribute(anAttr, "AttributeComment")) {
-        _PTR(AttributeComment) aComment (anAttr);
+      if (aSObject->FindAttribute(anAttr, "AttributeString")) {
+        _PTR(AttributeString) aComment (anAttr);
         std::string aString = aComment->Value();
         QString strIn( aString.c_str() );
         VISU::Storable::StrToMap(strIn, aMap);
index 7a1820c13868dad69bc36c110c3d0fef1ba81b69..1f59da7ea418a2e10c4332ed7a4d3cd294cdc253 100644 (file)
@@ -108,8 +108,8 @@ VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule)
       _PTR(SObject) aSObject = aActiveStudy->FindObjectID(aIO->getEntry());
 
       _PTR(GenericAttribute) anTmpAttr;
-      if (aSObject->FindAttribute(anTmpAttr, "AttributeComment")) {
-        _PTR(AttributeComment) aTmpComment (anTmpAttr);
+      if (aSObject->FindAttribute(anTmpAttr, "AttributeString")) {
+        _PTR(AttributeString) aTmpComment (anTmpAttr);
         string aTmpComm = aTmpComment->Value();
         QString aTmpstrIn (aTmpComm.c_str());
         VISU::Storable::TRestoringMap aTmpaMap;
@@ -183,8 +183,8 @@ VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule)
       }
 
       _PTR(GenericAttribute) anAttr;
-      if (aChildSObj->FindAttribute(anAttr, "AttributeComment")) {
-        _PTR(AttributeComment) aComment (anAttr);
+      if (aChildSObj->FindAttribute(anAttr, "AttributeString")) {
+        _PTR(AttributeString) aComment (anAttr);
         string aComm = aComment->Value();
         QString strIn (aComm.c_str());
         VISU::Storable::TRestoringMap aMap;
@@ -539,8 +539,8 @@ VISU::Mesh_ptr VisuGUI_StreamLinesDlg::createMesh (VISU::VISUType theType, QStri
   for (aIter->InitEx(true); aIter->More(); aIter->Next() ) {
     SALOMEDSClient_SObject* aChildSObj = aIter->Value();
     SALOMEDSClient_GenericAttribute* anAttr;
-    if (aChildSObj->FindAttribute(anAttr, "AttributeComment")) {
-      SALOMEDSClient_AttributeComment* aComment = dynamic_cast<SALOMEDSClient_AttributeComment*>( anAttr );
+    if (aChildSObj->FindAttribute(anAttr, "AttributeString")) {
+      SALOMEDSClient_AttributeString* aComment = dynamic_cast<SALOMEDSClient_AttributeString*>( anAttr );
       CORBA::String_var aComm = aComment->Value().c_str();
       QString strIn(aComm.in());
       aMap.clear();
index f9ea32df126fa8ad8b97be5e44f3dd72cec0fd02..1ffbc39916aea7bce14049c3b466e95d033b0357 100644 (file)
@@ -224,8 +224,8 @@ namespace VISU
     VISU::Storable::TRestoringMap aMap;
     if (theSObject) {
       _PTR(GenericAttribute) anAttr;
-      if (theSObject->FindAttribute(anAttr, "AttributeComment")) {
-       _PTR(AttributeComment) aComment (anAttr);
+      if (theSObject->FindAttribute(anAttr, "AttributeString")) {
+       _PTR(AttributeString) aComment (anAttr);
        std::string aValue = aComment->Value();
        QString aString (aValue.c_str());
        VISU::Storable::StrToMap(aString, aMap);
@@ -257,8 +257,8 @@ namespace VISU
     _PTR(SObject) aSObject = aStudy->FindObjectID(theEntry.latin1());
     if (aSObject) {
       _PTR(GenericAttribute) anAttr;
-      if (theMap && aSObject->FindAttribute(anAttr,"AttributeComment")) {
-       _PTR(AttributeComment) aComment (anAttr);
+      if (theMap && aSObject->FindAttribute(anAttr,"AttributeString")) {
+       _PTR(AttributeString) aComment (anAttr);
        std::string aValue = aComment->Value();
        QString aString (aValue.c_str());
        VISU::Storable::StrToMap(aString, *theMap);
@@ -388,12 +388,12 @@ namespace VISU
             // (first sub-level) or is a child of such an object
             string aNAME, aVisuNAME = GetVisuGen(theModule)->ComponentDataType();
             _PTR(GenericAttribute) anAttr;
-            _PTR(AttributeComment) aComment;
+            _PTR(AttributeString) aComment;
 
             bool isUnderVISU = false;
             _PTR(SObject) aFatherSObject = aSObject->GetFather();
-            if (aFatherSObject->FindAttribute(anAttr, "AttributeComment")) {
-              _PTR(AttributeComment) aComment (anAttr);
+            if (aFatherSObject->FindAttribute(anAttr, "AttributeString")) {
+              _PTR(AttributeString) aComment (anAttr);
               aNAME = aComment->Value();
               if (aNAME == aVisuNAME) {
                 isUnderVISU = true;
@@ -409,8 +409,8 @@ namespace VISU
 
               isUnderVISU = false;
               aFatherSObject = aFatherSObject->GetFather();
-              if (aFatherSObject->FindAttribute(anAttr, "AttributeComment")) {
-                _PTR(AttributeComment) aComment (anAttr);
+              if (aFatherSObject->FindAttribute(anAttr, "AttributeString")) {
+                _PTR(AttributeString) aComment (anAttr);
                 aNAME = aComment->Value();
                 if (aNAME == aVisuNAME) {
                   isUnderVISU = true;
@@ -1199,8 +1199,8 @@ namespace VISU
       }
     } else {
       _PTR(GenericAttribute) anAttr;
-      if (theObject->FindAttribute(anAttr, "AttributeComment")) {
-        _PTR(AttributeComment) aComment (anAttr);
+      if (theObject->FindAttribute(anAttr, "AttributeString")) {
+        _PTR(AttributeString) aComment (anAttr);
         string aComm = aComment->Value();
         QString strIn (aComm.c_str());
         VISU::Storable::TRestoringMap pMap;
index 72c1635d2a0c258571691ad3760371256e4f4b93..6d5618c907e6e8e1a71be13f59bc98611c0ea499 100644 (file)
@@ -265,8 +265,8 @@ namespace VISU{
     SALOMEDS::SObject_var aFieldSO;
     for(;anIter->More();anIter->Next()) {
       SALOMEDS::GenericAttribute_var anAttr;
-      if (anIter->Value()->FindAttribute(anAttr,"AttributeComment")) {
-       SALOMEDS::AttributeComment_var aCmnt = SALOMEDS::AttributeComment::_narrow(anAttr);
+      if (anIter->Value()->FindAttribute(anAttr,"AttributeString")) {
+       SALOMEDS::AttributeString_var aCmnt = SALOMEDS::AttributeString::_narrow(anAttr);
        CORBA::String_var aString = aCmnt->Value();
        string aValue(aString);
        if (aValue == theComment) {
@@ -308,8 +308,8 @@ namespace VISU{
       aPRef->SetValue(thePersistentRef);
     }
     if(strcmp(theComment,"") != 0){
-      anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeComment");
-      SALOMEDS::AttributeComment_var aCmnt = SALOMEDS::AttributeComment::_narrow(anAttr);
+      anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeString");
+      SALOMEDS::AttributeString_var aCmnt = SALOMEDS::AttributeString::_narrow(anAttr);
       aCmnt->SetValue(theComment);
       if(MYDEBUG) INFOS("CreateAttributes - Comment = "<<theComment);
     }
@@ -355,8 +355,8 @@ namespace VISU{
       aPRef->SetValue(thePersistentRef);
     }
     if (strcmp(theComment, "") != 0) {
-      anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeComment");
-      _PTR(AttributeComment) aCmnt (anAttr);
+      anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeString");
+      _PTR(AttributeString) aCmnt (anAttr);
       aCmnt->SetValue(theComment);
       if (MYDEBUG) INFOS("CreateAttributes - Comment = " << theComment);
     }
index a5378c0a65bc63a610ca22d7b8eb7494ac9adac3..6b83971170bdb34e2430f3e934b90c7cdc2dddaf 100644 (file)
@@ -299,9 +299,9 @@ namespace VISU
   {
     SALOMEDS::GenericAttribute_var anAttr;
     SALOMEDS::SObject_var aFatherSObject = theSObject->GetFather();
-    if(aFatherSObject->FindAttribute(anAttr,"AttributeComment")){
-      SALOMEDS::AttributeComment_var aComment =
-       SALOMEDS::AttributeComment::_narrow(anAttr);
+    if(aFatherSObject->FindAttribute(anAttr,"AttributeString")){
+      SALOMEDS::AttributeString_var aComment =
+       SALOMEDS::AttributeString::_narrow(anAttr);
       CORBA::String_var aValue = aComment->Value();
       Storable::TRestoringMap aMap;
       Storable::StrToMap(aValue.in(),aMap);
@@ -1013,9 +1013,9 @@ namespace VISU
         case VISU::TTABLE:
           if(dynamic_cast<Table_i*>(GetServant(anObj).in())){
            SALOMEDS::GenericAttribute_var anAttr;
-           if(theSObject->FindAttribute(anAttr,"AttributeComment")){
+           if(theSObject->FindAttribute(anAttr,"AttributeString")){
              using namespace SALOMEDS;
-             AttributeComment_var aComment = AttributeComment::_narrow(anAttr);
+             AttributeString_var aComment = AttributeString::_narrow(anAttr);
              CORBA::String_var aValue = aComment->Value();
              Storable::TRestoringMap aMap;
              Storable::StrToMap(aValue.in(),aMap);
@@ -1100,9 +1100,9 @@ namespace VISU
       }
     } else { /*if(!CORBA::is_nil(anObj))*/
       SALOMEDS::GenericAttribute_var anAttr;
-      if (theSObject->FindAttribute(anAttr,"AttributeComment")) {
-       SALOMEDS::AttributeComment_var aComment =
-         SALOMEDS::AttributeComment::_narrow(anAttr);
+      if (theSObject->FindAttribute(anAttr,"AttributeString")) {
+       SALOMEDS::AttributeString_var aComment =
+         SALOMEDS::AttributeString::_narrow(anAttr);
        CORBA::String_var aValue = aComment->Value();
        Storable::TRestoringMap aMap;
        Storable::StrToMap(aValue.in(),aMap);
@@ -1141,7 +1141,7 @@ namespace VISU
            theStr<<thePrefix<<"anAttr = aBuilder.FindOrCreateAttribute("<<aName<<",'AttributeName')"<<endl;
            theStr<<thePrefix<<"anAttr.SetValue('"<<aName<<"')"<<endl;
 
-           theStr<<thePrefix<<"anAttr = aBuilder.FindOrCreateAttribute("<<aName<<",'AttributeComment')"<<endl;
+           theStr<<thePrefix<<"anAttr = aBuilder.FindOrCreateAttribute("<<aName<<",'AttributeString')"<<endl;
            theStr<<thePrefix<<"anAttr.SetValue('"<<aValue.in()<<"')"<<endl;
 
            theStr<<thePrefix<<"pass"<<endl<<endl;
index ebac78cbbf98ffc92123a52ec7570ae50b6feada..0070b91253f30db1cd851275418cdea5dfe20bab 100644 (file)
@@ -291,11 +291,25 @@ namespace VISU
     if(MYDEBUG) MESSAGE("VISU_Gen_i::~VISU_Gen_i");
   }
 
-  void CorrectSObjectType(SALOMEDS::SObject_ptr theSObject)
+  void CorrectSObjectType(SALOMEDS::SObject_ptr theSObject, SALOMEDS::StudyBuilder_ptr theBuilder)
   {
     SALOMEDS::GenericAttribute_var anAttr;
-    if ( theSObject->FindAttribute(anAttr, "AttributeComment") ) {
-      SALOMEDS::AttributeComment_var aAttComment = SALOMEDS::AttributeComment::_narrow(anAttr);
+    bool isAttrStringFound = false;
+
+    if( theSObject->FindAttribute(anAttr, "AttributeComment") ) {
+      //SRN: Replace an AttributeComment with AttributeString
+      SALOMEDS::AttributeComment_var aComment = SALOMEDS::AttributeComment::_narrow(anAttr);
+      string aValue = aComment->Value();
+      theBuilder->RemoveAttribute(theSObject, "AttributeComment");
+      anAttr = theBuilder->FindOrCreateAttribute(theSObject, "AttributeString");
+      SALOMEDS::AttributeString_var aStringAttr = SALOMEDS::AttributeString::_narrow(anAttr);
+      aStringAttr->SetValue(aValue.c_str());
+      isAttrStringFound = true;
+
+    }
+
+    if ( isAttrStringFound || theSObject->FindAttribute(anAttr, "AttributeString") ) {
+      SALOMEDS::AttributeString_var aAttComment = SALOMEDS::AttributeString::_narrow(anAttr);
       if ( aAttComment ) {
        string aValue = aAttComment->Value();
        if ( aValue.compare("") ) {
@@ -360,12 +374,14 @@ namespace VISU
     SALOMEDS::Study_var aStudy = theComponent->GetStudy();
 
     SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator(theComponent);
+    SALOMEDS::StudyBuilder_var  aStudyBuilder = aStudy->NewBuilder();
+
     for (anIter->InitEx(true); anIter->More(); anIter->Next()) {
       SALOMEDS::SObject_var aSObject = anIter->Value();
-      CorrectSObjectType(aSObject);      
+      CorrectSObjectType(aSObject, aStudyBuilder);      
     }
 
-    SALOMEDS::StudyBuilder_var  aStudyBuilder = aStudy->NewBuilder();
+   
     string aDir = isMultiFile ? theURL : SALOMEDS_Tool::GetTmpDir();
     TCollection_AsciiString aTmpDir (const_cast<char*>(aDir.c_str()));
     VisuTmpDir = aTmpDir.ToCString();
@@ -1173,7 +1189,7 @@ namespace VISU
       aResultSO = SALOMEDS::SObject::_duplicate(theObject);
 
     //Just for Result::Restore to find the Comment attribute :(
-    SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeComment");
+    SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeString");
 
     Storable* aStorable = Storable::Create(aResultSO,aFileName,aString);
 
index db7457fba8d80d0435fad6015a0de74c7539d131..77871bc129df7a6a02d017bb51c19b3b1764b9ea 100644 (file)
@@ -247,8 +247,8 @@ namespace VISU
       aName->SetValue(theName);
     }
     if (theComment != "") {
-      anAttr = aStudyBuilder->FindOrCreateAttribute(aNewObj, "AttributeComment");
-      _PTR(AttributeComment) aCmnt (anAttr);
+      anAttr = aStudyBuilder->FindOrCreateAttribute(aNewObj, "AttributeString");
+      _PTR(AttributeString) aCmnt (anAttr);
       aCmnt->SetValue(theComment);
     }
     return aNewObj->GetID();
@@ -281,8 +281,8 @@ namespace VISU
       aName->SetValue(theName);
     }
     if (theComment != "") {
-      anAttr = aStudyBuilder->FindOrCreateAttribute(aSObject, "AttributeComment");
-      _PTR(AttributeComment) aCmnt (anAttr);
+      anAttr = aStudyBuilder->FindOrCreateAttribute(aSObject, "AttributeString");
+      _PTR(AttributeString) aCmnt (anAttr);
       aCmnt->SetValue(theComment);
     }
   }
@@ -1365,9 +1365,9 @@ Restore(SALOMEDS::SObject_ptr theSObject,
                       GetComment(), VISU::TRESULT, myFileInfo.filePath().latin1(),
                       myInitFileName.c_str()); // Restoring of Python dump
       SALOMEDS::GenericAttribute_var anAttr;
-      if (!theSObject->FindAttribute(anAttr, "AttributeComment"))
-       throw std::runtime_error("Build - There is no AttributeComment for the SObject !!!");
-      SALOMEDS::AttributeComment_var aCmnt = SALOMEDS::AttributeComment::_narrow(anAttr);
+      if (!theSObject->FindAttribute(anAttr, "AttributeString"))
+       throw std::runtime_error("Build - There is no AttributeString for the SObject !!!");
+      SALOMEDS::AttributeString_var aCmnt = SALOMEDS::AttributeString::_narrow(anAttr);
       aCmnt->SetValue(aComment.latin1());
     }
     bool anIsBuildAll = VISU::GetResourceMgr()->booleanValue("VISU", "full_med_loading", false);
index cb64212609ee4b554372f319d359d7218639816f..899595bda3c5473d5c510c8e3310638210c74c9a 100644 (file)
@@ -180,9 +180,9 @@ VISU::Storable* VISU::Table_i::Build( int theRestoring )
        else{
          aComment.sprintf("myComment=%s;myType=%d;mySourceId=TableAttr",GetComment(),VISU::TTABLE);
          SALOMEDS::SObject_var aFatherSObject = SO->GetFather();
-         if(aFatherSObject->FindAttribute(anAttr,"AttributeComment")){
-           SALOMEDS::AttributeComment_var aCommentAttr =
-             SALOMEDS::AttributeComment::_narrow(anAttr);
+         if(aFatherSObject->FindAttribute(anAttr,"AttributeString")){
+           SALOMEDS::AttributeString_var aCommentAttr =
+             SALOMEDS::AttributeString::_narrow(anAttr);
            CORBA::String_var aValue = aCommentAttr->Value();
            Storable::TRestoringMap aMap;
            Storable::StrToMap(aValue.in(),aMap);
@@ -1248,8 +1248,8 @@ SALOMEDS::SObject_var VISU::ImportTables(const char* theFileName, SALOMEDS::Stud
   SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
   QFileInfo aFileInfo(theFileName);
   aName->SetValue(aFileInfo.fileName().latin1());
-  anAttr = aStudyBuilder->FindOrCreateAttribute(aFileObject, "AttributeComment");
-  SALOMEDS::AttributeComment_var aComment = SALOMEDS::AttributeComment::_narrow(anAttr);
+  anAttr = aStudyBuilder->FindOrCreateAttribute(aFileObject, "AttributeString");
+  SALOMEDS::AttributeString_var aComment = SALOMEDS::AttributeString::_narrow(anAttr);
   QString aString;
   aString.sprintf("myComment=ImportTables;myFileName=%s",
                  aFileInfo.absFilePath().latin1());
index 5faacca8d429b41547d7a6cc7a2176acf1cfda6b..92f1ea7d34368bb5f5e81b0c157f85bc62162fbb 100644 (file)
@@ -55,7 +55,7 @@
 #include "SUIT_Session.h"
 #include "SUIT_Study.h"
 
-#include "SALOMEDSClient_AttributeComment.hxx"
+#include "SALOMEDSClient_AttributeString.hxx"
 #include "SALOMEDSClient_AttributeName.hxx"
 
 #include <qpixmap.h>
@@ -823,8 +823,8 @@ VISU::Storable::TRestoringMap VISU_TimeAnimation::getMapOfValue (_PTR(SObject) t
   VISU::Storable::TRestoringMap aMap;
   if (theSObject) {
     _PTR(GenericAttribute) anAttr;
-    if (theSObject->FindAttribute(anAttr, "AttributeComment")) {
-      _PTR(AttributeComment) aComment (anAttr);
+    if (theSObject->FindAttribute(anAttr, "AttributeString")) {
+      _PTR(AttributeString) aComment (anAttr);
       std::string aString = aComment->Value();
       QString strIn (aString.c_str());
       VISU::Storable::StrToMap(strIn, aMap);
@@ -990,8 +990,8 @@ void VISU_TimeAnimation::saveAnimation()
                    VISU::TANIMATION,myTimeMinVal,myTimeMaxVal);
 
   _PTR(GenericAttribute) anAttr;
-  anAttr = aStudyBuilder->FindOrCreateAttribute(aAnimSObject, "AttributeComment");
-  _PTR(AttributeComment) aCmnt (anAttr);
+  anAttr = aStudyBuilder->FindOrCreateAttribute(aAnimSObject, "AttributeString");
+  _PTR(AttributeString) aCmnt (anAttr);
   aCmnt->SetValue(aComment.latin1());
 
   _PTR(ChildIterator) anIter = myStudy->NewChildIterator(aAnimSObject);
@@ -1016,8 +1016,8 @@ void VISU_TimeAnimation::saveAnimation()
 
     if (anPrsIter->More()) {
       _PTR(SObject) aPrsObj = anPrsIter->Value();
-      anAttr = aStudyBuilder->FindOrCreateAttribute(aPrsObj, "AttributeComment");
-      aCmnt = _PTR(AttributeComment)(anAttr);
+      anAttr = aStudyBuilder->FindOrCreateAttribute(aPrsObj, "AttributeString");
+      aCmnt = _PTR(AttributeString)(anAttr);
       aCmnt->SetValue(aPrsComment.c_str());
 
       anAttr = aStudyBuilder->FindOrCreateAttribute(aPrsObj, "AttributeName");
@@ -1045,9 +1045,9 @@ void VISU_TimeAnimation::restoreFromStudy(_PTR(SObject) theField)
 
   VISU::Storable::TRestoringMap aMap;
   _PTR(GenericAttribute) anAttr;
-  if (!aAnimSObject->FindAttribute(anAttr, "AttributeComment")) return;
+  if (!aAnimSObject->FindAttribute(anAttr, "AttributeString")) return;
 
-  _PTR(AttributeComment) aComment (anAttr);
+  _PTR(AttributeString) aComment (anAttr);
   string aComm = aComment->Value();
   QString strIn (aComm.c_str());
   VISU::Storable::StrToMap(strIn,aMap);
@@ -1098,8 +1098,8 @@ void VISU_TimeAnimation::restoreFromStudy(_PTR(SObject) theField)
       continue;
     generatePresentations(getNbFields()-1);
 
-    if (!aPrsObj->FindAttribute(anAttr, "AttributeComment")) continue;
-    _PTR(AttributeComment) aPrsComment (anAttr);
+    if (!aPrsObj->FindAttribute(anAttr, "AttributeString")) continue;
+    _PTR(AttributeString) aPrsComment (anAttr);
     string aPrsComm = aPrsComment->Value();
     if (aPrsComm.length() > 0) {
       QString strPrsIn (aPrsComm.c_str());
index abb6ad9b1da7a637298e46840812e009d8867c7c..1c6e4682b4dd3b3dc4d70de87724891cc5c5efe2 100644 (file)
@@ -1610,8 +1610,8 @@ namespace VISU {
        _PTR(SObject) anObj = aList[i];
        string anEntry = anObj->GetID();
        if(MYDEBUG) MESSAGE("View3D_i::SaveViewParams - anEntry = " << anEntry);
-       if (anObj->FindAttribute(anAttr, "AttributeComment")) {
-         _PTR(AttributeComment) aCmnt (anAttr);
+       if (anObj->FindAttribute(anAttr, "AttributeString")) {
+         _PTR(AttributeString) aCmnt (anAttr);
          string aComm (aCmnt->Value());
          if (MYDEBUG) MESSAGE("View3D_i::SaveViewPoint - aComm = " << aComm);
          if (aComm.compare(View3D_i::myComment) >= 0) {
@@ -1671,8 +1671,8 @@ namespace VISU {
       _PTR(SObject) anObj = aList[i];
       string anEntry = anObj->GetID();
       if (MYDEBUG) MESSAGE("View3D_i::RestoreViewPoint - anEntry = " << anEntry);
-      if (anObj->FindAttribute(anAttr, "AttributeComment")) {
-       _PTR(AttributeComment) aCmnt (anAttr);
+      if (anObj->FindAttribute(anAttr, "AttributeString")) {
+       _PTR(AttributeString) aCmnt (anAttr);
        QString strIn(aCmnt->Value().c_str());
        Storable::TRestoringMap aMap;
        Storable::StrToMap(strIn, aMap);