[GME-commit] GMESRC/GME/Gme GMEDoc.cpp,1.26,1.27

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Wed Apr 13 00:39:27 CDT 2005


Update of /project/gme-repository/GMESRC/GME/Gme
In directory escher:/tmp/cvs-serv20772

Modified Files:
	GMEDoc.cpp 
Log Message:
Closure called in two steps.


CVS User: Zoltan Molnar, ISIS (zolmol)

Index: GMEDoc.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEDoc.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** GMEDoc.cpp	12 Jan 2005 17:53:16 -0000	1.26
--- GMEDoc.cpp	12 Apr 2005 23:39:25 -0000	1.27
***************
*** 12,16 ****
  #include "GuiObject.h"
  #include "GMEEventLogger.h"
! 
  
  #include "slist"
--- 12,16 ----
  #include "GuiObject.h"
  #include "GMEEventLogger.h"
! #include "Parser.h"
  
  #include "slist"
***************
*** 213,225 ****
  
  	CComPtr<IMgaClosure> cl;
  	CComObjPtr<IMgaFCOs> sel_fcos, top_fcos;
  	CComObjPtr<IMgaFolders> sel_folders, top_folders;
! 	long options;
! 	CComBstrObj acckinds;
  
! 	COMTHROW( cl.CoCreateInstance(L"Mga.MgaClosure") );
! 	COMTHROW( cl->SelectiveClosure( fcos, 0, PutOut( sel_fcos), PutOut( sel_folders), PutOut( top_fcos), PutOut( top_folders), 0, &options, PutOut( acckinds) ));
  
! 	if ( sel_fcos || sel_folders) // if both null the operation is not needed (either dumped to file already or unsuccessful)
  	{
  		CGMEClosureDataSource * pDataSource = new CGMEClosureDataSource( theApp.mgaProject);
--- 213,298 ----
  
  	CComPtr<IMgaClosure> cl;
+ 
+ 	VARIANT_BOOL _refersTo           ; VARIANT_BOOL _referredBy;
+ 	VARIANT_BOOL _connections        ; VARIANT_BOOL _connsThroughRefport;
+ 	VARIANT_BOOL _setMembers         ; VARIANT_BOOL _memberOfSets;
+ 	VARIANT_BOOL _modelContainment   ; VARIANT_BOOL _partOfModels;
+ 	VARIANT_BOOL _folderContainment  ; VARIANT_BOOL _partOfFolders;
+ 	VARIANT_BOOL _baseTypeOf         ; VARIANT_BOOL _derivedTypesOf;
+ 	long _libraryElementHandling;         // 0: stubs; 1: stop; 2: continue
+ 	long _wrappingMode;                   // 0: miniproject; 1: automatic; 2: as is
+ 	long _kindFilter;                     // -1 = all; otherwise calculate the 0b000rsamf mask; where f = Folders; m = Models; a = Atoms; s = Sets; r = References
+ 	long _options;
+ 	VARIANT_BOOL _directionDown;
+ 	VARIANT_BOOL _copyToFile;             // file or clipboard
+ 	VARIANT_BOOL _okPressed;              // how ended the dialog
+ 	CComBSTR _userSelFileName;
+ 
+ 	COMTHROW( cl.CoCreateInstance(L"Mga.MgaClosure") );
+ 	COMTHROW( cl->SelectiveClosureDlg
+ 		( VARIANT_FALSE
+ 		, &_refersTo           , &_referredBy
+ 		, &_connections        , &_connsThroughRefport
+ 		, &_setMembers         , &_memberOfSets
+ 		, &_modelContainment   , &_partOfModels
+ 		, &_folderContainment  , &_partOfFolders
+ 		, &_baseTypeOf         , &_derivedTypesOf
+ 		, &_libraryElementHandling          // 0: stubs; 1: stop; 2: continue
+ 		, &_wrappingMode                    // 0: miniproject; 1: automatic; 2: as is
+ 		, &_kindFilter                      // -1 = all; otherwise calculate the 0b000rsamf mask; where f = Folders; m = Models; a = Atoms; s = Sets; r = References
+ 		, &_options
+ 		, &_directionDown
+ 		, &_copyToFile              // file or clipboard
+ 		, &_okPressed               // how ended the dialog
+ 		, &_userSelFileName
+ 		));
+ 	if( _okPressed == VARIANT_FALSE) return;
+ 
  	CComObjPtr<IMgaFCOs> sel_fcos, top_fcos;
  	CComObjPtr<IMgaFolders> sel_folders, top_folders;
! 	VARIANT_BOOL tops_filled = VARIANT_FALSE;
! 	CComBstrObj acc_kinds;
  
! 	COMTHROW( cl->SelectiveClosureCalc
! 		( fcos          , 0
! 		, _refersTo          , _referredBy
! 		, _connections       , _connsThroughRefport
! 		, _setMembers        , _memberOfSets
! 		, _modelContainment  , _partOfModels
! 		, _folderContainment , _partOfFolders
! 		, _baseTypeOf        , _derivedTypesOf
! 		, _libraryElementHandling          // 0: stubs, 1: stop, 2: continue
! 		, _wrappingMode                    // 0: miniproject, 1: automatic, 2: as is
! 		, _kindFilter                      // -1 = all, otherwise calculate the 0b000rsamf mask, where f = Folders, m = Models, a = Atoms, s = Sets, r = References
! 		, _directionDown
! 		, PutOut( sel_fcos), PutOut( sel_folders)
! 		, PutOut( top_fcos), PutOut( top_folders)
! 		, &tops_filled
! 		, PutOut( acc_kinds)
! 		));
  
! 	if( !sel_fcos && !sel_folders) return;
! 
! 	if( _copyToFile == VARIANT_TRUE) 
! 	{
! 		CComPtr<IMgaDumper> dumper;
! 		COMTHROW( dumper.CoCreateInstance(L"Mga.MgaDumper") );
! 
! 		if( _wrappingMode == 0)
! 		{
! 			COMTHROW( dumper->DumpClos( sel_fcos, sel_folders, _userSelFileName, _options));
! 		}
! 		else if( _wrappingMode == 1 || _wrappingMode == 2)
! 		{
! 			if ( tops_filled == VARIANT_TRUE)
! 				COMTHROW( dumper->DumpClosR( sel_fcos, sel_folders, _userSelFileName, top_fcos, top_folders, _options, 0, acc_kinds));
! 			else 
! 				// dump like in miniproject case from The RootFolder
! 				// if the data is copied to clipboard then the DumpClosR will call the 
! 				// DumpClos when it will realize the topfco and topfolders are empty
! 				COMTHROW( dumper->DumpClos( sel_fcos, sel_folders, _userSelFileName, _options));
! 		}
! 	}
! 	else // _copyToFile == VARIANT_FALSE 
  	{
  		CGMEClosureDataSource * pDataSource = new CGMEClosureDataSource( theApp.mgaProject);
***************
*** 231,236 ****
  		if ( top_folders)	pDataSource->SetTopNodes( top_folders);
  
! 		pDataSource->SetOptions( options);
! 		pDataSource->SetAcceptingKinds( acckinds);
  
  		CComPtr<IMgaRegNodes> anns; 
--- 304,309 ----
  		if ( top_folders)	pDataSource->SetTopNodes( top_folders);
  
! 		pDataSource->SetOptions( _options);
! 		pDataSource->SetAcceptingKinds( acc_kinds);
  
  		CComPtr<IMgaRegNodes> anns; 



More information about the GME-commit mailing list