From d75460f263ef28d3f6cfd7b15542c2052e8441fe Mon Sep 17 00:00:00 2001 From: asl Date: Sat, 21 Nov 2009 12:13:26 +0000 Subject: [PATCH] Previous implementation of notebook is removed --- src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx | 5 - .../SALOMEDSImpl_StudyManager.cxx | 105 ------------------ 2 files changed, 110 deletions(-) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx index caa4adafe..5c266e1dd 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx @@ -1173,13 +1173,8 @@ bool SALOMEDSImpl_Study::DumpStudy(const string& thePath, fp << aBatchModeScript << ".salome_init()" << endl << endl; - //ASL: fp << _GetNoteBookAccess(); - fp << "sys.path.insert( 0, r\'" << thePath << "\')" << endl << endl; - //Dump NoteBook Variables - //ASL: fp << _GetStudyVariablesScript(); - //Check if it's necessary to dump visual parameters bool isDumpVisuals = SALOMEDSImpl_IParameters::isDumpPython(this); int lastSavePoint = -1; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx index 8dd76e205..3741a3cce 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyManager.cxx @@ -57,9 +57,6 @@ static void ReadAttributes(SALOMEDSImpl_Study*, const SALOMEDSImpl_SObject&, HDF static void BuildTree (SALOMEDSImpl_Study*, HDFgroup*); static void Translate_IOR_to_persistentID (const SALOMEDSImpl_SObject&, SALOMEDSImpl_Driver*, bool isMultiFile, bool isASCII); -/*ASL: -static void ReadNoteBookVariables(SALOMEDSImpl_Study* theStudy, HDFgroup* theGroup); -*/ //============================================================================ /*! Function : SALOMEDSImpl_StudyManager @@ -127,9 +124,6 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::Open(const string& aUrl) // open the HDFFile HDFfile *hdf_file =0; HDFgroup *hdf_group_study_structure =0; -/*ASL: - HDFgroup *hdf_notebook_vars = 0; -*/ char* aC_HDFUrl; string aHDFUrl; @@ -193,15 +187,6 @@ SALOMEDSImpl_Study* SALOMEDSImpl_StudyManager::Open(const string& aUrl) return NULL; } -/*ASL: - //Read and create notebook variables - if(hdf_file->ExistInternalObject("NOTEBOOK_VARIABLES")) { - hdf_notebook_vars = new HDFgroup("NOTEBOOK_VARIABLES",hdf_file); - ReadNoteBookVariables(Study,hdf_notebook_vars); - hdf_notebook_vars =0; //will be deleted by hdf_sco_group destructor - } -*/ - hdf_file->CloseOnDisk(); hdf_group_study_structure = new HDFgroup("STUDY_STRUCTURE",hdf_file); @@ -479,11 +464,6 @@ bool SALOMEDSImpl_StudyManager::Impl_SaveAs(const string& aStudyUrl, HDFgroup *hdf_sco_group =0; HDFgroup *hdf_sco_group2 =0; - /*ASL: - HDFgroup *hdf_notebook_vars =0; - HDFgroup *hdf_notebook_var = 0; - */ - HDFgroup *hdf_group_datacomponent =0; HDFdataset *hdf_dataset =0; hdf_size size[1]; @@ -1348,88 +1328,3 @@ static void Translate_IOR_to_persistentID (const SALOMEDSImpl_SObject& so, Translate_IOR_to_persistentID (current, engine, isMultiFile, isASCII); } } - -/*ASL: -void ReadNoteBookVariables(SALOMEDSImpl_Study* theStudy, HDFgroup* theGroup) -{ - if(!theGroup) - return; - - HDFgroup* new_group =0; - HDFdataset* new_dataset =0; - - char aVarName[HDF_NAME_MAX_LEN+1]; - char *currentVarType = 0; - char *currentVarValue = 0; - char *currentVarIndex = 0; - int order = 0; - //Open HDF group with notebook variables - theGroup->OpenOnDisk(); - - //Get Nb of variables - int aNbVars = theGroup->nInternalObjects(); - - map aVarsMap; - - for( int iVar=0;iVar < aNbVars;iVar++ ) { - theGroup->InternalObjectIndentify(iVar,aVarName); - hdf_object_type type = theGroup->InternalObjectType(aVarName); - if(type == HDF_GROUP) { - - //Read Variable - new_group = new HDFgroup(aVarName,theGroup); - new_group->OpenOnDisk(); - - //Read Type - new_dataset = new HDFdataset("VARIABLE_TYPE",new_group); - new_dataset->OpenOnDisk(); - currentVarType = new char[new_dataset->GetSize()+1]; - new_dataset->ReadFromDisk(currentVarType); - new_dataset->CloseOnDisk(); - new_dataset = 0; //will be deleted by hdf_sco_group destructor - - //Read Order - if(new_group->ExistInternalObject("VARIABLE_INDEX")) { - new_dataset = new HDFdataset("VARIABLE_INDEX",new_group); - new_dataset->OpenOnDisk(); - currentVarIndex = new char[new_dataset->GetSize()+1]; - new_dataset->ReadFromDisk(currentVarIndex); - new_dataset->CloseOnDisk(); - new_dataset = 0; //will be deleted by hdf_sco_group destructor - order = atoi(currentVarIndex); - delete [] currentVarIndex; - } - else - order = iVar; - - //Read Value - new_dataset = new HDFdataset("VARIABLE_VALUE",new_group); - new_dataset->OpenOnDisk(); - currentVarValue = new char[new_dataset->GetSize()+1]; - new_dataset->ReadFromDisk(currentVarValue); - new_dataset->CloseOnDisk(); - new_dataset = 0; //will be deleted by hdf_sco_group destructor - - new_group->CloseOnDisk(); - new_group = 0; //will be deleted by hdf_sco_group destructor - - SALOMEDSImpl_GenericVariable::VariableTypes aVarType = - SALOMEDSImpl_GenericVariable::String2VariableType(string(currentVarType)); - delete [] currentVarType; - - //Create variable and add it in the study - SALOMEDSImpl_GenericVariable* aVariable = - new SALOMEDSImpl_ScalarVariable(aVarType,string(aVarName)); - aVariable->Load(string(currentVarValue)); - aVarsMap.insert(make_pair(order,aVariable)); - delete [] currentVarValue; - } - } - - map::const_iterator it= aVarsMap.begin(); - for(;it!=aVarsMap.end();it++) - theStudy->AddVariable((*it).second); - - theGroup->CloseOnDisk(); -} -*/ -- 2.39.2