[GME-commit] GMESRC/GME/MgaUtil ClosureDlg.cpp,1.2,1.3 ClosureDlg.h,1.2,1.3 MakeClosure.cpp,1.2,1.3 MgaUtil.rc,1.37,1.38

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Wed Jul 14 15:30:17 CDT 2004


Update of /var/lib/gme/GMESRC/GME/MgaUtil
In directory braindrain:/tmp/cvs-serv10794/MgaUtil

Modified Files:
	ClosureDlg.cpp ClosureDlg.h MakeClosure.cpp MgaUtil.rc 
Log Message:
Selective Closure
	-makes possible restoring connections to library elements.

	-library name matching based on short filenames

	-parses libraries correctly (as libraries)

Mga.dtd file modified, more distinctive closure attributes used: "closurelib*"

-----

Mga::FCO::SetCompareToBase modified, checks the number of setmembers
MgaParser::StartSet corrected to erase members originating from the derivation process if the isbound attribute is false



CVS User: zolmol

Index: ClosureDlg.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/ClosureDlg.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ClosureDlg.cpp	30 Jun 2004 17:50:47 -0000	1.2
--- ClosureDlg.cpp	14 Jul 2004 19:30:15 -0000	1.3
***************
*** 33,37 ****
  	m_bPartOfModels = FALSE;
  	m_bPartOfFolders = FALSE;
- 	m_bDigIntoLibraries = FALSE;
  	m_strOutputFile = _T("");
  	m_outputOption = -1;
--- 33,36 ----
***************
*** 68,72 ****
  	DDX_Check(pDX, IDC_CHECKPARTOFMODEL, m_bPartOfModels);
  	DDX_Check(pDX, IDC_CHECKPARTOFFOLDERS, m_bPartOfFolders);
- 	DDX_Check(pDX, IDC_DIGINTOLIBRARY, m_bDigIntoLibraries);
  	DDX_Text(pDX, IDC_EDIT1, m_strOutputFile);
  	DDX_Radio(pDX, IDC_OUTPUTTOCLIPBOARD, m_outputOption);
--- 67,70 ----

Index: ClosureDlg.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/ClosureDlg.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ClosureDlg.h	30 Jun 2004 17:50:47 -0000	1.2
--- ClosureDlg.h	14 Jul 2004 19:30:15 -0000	1.3
***************
*** 42,46 ****
  	BOOL	m_bPartOfModels;
  	BOOL	m_bPartOfFolders;
- 	BOOL	m_bDigIntoLibraries;
  	CString	m_strOutputFile;
  	int		m_outputOption;
--- 42,45 ----

Index: MakeClosure.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MakeClosure.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MakeClosure.cpp	30 Jun 2004 17:50:47 -0000	1.2
--- MakeClosure.cpp	14 Jul 2004 19:30:15 -0000	1.3
***************
*** 271,324 ****
  void CMakeClosure::processFolders()
  {
- 	CComObjPtr<IMgaObject> o1, o2, o3, o4, o5, o6;
- 	CComBSTR name;
- 	name.Append("/@NewTOSFolder/@NewTOSFolderr/@NewTOSFolderRr/@I");
- 	COMTHROW( m_project->get_ObjectByPath( name, PutOut( o1)));
- 	if ( o1)
- 	{
- 				CComBSTR name2;
- 				COMTHROW( o1->get_Name( &name2));
- 	}
- 	name = "";
- 	name.Append("@NewTOSFolder/@NewTOSFolderr/@NewTOSFolderRr/@I");
- 	COMTHROW( m_project->get_ObjectByPath( name, PutOut( o2)));
- 	if ( o2)
- 	{
- 				CComBSTR name2;
- 				COMTHROW( o2->get_Name( &name2));
- 	}
- 	name = "";
- 	name.Append("/@tmp2/@NewTOSFolder/@NewTOSFolderr/@NewTOSFolderRr");
- 	COMTHROW( m_project->get_ObjectByPath( name, PutOut( o3)));
- 	if ( o3)
- 	{
- 				CComBSTR name2;
- 				COMTHROW( o3->get_Name( &name2));
- 	}
- 	name = "";
- 	name.Append("/@tmp2/");
- 	COMTHROW( m_project->get_ObjectByPath( name, PutOut( o4)));
- 	if ( o4)
- 	{
- 				CComBSTR name2;
- 				COMTHROW( o4->get_Name( &name2));
- 	}
- 	name = "";
- 	name.Append("/@tmp2/@");
- 	COMTHROW( m_project->get_ObjectByPath( name, PutOut( o5)));
- 	if ( o5)
- 	{
- 				CComBSTR name2;
- 				COMTHROW( o5->get_Name( &name2));
- 	}
- 	name = "";
- 	name.Append("/@tmp2");
- 	COMTHROW( m_project->get_ObjectByPath( name, PutOut( o6)));
- 	if ( o6)
- 	{
- 				CComBSTR name2;
- 				COMTHROW( o6->get_Name( &name2));
- 	}
- 
  	unsigned int curr_start = 0;
  	bool continju = true;
--- 271,274 ----
***************
*** 406,410 ****
  	COMTHROW( reference->get_Referred( PutOut( fco)) );
  
! 	if ( m_bRefersTo)
  	{
  		bool inlib = isInLibrary( fco); // a referred fco may be in a library
--- 356,360 ----
  	COMTHROW( reference->get_Referred( PutOut( fco)) );
  
! 	if ( m_bRefersTo && fco) // test if null reference
  	{
  		bool inlib = isInLibrary( fco); // a referred fco may be in a library
***************
*** 454,466 ****
  	ASSERT( connpoint != NULL );
  
! 	CComObjPtr<IMgaFCO> target;
  	COMTHROW( connpoint->get_Target( PutOut( target)) );
  
! 	CComObjPtr<IMgaConnection> conn;
  	COMTHROW( connpoint->get_Owner( PutOut( conn)) );
  	CComObjPtr<IMgaFCO> conn_fco;
  	COMTHROW( conn.QueryInterface( conn_fco));
  
! 	CComObjPtrVector<IMgaFCO> refs;
  	COMTHROW( connpoint->get_References( PutOut( refs)) );
  
--- 404,416 ----
  	ASSERT( connpoint != NULL );
  
! 	CComObjPtr<IMgaFCO> target; // the src or dst of a connection
  	COMTHROW( connpoint->get_Target( PutOut( target)) );
  
! 	CComObjPtr<IMgaConnection> conn; // the connection itself
  	COMTHROW( connpoint->get_Owner( PutOut( conn)) );
  	CComObjPtr<IMgaFCO> conn_fco;
  	COMTHROW( conn.QueryInterface( conn_fco));
  
! 	CComObjPtrVector<IMgaFCO> refs; // the reference chain the connection is drawn
  	COMTHROW( connpoint->get_References( PutOut( refs)) );
  
***************
*** 470,478 ****
  		insertNew( conn_fco);
  	}
! 	else if ( m_bReferredBy) // or m_bReferredTo? //<!>
  	{
! 		insertNew( target);
! 		insertNew( conn_fco);
! 		insertNew( refs);
  	}
  
--- 420,435 ----
  		insertNew( conn_fco);
  	}
! 	else if ( m_bReferredBy) // because the internal representation of the connections through refports
  	{
! 		bool inlib;
! 		inlib = isInLibrary( target);
! 		if ( inlib && m_bIntoLibraries || !inlib) insertNew( target);
! 		
! 		inlib = isInLibrary( conn_fco); // the connection might be in the library (=both endtargets are as well in the library)
! 		if ( inlib && m_bIntoLibraries || !inlib) 
! 		{
! 			insertNew( conn_fco);		
! 			insertNew( refs);
! 		}
  	}
  
***************
*** 1193,1196 ****
--- 1150,1154 ----
  	//
  	// looking for potential folder containers
+ 	bool is_any_library = false;
  	set < string > goody;
  	for( CComObjPtrVector<IMgaFolder>::iterator fold_it = m_topFolds.begin(); fold_it != m_topFolds.end(); ++fold_it)
***************
*** 1199,1202 ****
--- 1157,1168 ----
  		CComObjPtr<IMgaMetaFolder> f_meta;
  		COMTHROW( (*fold_it)->get_MetaFolder( PutOut( f_meta)));
+ 		
+ 		// check if exists library among the top folders
+ 		CComBstrObj kind_name;
+ 		COMTHROW( f_meta->get_Name( PutOut(kind_name)) );
+ 		string kind_nm;
+ 		CopyTo( kind_name, kind_nm);
+ 		if ( kind_nm == "RootFolder")
+ 			is_any_library = true;
  
  		// will store the folder parents this folder may be part of
***************
*** 1226,1230 ****
  		}
  	}
! 
  	
  	for( CComObjPtrVector<IMgaFCO>::iterator kind_it = m_topFcos.begin(); kind_it != m_topFcos.end(); ++kind_it)
--- 1192,1196 ----
  		}
  	}
! 	goody.insert( "The RootFolder perhaps"); // an informative message, since a library might be pasted only into a rootfolder
  	
  	for( CComObjPtrVector<IMgaFCO>::iterator kind_it = m_topFcos.begin(); kind_it != m_topFcos.end(); ++kind_it)

Index: MgaUtil.rc
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MgaUtil.rc,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** MgaUtil.rc	30 Jun 2004 17:50:47 -0000	1.37
--- MgaUtil.rc	14 Jul 2004 19:30:15 -0000	1.38
***************
*** 433,437 ****
  END
  
! IDD_CLOSUREDLG DIALOG DISCARDABLE  0, 0, 280, 234
  STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  CAPTION "Selective Closure"
--- 433,437 ----
  END
  
! IDD_CLOSUREDLG DIALOG DISCARDABLE  0, 0, 264, 234
  STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  CAPTION "Selective Closure"
***************
*** 439,492 ****
  BEGIN
      GROUPBOX        "Direction and relations to be considered",IDC_STATIC,21,
!                     4,236,90
      CONTROL         "Up",IDC_DIRECTIONUP,"Button",BS_AUTORADIOBUTTON | 
!                     WS_GROUP | WS_TABSTOP,34,15,37,8
!     CONTROL         "Down",IDC_DIRECTIONDN,"Button",BS_AUTORADIOBUTTON,34,26,
                      37,8
      CONTROL         "Part of Models",IDC_CHECKPARTOFMODEL,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,86,15,61,8
      CONTROL         "Containment",IDC_CHECKCONTAINMENT,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,86,26,77,8
      CONTROL         "Part of Folders",IDC_CHECKPARTOFFOLDERS,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,164,15,61,8
      CONTROL         "Folder Containment",IDC_CHECKFOLDERCONTAINMENT,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,164,26,77,8
      CONTROL         "Refers To",IDC_CHECKREFERSTO,"Button",BS_AUTOCHECKBOX | 
!                     WS_TABSTOP,86,47,53,8
      CONTROL         "Referred by",IDC_CHECKREFERREDBY,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,86,58,51,8
      CONTROL         "Connection",IDC_CHECKCONNECTION,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,86,69,53,8
!     CONTROL         "Base type of",IDC_CHECKBASETYPES,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,86,80,55,8
      CONTROL         "Set Member",IDC_CHECKSETMEMBER,"Button",BS_AUTOCHECKBOX | 
!                     WS_TABSTOP,164,47,77,8
      CONTROL         "Member Of Sets",IDC_CHECKMEMBEROF,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,164,58,77,8
!     CONTROL         "Into Libraries",IDC_DIGINTOLIBRARY,"Button",
!                     BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,164,69,61,8
      CONTROL         "Derived type of",IDC_CHECKSUBTYPES,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,164,80,61,8
      GROUPBOX        "Library element handling",IDC_STATIC,21,99,132,51
      CONTROL         "Use stubs",IDC_LIBR1,"Button",BS_AUTORADIOBUTTON | 
!                     WS_GROUP | WS_TABSTOP,34,112,61,8
      CONTROL         "Do not include in closure (stop)",IDC_LIBR2,"Button",
!                     BS_AUTORADIOBUTTON,34,124,115,8
      CONTROL         "Include in closure (continue)",IDC_LIBR3,"Button",
!                     BS_AUTORADIOBUTTON,34,136,116,8
!     GROUPBOX        "Wrap selected closure",IDC_STATIC,159,99,98,51
      CONTROL         "Miniproject",IDC_WRAPMINIPROJ,"Button",
!                     BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,171,112,49,8
!     CONTROL         "Automatic",IDC_WRAPAUTO,"Button",BS_AUTORADIOBUTTON,171,
                      124,49,8
!     CONTROL         "As is",IDC_WRAPASIS,"Button",BS_AUTORADIOBUTTON,171,136,
                      32,8
!     GROUPBOX        "Output to",IDC_STATIC,21,158,235,38
      CONTROL         "Clipboard",IDC_OUTPUTTOCLIPBOARD,"Button",
                      BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,25,169,49,9
      CONTROL         "File",IDC_OUTPUTTOFILE,"Button",BS_AUTORADIOBUTTON,25,
                      181,25,9
!     EDITTEXT        IDC_EDIT1,56,179,163,12,ES_AUTOHSCROLL
!     PUSHBUTTON      " ... ",IDC_BROWSE,229,179,15,12
      DEFPUSHBUTTON   "OK",IDOK,63,208,50,14
      PUSHBUTTON      "Cancel",IDCANCEL,157,208,50,14
--- 439,490 ----
  BEGIN
      GROUPBOX        "Direction and relations to be considered",IDC_STATIC,21,
!                     4,220,90
      CONTROL         "Up",IDC_DIRECTIONUP,"Button",BS_AUTORADIOBUTTON | 
!                     WS_GROUP | WS_TABSTOP,25,15,37,8
!     CONTROL         "Down",IDC_DIRECTIONDN,"Button",BS_AUTORADIOBUTTON,25,26,
                      37,8
      CONTROL         "Part of Models",IDC_CHECKPARTOFMODEL,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,69,15,61,8
      CONTROL         "Containment",IDC_CHECKCONTAINMENT,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,69,26,77,8
      CONTROL         "Part of Folders",IDC_CHECKPARTOFFOLDERS,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,147,15,61,8
      CONTROL         "Folder Containment",IDC_CHECKFOLDERCONTAINMENT,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,147,26,77,8
      CONTROL         "Refers To",IDC_CHECKREFERSTO,"Button",BS_AUTOCHECKBOX | 
!                     WS_TABSTOP,69,47,53,8
      CONTROL         "Referred by",IDC_CHECKREFERREDBY,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,69,58,51,8
      CONTROL         "Connection",IDC_CHECKCONNECTION,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,69,69,58,8
      CONTROL         "Set Member",IDC_CHECKSETMEMBER,"Button",BS_AUTOCHECKBOX | 
!                     WS_TABSTOP,147,47,55,8
      CONTROL         "Member Of Sets",IDC_CHECKMEMBEROF,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,147,58,67,8
!     CONTROL         "Base type of",IDC_CHECKBASETYPES,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,147,69,55,8
      CONTROL         "Derived type of",IDC_CHECKSUBTYPES,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,147,80,61,8
      GROUPBOX        "Library element handling",IDC_STATIC,21,99,132,51
      CONTROL         "Use stubs",IDC_LIBR1,"Button",BS_AUTORADIOBUTTON | 
!                     WS_GROUP | WS_TABSTOP,25,112,61,8
      CONTROL         "Do not include in closure (stop)",IDC_LIBR2,"Button",
!                     BS_AUTORADIOBUTTON,25,124,115,8
      CONTROL         "Include in closure (continue)",IDC_LIBR3,"Button",
!                     BS_AUTORADIOBUTTON,25,136,116,8
!     GROUPBOX        "Wrap selected closure",IDC_STATIC,159,99,82,51
      CONTROL         "Miniproject",IDC_WRAPMINIPROJ,"Button",
!                     BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,163,112,49,8
!     CONTROL         "Automatic",IDC_WRAPAUTO,"Button",BS_AUTORADIOBUTTON,163,
                      124,49,8
!     CONTROL         "As is",IDC_WRAPASIS,"Button",BS_AUTORADIOBUTTON,163,136,
                      32,8
!     GROUPBOX        "Output to",IDC_STATIC,21,158,220,38
      CONTROL         "Clipboard",IDC_OUTPUTTOCLIPBOARD,"Button",
                      BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,25,169,49,9
      CONTROL         "File",IDC_OUTPUTTOFILE,"Button",BS_AUTORADIOBUTTON,25,
                      181,25,9
!     EDITTEXT        IDC_EDIT1,56,179,160,12,ES_AUTOHSCROLL
!     PUSHBUTTON      " ... ",IDC_BROWSE,220,179,15,12
      DEFPUSHBUTTON   "OK",IDOK,63,208,50,14
      PUSHBUTTON      "Cancel",IDCANCEL,157,208,50,14
***************
*** 719,723 ****
      BEGIN
          LEFTMARGIN, 7
!         RIGHTMARGIN, 273
          TOPMARGIN, 7
          BOTTOMMARGIN, 227
--- 717,721 ----
      BEGIN
          LEFTMARGIN, 7
!         RIGHTMARGIN, 257
          TOPMARGIN, 7
          BOTTOMMARGIN, 227



More information about the GME-commit mailing list