[GME-commit] GMESRC/GME/MgaUtil ClosureDlg.cpp,1.6,1.7 ClosureDlg.h,1.5,1.6 MakeClosure.cpp,1.15,1.16 MakeClosure.h,1.9,1.10 MakeKindClosure.h,1.1,1.2 MakeSimpleClosure.h,1.2,1.3 MgaClosure.cpp,1.9,1.10 MgaClosure.h,1.5,1.6 MgaUtil.rc,1.53,1.54 resource.h,1.34,1.35

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Tue Aug 8 20:12:08 CDT 2006


Update of /project/gme-repository/GMESRC/GME/MgaUtil
In directory escher:/tmp/cvs-serv11820

Modified Files:
	ClosureDlg.cpp ClosureDlg.h MakeClosure.cpp MakeClosure.h 
	MakeKindClosure.h MakeSimpleClosure.h MgaClosure.cpp 
	MgaClosure.h MgaUtil.rc resource.h 
Log Message:
Closure marking introduced.


CVS User: Zoltan Molnar, ISIS (zolmol)

Index: ClosureDlg.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/ClosureDlg.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ClosureDlg.h	12 Apr 2005 23:37:31 -0000	1.5
--- ClosureDlg.h	8 Aug 2006 19:12:06 -0000	1.6
***************
*** 58,61 ****
--- 58,63 ----
  	int		m_includeAllKindsRadio;
  	BOOL	m_bRefPortConnection;
+ 	BOOL	m_bMarkObjs;
+ 	CEdit	m_ctrlMarkVal;
  	//}}AFX_DATA
  
***************
*** 89,92 ****
--- 91,95 ----
  	afx_msg void OnWrapAuto();
  	afx_msg void OnWrapAsIs();
+ 	afx_msg void OnMarkClicked();
  	//}}AFX_MSG
  	DECLARE_MESSAGE_MAP()
***************
*** 105,108 ****
--- 108,112 ----
  
  	long calcKindMask();
+ 	int  m_iMarkVal;
  };
  

Index: MgaUtil.rc
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/MgaUtil.rc,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** MgaUtil.rc	21 Jul 2006 19:23:30 -0000	1.53
--- MgaUtil.rc	8 Aug 2006 19:12:06 -0000	1.54
***************
*** 458,465 ****
  END
  
! IDD_CLOSUREDLG DIALOG  0, 0, 279, 238
  STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  CAPTION "Selective Closure"
! FONT 8, "MS Sans Serif"
  BEGIN
      GROUPBOX        "Direction, kinds and relations to be considered",
--- 458,465 ----
  END
  
! IDD_CLOSUREDLG DIALOGEX 0, 0, 279, 260
  STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  CAPTION "Selective Closure"
! FONT 8, "MS Sans Serif", 0, 0, 0x0
  BEGIN
      GROUPBOX        "Direction, kinds and relations to be considered",
***************
*** 519,524 ****
      EDITTEXT        IDC_EDIT1,56,187,177,12,ES_AUTOHSCROLL
      PUSHBUTTON      " ... ",IDC_BROWSE,237,187,15,12
!     DEFPUSHBUTTON   "OK",IDOK,63,216,50,14
!     PUSHBUTTON      "Cancel",IDCANCEL,157,216,50,14
  END
  
--- 519,529 ----
      EDITTEXT        IDC_EDIT1,56,187,177,12,ES_AUTOHSCROLL
      PUSHBUTTON      " ... ",IDC_BROWSE,237,187,15,12
!     DEFPUSHBUTTON   "OK",IDOK,64,239,50,14
!     PUSHBUTTON      "Cancel",IDCANCEL,158,239,50,14
!     GROUPBOX        "Special",IDC_STATIC,22,207,236,30
!     CONTROL         "Mark Elements inside closure",IDC_CHECKMARK,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,28,219,118,10
!     EDITTEXT        IDC_EDITMARK,204,218,22,12,ES_AUTOHSCROLL | ES_NUMBER
!     LTEXT           "ClosureId:",IDC_STATIC,164,219,33,10
  END
  
***************
*** 831,835 ****
          RIGHTMARGIN, 272
          TOPMARGIN, 7
!         BOTTOMMARGIN, 231
      END
  
--- 836,840 ----
          RIGHTMARGIN, 272
          TOPMARGIN, 7
!         BOTTOMMARGIN, 253
      END
  

Index: MgaClosure.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/MgaClosure.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** MgaClosure.cpp	21 Jul 2005 16:56:44 -0000	1.9
--- MgaClosure.cpp	8 Aug 2006 19:12:06 -0000	1.10
***************
*** 20,23 ****
--- 20,24 ----
  	, long* p_wrappingMode                    // 0: miniproject, 1: automatic, 2: as is
  	, long* p_kindFilter                      // -1 = all, otherwise calculate the 0b000rsamf mask, where f = Folders, m = Models, a = Atoms, s = Sets, r = References
+ 	, long* p_markWith                        // mark all objects in closure
  	, long* p_options
  	, VARIANT_BOOL* p_directionDown
***************
*** 39,42 ****
--- 40,44 ----
  	 || !p_wrappingMode
  	 || !p_kindFilter
+ 	 || !p_markWith
  	 || !p_options
  	 || !p_directionDown
***************
*** 69,72 ****
--- 71,75 ----
  		*p_wrappingMode           = dlg.m_wrappingOption;
  		*p_kindFilter             = dlg.calcKindMask();
+ 		*p_markWith               = dlg.m_bMarkObjs ? dlg.m_iMarkVal : -1;
  		*p_options                = (dlg.m_libraryHandling == 0)?0x1:0; // in case of "stubs" set the options to 1
  		*p_directionDown          = dlg.m_direction    == 1 ? VARIANT_TRUE : VARIANT_FALSE;
***************
*** 91,94 ****
--- 94,98 ----
  	, long p_wrapping                        // 0: miniproject, 1: automatic, 2: as is
  	, long p_kindFilter                      // -1 = all, otherwise calculate the 0b000rsamf mask, where f = Folders, m = Models, a = Atoms, s = Sets, r = References
+ 	, long p_markWith                        // mark all objects in closure
  	, VARIANT_BOOL p_directionDown
  	, IMgaFCOs** p_selFcos, IMgaFolders** p_selFolders
***************
*** 132,135 ****
--- 136,140 ----
  		, p_directionDown  == VARIANT_TRUE  ? 1: 0
  		, (int) p_kindFilter
+ 		, (int) p_markWith
  		);
  

Index: MakeSimpleClosure.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/MakeSimpleClosure.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MakeSimpleClosure.h	21 Jul 2005 16:56:44 -0000	1.2
--- MakeSimpleClosure.h	8 Aug 2006 19:12:06 -0000	1.3
***************
*** 36,39 ****
--- 36,40 ----
  			, 1 //direction_opt
  			, -1 //all kinds
+ 			, -1 //don't mark
  			)
  		, m_bExclAtom( excl_atom)

Index: ClosureDlg.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/ClosureDlg.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ClosureDlg.cpp	12 Apr 2005 23:37:31 -0000	1.6
--- ClosureDlg.cpp	8 Aug 2006 19:12:06 -0000	1.7
***************
*** 42,46 ****
--- 42,48 ----
  	m_includeAllKindsRadio = -1;
  	m_bRefPortConnection = FALSE;
+ 	m_bMarkObjs = FALSE;
  	//}}AFX_DATA_INIT
+ 	m_iMarkVal = -1;
  }
  
***************
*** 85,88 ****
--- 87,92 ----
  	DDX_Radio(pDX, IDC_INCLUDEALL, m_includeAllKindsRadio);
  	DDX_Check(pDX, IDC_CHECKREFPORTCONNECTION, m_bRefPortConnection);
+ 	DDX_Check(pDX, IDC_CHECKMARK, m_bMarkObjs);
+ 	DDX_Control(pDX, IDC_EDITMARK, m_ctrlMarkVal);
  	//}}AFX_DATA_MAP
  }
***************
*** 105,108 ****
--- 109,113 ----
  	ON_BN_CLICKED(IDC_WRAPAUTO, OnWrapAuto)
  	ON_BN_CLICKED(IDC_WRAPASIS, OnWrapAsIs)
+ 	ON_BN_CLICKED(IDC_CHECKMARK, OnMarkClicked)
  	//}}AFX_MSG_MAP
  END_MESSAGE_MAP()
***************
*** 145,148 ****
--- 150,155 ----
  	m_ctrlRefPortConnection.EnableWindow( m_bConnection);
  
+ 	m_ctrlMarkVal.EnableWindow( m_bMarkObjs);
+ 
  	//m_bConnection = TRUE;
  	//m_bContainment = TRUE;
***************
*** 170,173 ****
--- 177,186 ----
  void CClosureDlg::OnOK() 
  {
+ 	TCHAR buf[12];
+ 	m_ctrlMarkVal.GetWindowText( buf, 11);
+ 
+ 	if( 1 != _stscanf( buf, "%i", &m_iMarkVal))
+ 		m_iMarkVal = -1;
+ 
  	CDialog::OnOK();
  }
***************
*** 323,325 ****
  
  	return kind_map;
! }
\ No newline at end of file
--- 336,346 ----
  
  	return kind_map;
! }
! 
! void CClosureDlg::OnMarkClicked()
! {
! 	UpdateData( TRUE);
! 	m_ctrlMarkVal.EnableWindow( m_bMarkObjs);
! 	UpdateData( FALSE);	
! 
! }

Index: MakeClosure.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/MakeClosure.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** MakeClosure.cpp	19 Jul 2005 17:35:17 -0000	1.15
--- MakeClosure.cpp	8 Aug 2006 19:12:06 -0000	1.16
***************
*** 13,17 ****
  //
  const std::string rootfolder_str = "RootFolder";
! 
  
  inline void nop( IMgaMetaFCO * f)
--- 13,17 ----
  //
  const std::string rootfolder_str = "RootFolder";
! const wchar_t* CMakeClosure::m_markerNode = L"inClosure";
  
  inline void nop( IMgaMetaFCO * f)
***************
*** 683,686 ****
--- 683,702 ----
  }
  
+ template<class T>
+ void CMakeClosure::markObj( CComObjPtr<T> obj)
+ {
+ 	if( m_markWith != -1)
+ 	{
+ 		CComBSTR buf0;
+ 		COMTHROW( obj->get_RegistryValue( CComBSTR( m_markerNode), &buf0));
+ 
+ 		wchar_t buf1[12];
+ 		swprintf( buf1, L",%i", m_markWith);
+ 		buf0.Append( buf1);
+ 		
+ 		COMTHROW( obj->put_RegistryValue( CComBSTR( m_markerNode), buf0));
+ 	}
+ }
+ 
  void CMakeClosure::procObj( IMgaObject* obj)
  {
***************
*** 704,707 ****
--- 720,725 ----
  			COMTHROW( ::QueryInterface( obj, p) );
  
+ 			markObj( p);
+ 
  			if ( m_bConnection) 		procMyConnections( p);
  			if ( m_bMemberOfSets)		procMyContainerSets( p);
***************
*** 720,723 ****
--- 738,743 ----
  			COMTHROW( ::QueryInterface( obj, p) );
  			
+ 			markObj( p);
+ 
  			if ( m_bPartOfFolders)		procMyParent( p);
  			break;

Index: resource.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/resource.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** resource.h	21 Jul 2006 19:23:30 -0000	1.34
--- resource.h	8 Aug 2006 19:12:06 -0000	1.35
***************
*** 213,216 ****
--- 213,218 ----
  #define IDC_RAD_ALTER2                  2276
  #define IDC_RAD_ALTER3                  2277
+ #define IDC_CHECKMARK                   2278
+ #define IDC_EDITMARK                    2279
  #define ID_CNTX_ADDNODE                 32774
  #define ID_CNTX_CLEARNODE               32775
***************
*** 224,228 ****
  #define _APS_NEXT_RESOURCE_VALUE        2072
  #define _APS_NEXT_COMMAND_VALUE         32778
! #define _APS_NEXT_CONTROL_VALUE         2278
  #define _APS_NEXT_SYMED_VALUE           2091
  #endif
--- 226,230 ----
  #define _APS_NEXT_RESOURCE_VALUE        2072
  #define _APS_NEXT_COMMAND_VALUE         32778
! #define _APS_NEXT_CONTROL_VALUE         2280
  #define _APS_NEXT_SYMED_VALUE           2091
  #endif

Index: MakeClosure.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/MakeClosure.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** MakeClosure.h	19 Jul 2005 17:35:17 -0000	1.9
--- MakeClosure.h	8 Aug 2006 19:12:06 -0000	1.10
***************
*** 40,44 ****
  		int container_opt = 0,
  		int direction_opt = 1,
! 		int all_kinds = -1
  		)
  		: m_bRefersTo( ref == 1)
--- 40,45 ----
  		int container_opt = 0,
  		int direction_opt = 1,
! 		int all_kinds = -1,
! 		int mark_with = -1
  		)
  		: m_bRefersTo( ref == 1)
***************
*** 58,61 ****
--- 59,63 ----
  		, m_bDirection( direction_opt == 1)
  		, m_kindFilter( all_kinds)
+ 		, m_markWith( mark_with)
  	{
  		if ( fcos)		CopyTo( fcos, m_selFcos);
***************
*** 115,118 ****
--- 117,121 ----
  	std::vector< std::string > m_acceptingKindsAndFolders; // the meta names of those kinds which the closure may be inserted into
  
+ 	template<class T> void markObj( CComObjPtr<T> obj);
  	virtual void procObj( IMgaObject* obj);
  	
***************
*** 242,245 ****
--- 245,250 ----
  
  	int m_kindFilter;		// if -1 then all kinds, otherwise bitmasking needed to calc which kinds are considered from the children
+ 	int m_markWith;         // if -1 then don't mark, otherwise mark all objects in closure (into registry)
+ 	static const wchar_t* m_markerNode;
  };
  

Index: MakeKindClosure.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/MakeKindClosure.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MakeKindClosure.h	19 Jul 2005 17:35:17 -0000	1.1
--- MakeKindClosure.h	8 Aug 2006 19:12:06 -0000	1.2
***************
*** 34,37 ****
--- 34,38 ----
  			, 1 //direction_opt
  			, -1 //all kinds
+ 			, -1 //don't mark
  			)
  		, m_bRefs( refs == 1)

Index: MgaClosure.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/MgaClosure.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** MgaClosure.h	2 May 2005 17:13:30 -0000	1.5
--- MgaClosure.h	8 Aug 2006 19:12:06 -0000	1.6
***************
*** 35,38 ****
--- 35,39 ----
  		, long* p_wrappingMode                    // 0: miniproject, 1: automatic, 2: as is
  		, long* p_kindFilter                      // -1 = all, otherwise calculate the 0b000rsamf mask, where f = Folders, m = Models, a = Atoms, s = Sets, r = References
+ 		, long* p_markWith                        // mark all objects in closure
  		, long* p_options
  		, VARIANT_BOOL* p_directionDown
***************
*** 53,56 ****
--- 54,58 ----
  		, long p_wrapping                        // 0: miniproject, 1: automatic, 2: as is
  		, long p_kindFilter                      // -1 = all, otherwise calculate the 0b000rsamf mask, where f = Folders, m = Models, a = Atoms, s = Sets, r = References
+ 		, long p_markWith                        // mark all objects in closure
  		, VARIANT_BOOL p_directionDown
  		, IMgaFCOs **p_selFcos, IMgaFolders **p_selFolders



More information about the GME-commit mailing list