- // write applied hypotheses if exist
- SALOMEDS::SObject_var mySubHypBranch;
- found = mySObject->FindSubObject( GetRefOnAppliedHypothesisTag(), mySubHypBranch );
- if ( found ) {
- aSubSubGroup = new HDFgroup( "Applied Hypotheses", aSubGroup );
- aSubSubGroup->CreateOnDisk();
-
- SALOMEDS::ChildIterator_var it = myCurrentStudy->NewChildIterator( mySubHypBranch );
- int hypNb = 0;
- for ( ; it->More(); it->Next() ) {
- SALOMEDS::SObject_var mySubSObject = it->Value();
- SALOMEDS::SObject_var myRefOnHyp;
- bool ok = mySubSObject->ReferencedObject( myRefOnHyp );
- if ( ok ) {
- //string myRefOnObject = myRefOnHyp->GetID();
- CORBA::Object_var anObject = SObjectToObject( myRefOnHyp );
- CORBA::String_var objStr = GetORB()->object_to_string( anObject );
- int id = myStudyContext->findId( string( objStr.in() ) );
- //if ( myRefOnObject.length() > 0 ) {
- //aSize[ 0 ] = myRefOnObject.length() + 1;
- char hypName[ 30 ], hypId[ 30 ];
- sprintf( hypName, "Hyp %d", ++hypNb );
- sprintf( hypId, "%d", id );
- aSize[ 0 ] = strlen( hypId ) + 1;
- aDataset = new HDFdataset( hypName, aSubSubGroup, HDF_STRING, aSize, 1 );
- aDataset->CreateOnDisk();
- //aDataset->WriteOnDisk( ( char* )( myRefOnObject.c_str() ) );
- aDataset->WriteOnDisk( hypId );
- aDataset->CloseOnDisk();
- //}
- }
- }
- aSubSubGroup->CloseOnDisk();
- }
-
- // write applied algorithms if exist
- SALOMEDS::SObject_var mySubAlgoBranch;
- found = mySObject->FindSubObject( GetRefOnAppliedAlgorithmsTag(), mySubAlgoBranch );
- if ( found ) {
- aSubSubGroup = new HDFgroup( "Applied Algorithms", aSubGroup );
- aSubSubGroup->CreateOnDisk();
-
- SALOMEDS::ChildIterator_var it = myCurrentStudy->NewChildIterator( mySubAlgoBranch );
- int algoNb = 0;
- for ( ; it->More(); it->Next() ) {
- SALOMEDS::SObject_var mySubSObject = it->Value();
- SALOMEDS::SObject_var myRefOnAlgo;
- bool ok = mySubSObject->ReferencedObject( myRefOnAlgo );
- if ( ok ) {
- //string myRefOnObject = myRefOnAlgo->GetID();
- CORBA::Object_var anObject = SObjectToObject( myRefOnAlgo );
- CORBA::String_var objStr = GetORB()->object_to_string( anObject );
- int id = myStudyContext->findId( string( objStr.in() ) );
- //if ( myRefOnObject.length() > 0 ) {
- //aSize[ 0 ] = myRefOnObject.length() + 1;
- char algoName[ 30 ], algoId[ 30 ];
- sprintf( algoName, "Algo %d", ++algoNb );
- sprintf( algoId, "%d", id );
- aSize[ 0 ] = strlen( algoId ) + 1;
- aDataset = new HDFdataset( algoName, aSubSubGroup, HDF_STRING, aSize, 1 );
- aDataset->CreateOnDisk();
- //aDataset->WriteOnDisk( ( char* )( myRefOnObject.c_str() ) );
- aDataset->WriteOnDisk( algoId );
- aDataset->CloseOnDisk();
- //}
- }
- }
- aSubSubGroup->CloseOnDisk();
- }
- // close submesh HDF group
- aSubGroup->CloseOnDisk();
- }
- }
- // close container of submeshes by type HDF group
- aGroup->CloseOnDisk();
- }
- }
+ // write applied hypotheses if exist
+ SALOMEDS::SObject_var mySubHypBranch;
+ found = mySObject->FindSubObject( GetRefOnAppliedHypothesisTag(), mySubHypBranch );
+ if ( found ) {
+ aSubSubGroup = new HDFgroup( "Applied Hypotheses", aSubGroup );
+ aSubSubGroup->CreateOnDisk();
+
+ SALOMEDS::ChildIterator_var it = myCurrentStudy->NewChildIterator( mySubHypBranch );
+ int hypNb = 0;
+ for ( ; it->More(); it->Next() ) {
+ SALOMEDS::SObject_var mySubSObject = it->Value();
+ SALOMEDS::SObject_var myRefOnHyp;
+ bool ok = mySubSObject->ReferencedObject( myRefOnHyp );
+ if ( ok ) {
+ //string myRefOnObject = myRefOnHyp->GetID();
+ CORBA::Object_var anObject = SObjectToObject( myRefOnHyp );
+ CORBA::String_var objStr = GetORB()->object_to_string( anObject );
+ int id = myStudyContext->findId( string( objStr.in() ) );
+ //if ( myRefOnObject.length() > 0 ) {
+ //aSize[ 0 ] = myRefOnObject.length() + 1;
+ char hypName[ 30 ], hypId[ 30 ];
+ sprintf( hypName, "Hyp %d", ++hypNb );
+ sprintf( hypId, "%d", id );
+ aSize[ 0 ] = strlen( hypId ) + 1;
+ aDataset = new HDFdataset( hypName, aSubSubGroup, HDF_STRING, aSize, 1 );
+ aDataset->CreateOnDisk();
+ //aDataset->WriteOnDisk( ( char* )( myRefOnObject.c_str() ) );
+ aDataset->WriteOnDisk( hypId );
+ aDataset->CloseOnDisk();
+ //}
+ }
+ }
+ aSubSubGroup->CloseOnDisk();
+ }
+
+ // write applied algorithms if exist
+ SALOMEDS::SObject_var mySubAlgoBranch;
+ found = mySObject->FindSubObject( GetRefOnAppliedAlgorithmsTag(), mySubAlgoBranch );
+ if ( found ) {
+ aSubSubGroup = new HDFgroup( "Applied Algorithms", aSubGroup );
+ aSubSubGroup->CreateOnDisk();
+
+ SALOMEDS::ChildIterator_var it = myCurrentStudy->NewChildIterator( mySubAlgoBranch );
+ int algoNb = 0;
+ for ( ; it->More(); it->Next() ) {
+ SALOMEDS::SObject_var mySubSObject = it->Value();
+ SALOMEDS::SObject_var myRefOnAlgo;
+ bool ok = mySubSObject->ReferencedObject( myRefOnAlgo );
+ if ( ok ) {
+ //string myRefOnObject = myRefOnAlgo->GetID();
+ CORBA::Object_var anObject = SObjectToObject( myRefOnAlgo );
+ CORBA::String_var objStr = GetORB()->object_to_string( anObject );
+ int id = myStudyContext->findId( string( objStr.in() ) );
+ //if ( myRefOnObject.length() > 0 ) {
+ //aSize[ 0 ] = myRefOnObject.length() + 1;
+ char algoName[ 30 ], algoId[ 30 ];
+ sprintf( algoName, "Algo %d", ++algoNb );
+ sprintf( algoId, "%d", id );
+ aSize[ 0 ] = strlen( algoId ) + 1;
+ aDataset = new HDFdataset( algoName, aSubSubGroup, HDF_STRING, aSize, 1 );
+ aDataset->CreateOnDisk();
+ //aDataset->WriteOnDisk( ( char* )( myRefOnObject.c_str() ) );
+ aDataset->WriteOnDisk( algoId );
+ aDataset->CloseOnDisk();
+ //}
+ }
+ }
+ aSubSubGroup->CloseOnDisk();
+ }
+ // close submesh HDF group
+ aSubGroup->CloseOnDisk();
+ }
+ }
+ // close container of submeshes by type HDF group
+ aGroup->CloseOnDisk();
+ }
+ }