[GME-commit] GMESRC/GME/MgaUtil ClosureKindSel.cpp,NONE,1.1
ClosureKindSel.h,NONE,1.1 ClosureSmart.cpp,NONE,1.1
ClosureSmart.h,NONE,1.1 ClosureDlg.cpp,1.3,1.4 ClosureDlg.h,1.3,1.4
MakeClosure.cpp,1.8,1.9 MakeClosure.h,1.4,1.5
MgaClosure.cpp,1.3,1.4 MgaClosure.h,1.2,1.3 MgaUtil.dsp,1.24,1.25
MgaUtil.rc,1.40,1.41 resource.h,1.25,1.26
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Mon Sep 27 17:50:55 CDT 2004
- Previous message: [GME-commit] GMESRC/GME/Mga MgaFCO.cpp,1.31,1.32 MgaFCO.h,1.18,1.19
MgaFolder.cpp,1.24,1.25 MgaProject.cpp,1.57,1.58
MgaProject.h,1.26,1.27
- Next message: [GME-commit]
GMESRC/GME/GMEActiveBrowser ActiveBrowserPropertyPage.cpp,1.35,1.36
ActiveBrowserPropertyPage.h,1.8,1.9
AggregateContextMenu.cpp,1.17,1.18 AggregateContextMenu.h,1.3,1.4
AggregateTreeCtrl.cpp,1.18,1.19 GMEActiveBrowser.rc,1.8,1.9
resource.h,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/gme/GMESRC/GME/MgaUtil
In directory braindrain:/tmp/cvs-serv13955
Modified Files:
ClosureDlg.cpp ClosureDlg.h MakeClosure.cpp MakeClosure.h
MgaClosure.cpp MgaClosure.h MgaUtil.dsp MgaUtil.rc resource.h
Added Files:
ClosureKindSel.cpp ClosureKindSel.h ClosureSmart.cpp
ClosureSmart.h
Log Message:
SmartCopy introduced.
CVS User: zolmol
--- NEW FILE: ClosureKindSel.cpp ---
// ClosureKindSel.cpp : implementation file
//
#include "stdafx.h"
#include "mgautil.h"
#include "ClosureKindSel.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CClosureKindSel dialog
CClosureKindSel::CClosureKindSel(bool fld, bool mdl, bool atm, bool set, bool ref, CWnd* pParent /*=NULL*/)
: CDialog(CClosureKindSel::IDD, pParent)
{
//{{AFX_DATA_INIT(CClosureKindSel)
m_folder = FALSE;
m_model = FALSE;
m_atom = FALSE;
m_set = FALSE;
m_ref = FALSE;
//}}AFX_DATA_INIT
m_folder = fld?TRUE:FALSE;
m_model = mdl?TRUE:FALSE;
m_atom = atm?TRUE:FALSE;
m_set = set?TRUE:FALSE;
m_ref = ref?TRUE:FALSE;
}
void CClosureKindSel::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CClosureKindSel)
DDX_Check(pDX, IDC_CHECK1, m_folder);
DDX_Check(pDX, IDC_CHECK2, m_model);
DDX_Check(pDX, IDC_CHECK3, m_atom);
DDX_Check(pDX, IDC_CHECK4, m_set);
DDX_Check(pDX, IDC_CHECK5, m_ref);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CClosureKindSel, CDialog)
//{{AFX_MSG_MAP(CClosureKindSel)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CClosureKindSel message handlers
BOOL CClosureKindSel::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
--- NEW FILE: ClosureKindSel.h ---
#if !defined(AFX_CLOSUREKINDSEL_H__E19FB4C7_A578_4BD4_95D3_D632A022A13E__INCLUDED_)
#define AFX_CLOSUREKINDSEL_H__E19FB4C7_A578_4BD4_95D3_D632A022A13E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ClosureKindSel.h : header file
//
#include "resource.h"
/////////////////////////////////////////////////////////////////////////////
// CClosureKindSel dialog
class CClosureKindSel : public CDialog
{
// Construction
public:
CClosureKindSel(bool fld, bool mdl, bool atm, bool set, bool ref, CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CClosureKindSel)
enum { IDD = IDD_CLOSUREKINDSEL };
BOOL m_folder;
BOOL m_model;
BOOL m_atom;
BOOL m_set;
BOOL m_ref;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CClosureKindSel)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
/*bool m_fld;
bool m_mdl;
bool m_atm;
bool m_set;
bool m_ref;*/
// Generated message map functions
//{{AFX_MSG(CClosureKindSel)
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CLOSUREKINDSEL_H__E19FB4C7_A578_4BD4_95D3_D632A022A13E__INCLUDED_)
--- NEW FILE: ClosureSmart.cpp ---
// ClosureSmart.cpp : implementation file
//
#include "stdafx.h"
#include "mgautil.h"
#include "ClosureSmart.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CClosureSmart dialog
CClosureSmart::CClosureSmart(CWnd* pParent /*=NULL*/)
: CDialog(CClosureSmart::IDD, pParent)
//: CPropertyPage(CClosureSmart::IDD)
{
//{{AFX_DATA_INIT(CClosureSmart)
m_bConns = FALSE;
m_bRefs = FALSE;
m_bSets = FALSE;
//}}AFX_DATA_INIT
m_disable = false;
}
void CClosureSmart::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CClosureSmart)
DDX_Check(pDX, IDC_CHECKCONN, m_bConns);
DDX_Check(pDX, IDC_CHECKREF, m_bRefs);
DDX_Check(pDX, IDC_CHECKSET, m_bSets);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CClosureSmart, CDialog)
//{{AFX_MSG_MAP(CClosureSmart)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CClosureSmart message handlers
BOOL CClosureSmart::OnInitDialog()
{
UpdateData( FALSE);
CDialog::OnInitDialog();
if( m_disable)
{
GetDlgItem( IDC_CHECKCONN)->EnableWindow( m_bConns);
GetDlgItem( IDC_CHECKSET)->EnableWindow( m_bSets);
GetDlgItem( IDC_CHECKREF)->EnableWindow( m_bRefs);
}
else // container case
{
CWnd* w; CString t;
w = GetDlgItem( IDC_CHECKCONN);
w->GetWindowText( t);
w->SetWindowText( "Inner " + t);
w = GetDlgItem( IDC_CHECKSET);
w->GetWindowText( t);
w->SetWindowText( "Inner " + t);
w = GetDlgItem( IDC_CHECKREF);
w->GetWindowText( t);
w->SetWindowText( "Inner " + t);
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
--- NEW FILE: ClosureSmart.h ---
#if !defined(AFX_CLOSURESMART_H__17980AEC_7C70_49EC_80A0_CF0733E7FF6E__INCLUDED_)
#define AFX_CLOSURESMART_H__17980AEC_7C70_49EC_80A0_CF0733E7FF6E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "resource.h"
// ClosureSmart.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CClosureSmart dialog
class CClosureSmart
: public CDialog
//: public CPropertyPage
{
// Construction
public:
CClosureSmart(CWnd* pParent = NULL); // standard constructor
bool m_disable;
// Dialog Data
//{{AFX_DATA(CClosureSmart)
enum { IDD = IDD_CLOSURESMARTCP };
BOOL m_bConns;
BOOL m_bRefs;
BOOL m_bSets;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CClosureSmart)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CClosureSmart)
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
protected:
CButton m_atomsAndModels;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CLOSURESMART_H__17980AEC_7C70_49EC_80A0_CF0733E7FF6E__INCLUDED_)
Index: ClosureDlg.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/ClosureDlg.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ClosureDlg.cpp 14 Jul 2004 19:30:15 -0000 1.3
--- ClosureDlg.cpp 27 Sep 2004 21:50:53 -0000 1.4
***************
*** 5,8 ****
--- 5,9 ----
#include "gme.h"
#include "ClosureDlg.h"
+ #include "ClosureKindSel.h"
#include <afxcmn.h>
***************
*** 18,21 ****
--- 19,23 ----
CClosureDlg::CClosureDlg(CWnd* pParent /*=NULL*/)
+ //: CPropertyPage(CClosureDlg::IDD)
: CDialog(CClosureDlg::IDD, pParent)
, m_activeFolderContainment( true)
***************
*** 38,41 ****
--- 40,45 ----
m_wrappingOption = -1;
m_libraryHandling = -1;
+ m_includeAllKindsRadio = -1;
+ m_bRefPortConnection = FALSE;
//}}AFX_DATA_INIT
}
***************
*** 46,52 ****
--- 50,63 ----
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CClosureDlg)
+ DDX_Control(pDX, IDC_FILTER, m_ctrlFilter);
+ DDX_Control(pDX, IDC_CHECKREFPORTCONNECTION, m_ctrlRefPortConnection);
+ DDX_Control(pDX, IDC_INCLUDEALL, m_ctrlIncludeAll);
+ DDX_Control(pDX, IDC_INCLUDESOME, m_ctrlIncludeSome);
DDX_Control(pDX, IDC_WRAPMINIPROJ, m_ctrlRadio1);
DDX_Control(pDX, IDC_WRAPAUTO, m_ctrlRadio2);
DDX_Control(pDX, IDC_WRAPASIS, m_ctrlRadio3);
+ DDX_Control(pDX, IDC_LIBR1, m_ctrlLibRadio1);
+ DDX_Control(pDX, IDC_LIBR2, m_ctrlLibRadio2);
+ DDX_Control(pDX, IDC_LIBR3, m_ctrlLibRadio3);
DDX_Control(pDX, IDC_CHECKPARTOFMODEL, m_ctrlPartOfModels);
DDX_Control(pDX, IDC_CHECKPARTOFFOLDERS, m_ctrlPartOfFolders);
***************
*** 72,75 ****
--- 83,88 ----
DDX_Radio(pDX, IDC_WRAPMINIPROJ, m_wrappingOption);
DDX_Radio(pDX, IDC_LIBR1, m_libraryHandling);
+ DDX_Radio(pDX, IDC_INCLUDEALL, m_includeAllKindsRadio);
+ DDX_Check(pDX, IDC_CHECKREFPORTCONNECTION, m_bRefPortConnection);
//}}AFX_DATA_MAP
}
***************
*** 83,86 ****
--- 96,108 ----
ON_BN_CLICKED(IDC_DIRECTIONUP, OnDirectionup)
ON_BN_CLICKED(IDC_DIRECTIONDN, OnDirectiondn)
+ ON_BN_CLICKED(IDC_CHECKCONNECTION, OnCheckconnection)
+ ON_BN_CLICKED(IDC_CHECKFOLDERCONTAINMENT, OnCheckfoldercontainment)
+ ON_BN_CLICKED(IDC_CHECKCONTAINMENT, OnCheckcontainment)
+ ON_BN_CLICKED(IDC_FILTER, OnFilter)
+ ON_BN_CLICKED(IDC_INCLUDESOME, OnIncludeSome)
+ ON_BN_CLICKED(IDC_INCLUDEALL, OnIncludeAll)
+ ON_BN_CLICKED(IDC_WRAPMINIPROJ, OnWrapMiniProj)
+ ON_BN_CLICKED(IDC_WRAPAUTO, OnWrapAuto)
+ ON_BN_CLICKED(IDC_WRAPASIS, OnWrapAsIs)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
***************
*** 97,100 ****
--- 119,129 ----
m_direction = 1; // downward
m_libraryHandling = 0; // stubs
+ m_includeAllKindsRadio = 0; // all kind preferred over the "some kinds" only
+ m_includeFolders = 1; // def values for the kind selector dialog
+ m_includeModels = 1;
+ m_includeAtoms = 1;
+ m_includeSets = 0;
+ m_includeReferences = 0;
+
// initially use the value of the activeFolderCntm since the direction is down
***************
*** 110,113 ****
--- 139,148 ----
m_ctrlBrowse.EnableWindow( m_outputOption);
+ m_ctrlIncludeAll.EnableWindow(m_bContainment || m_bFolderContainment);
+ m_ctrlIncludeSome.EnableWindow(m_bContainment || m_bFolderContainment);
+ m_ctrlFilter.EnableWindow( m_includeAllKindsRadio == 0?FALSE:TRUE);
+
+ m_ctrlRefPortConnection.EnableWindow( m_bConnection);
+
//m_bConnection = TRUE;
//m_bContainment = TRUE;
***************
*** 168,171 ****
--- 203,207 ----
void CClosureDlg::OnDirectionup()
{
+ UpdateData( TRUE);
// if the closure direction is up: the folder containment should be allowed
m_ctrlFolderContainment.EnableWindow( FALSE);
***************
*** 173,179 ****
m_ctrlPartOfFolders.EnableWindow( TRUE);
m_ctrlPartOfModels.EnableWindow( TRUE);
! m_ctrlRadio1.EnableWindow( FALSE);
m_ctrlRadio2.EnableWindow( FALSE);
m_ctrlRadio3.EnableWindow( FALSE);
}
--- 209,225 ----
m_ctrlPartOfFolders.EnableWindow( TRUE);
m_ctrlPartOfModels.EnableWindow( TRUE);
!
! m_wrappingOption = 0;
! m_ctrlRadio1.EnableWindow( TRUE);
m_ctrlRadio2.EnableWindow( FALSE);
m_ctrlRadio3.EnableWindow( FALSE);
+
+ m_ctrlIncludeAll.EnableWindow( FALSE);
+ m_ctrlIncludeSome.EnableWindow( FALSE);
+ m_ctrlFilter.EnableWindow( FALSE);
+
+ UpdateData( FALSE);
+
+ OnWrapMiniProj();
}
***************
*** 181,184 ****
--- 227,231 ----
void CClosureDlg::OnDirectiondn()
{
+ UpdateData( TRUE);
// if the closure direction is down: the folder containment should be set
// according to the variable which indicates if there is any folder involved
***************
*** 190,192 ****
--- 237,320 ----
m_ctrlRadio2.EnableWindow( TRUE);
m_ctrlRadio3.EnableWindow( TRUE);
+
+ m_ctrlIncludeAll.EnableWindow(m_bContainment || m_bFolderContainment);
+ m_ctrlIncludeSome.EnableWindow(m_bContainment || m_bFolderContainment);
+ m_ctrlFilter.EnableWindow( m_includeAllKindsRadio == 0?FALSE:TRUE);
+ }
+
+ void CClosureDlg::OnCheckconnection()
+ {
+ UpdateData( TRUE);
+
+ m_bRefPortConnection = m_bConnection?m_bRefPortConnection:FALSE;
+
+ m_ctrlRefPortConnection.EnableWindow( m_bConnection);
+
+ UpdateData( FALSE);
+ }
+
+ void CClosureDlg::OnCheckfoldercontainment()
+ {
+ OnCheckcontainment();
+
+ }
+
+ void CClosureDlg::OnCheckcontainment()
+ {
+ UpdateData( TRUE);
+
+ m_ctrlIncludeAll.EnableWindow(m_bContainment || m_bFolderContainment);
+ m_ctrlIncludeSome.EnableWindow(m_bContainment || m_bFolderContainment);
+ m_ctrlFilter.EnableWindow( m_includeAllKindsRadio == 0?FALSE:TRUE);
+ }
+
+ void CClosureDlg::OnFilter()
+ {
+ CClosureKindSel sel(
+ m_includeFolders
+ , m_includeModels
+ , m_includeAtoms
+ , m_includeSets
+ , m_includeReferences
+ , 0);
+
+ if( sel.DoModal() == IDOK)
+ {
+ m_includeFolders = sel.m_folder == TRUE;
+ m_includeModels = sel.m_model == TRUE;
+ m_includeAtoms = sel.m_atom == TRUE;
+ m_includeSets = sel.m_set == TRUE;
+ m_includeReferences = sel.m_ref == TRUE;
+ }
+ }
+
+ void CClosureDlg::OnIncludeAll()
+ {
+ m_ctrlFilter.EnableWindow( FALSE);
+ }
+
+ void CClosureDlg::OnIncludeSome()
+ {
+ m_ctrlFilter.EnableWindow( TRUE);
+ }
+
+
+ void CClosureDlg::OnWrapMiniProj()
+ {
+ UpdateData( TRUE);
+ m_ctrlLibRadio1.EnableWindow( m_wrappingOption != 0);
+ m_ctrlLibRadio2.EnableWindow( m_wrappingOption != 0);
+ m_ctrlLibRadio3.EnableWindow( TRUE);
+ if( m_wrappingOption == 0) m_libraryHandling = 2;
+ UpdateData( FALSE);
+ }
+
+ void CClosureDlg::OnWrapAuto()
+ {
+ OnWrapMiniProj();
+ }
+
+ void CClosureDlg::OnWrapAsIs()
+ {
+ OnWrapMiniProj();
}
Index: ClosureDlg.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/ClosureDlg.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ClosureDlg.h 14 Jul 2004 19:30:15 -0000 1.3
--- ClosureDlg.h 27 Sep 2004 21:50:53 -0000 1.4
***************
*** 12,16 ****
#include <afxcmn.h>
! class CClosureDlg : public CDialog
{
// Construction
--- 12,18 ----
#include <afxcmn.h>
! class CClosureDlg
! //: public CPropertyPage
! : public CDialog
{
// Construction
***************
*** 21,27 ****
--- 23,36 ----
//{{AFX_DATA(CClosureDlg)
enum { IDD = IDD_CLOSUREDLG };
+ CButton m_ctrlFilter;
+ CButton m_ctrlRefPortConnection;
+ CButton m_ctrlIncludeAll;
+ CButton m_ctrlIncludeSome;
CButton m_ctrlRadio1;
CButton m_ctrlRadio2;
CButton m_ctrlRadio3;
+ CButton m_ctrlLibRadio1;
+ CButton m_ctrlLibRadio2;
+ CButton m_ctrlLibRadio3;
CButton m_ctrlPartOfModels;
CButton m_ctrlPartOfFolders;
***************
*** 47,50 ****
--- 56,61 ----
int m_wrappingOption;
int m_libraryHandling;
+ int m_includeAllKindsRadio;
+ BOOL m_bRefPortConnection;
//}}AFX_DATA
***************
*** 69,72 ****
--- 80,92 ----
afx_msg void OnDirectionup();
afx_msg void OnDirectiondn();
+ afx_msg void OnCheckconnection();
+ afx_msg void OnCheckfoldercontainment();
+ afx_msg void OnCheckcontainment();
+ afx_msg void OnFilter();
+ afx_msg void OnIncludeSome();
+ afx_msg void OnIncludeAll();
+ afx_msg void OnWrapMiniProj();
+ afx_msg void OnWrapAuto();
+ afx_msg void OnWrapAsIs();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
***************
*** 77,80 ****
--- 97,106 ----
// is allowed if this value is true and the closuredirection is "Down"
bool m_activeFolderContainment;
+
+ bool m_includeFolders;
+ bool m_includeModels;
+ bool m_includeAtoms;
+ bool m_includeSets;
+ bool m_includeReferences;
};
Index: MakeClosure.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MakeClosure.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** MakeClosure.cpp 11 Aug 2004 17:00:56 -0000 1.8
--- MakeClosure.cpp 27 Sep 2004 21:50:53 -0000 1.9
***************
*** 178,201 ****
processFolders();
processFCOs();
!
! // wrapping needed
! if ( m_iContainerOption == 0) // miniproject wrapping
! {
! selectTop();
! totalWrap();
! clearTopObjs(); // no need for the top objects, this is a sign to dump from the RootFolder
!
! }
! else if ( m_iContainerOption == 1) // automatic wrapping
! {
! selectTop();
! autoWrap(); // resets the Top top values
! checkMeta();
! }
! else if ( m_iContainerOption == 2) // as is, no wrapping
! {
! selectTop();
! checkMeta();
! }
}
else // up -> so first process the fcos
--- 178,183 ----
processFolders();
processFCOs();
! postValidateSelection();
! postProcess();
}
else // up -> so first process the fcos
***************
*** 203,206 ****
--- 185,221 ----
processFCOs();
processFolders();
+ postValidateSelection();
+ }
+ }
+
+ void CMakeClosure::postProcess()
+ {
+ // wrapping needed
+ if ( m_iContainerOption == 0) // miniproject wrapping
+ {
+ selectTop();
+ totalWrap();
+ clearTopObjs(); // no need for the top objects, this is a sign to dump from the RootFolder
+
+ send2Console("[Closure Copy] The miniproject can be either Imported or Pasted in a new/existing project.");
+ }
+ else if ( m_iContainerOption == 1) // automatic wrapping
+ {
+ selectTop();
+ autoWrap(); // resets the Top top values
+ checkMeta( m_topFolds, m_topFcos);
+
+ string res_str;
+ getAccKindsInString( res_str);
+ if( !res_str.empty()) send2Console( "[Closure Copy] The following kinds may accept the copied data: " + res_str + ".");
+ }
+ else if ( m_iContainerOption == 2) // as is, no wrapping
+ {
+ selectTop();
+ checkMeta( m_topFolds, m_topFcos);
+
+ string res_str;
+ getAccKindsInString( res_str);
+ if( !res_str.empty()) send2Console( "[Closure Copy] The following kinds may accept the copied data: " + res_str + ".");
}
}
***************
*** 415,431 ****
}
bool CMakeClosure::isValidConnection( IMgaConnection * connection)
{
bool res = true;
! if( m_iIntoLibraries == LIB_STOP)
{
! CComObjPtrVector<IMgaConnPoint> v;
! COMTHROW( connection->get_ConnPoints( PutOut( v)) );
! for( CComObjPtrVector<IMgaConnPoint>::iterator i = v.begin(); res && i != v.end(); ++i)
{
- CComObjPtr<IMgaConnPoint> connpoint = *i;
-
CComObjPtr<IMgaFCO> target; // the src or dst of a connection
COMTHROW( connpoint->get_Target( PutOut( target)) );
--- 430,514 ----
}
+ /*static*/ CComPtr<IGMEOLEApp> CMakeClosure::get_GME(CComObjPtr<IMgaProject> project)
+ {
+ CComPtr<IGMEOLEApp> gme;
+ if (/*mb_is_interactive &&*/ (project != NULL)) {
+ CComBSTR bstrName("GME.Application");
+ CComPtr<IMgaClient> pClient;
+ HRESULT hr = project->GetClientByName(bstrName, &pClient);
+ if (SUCCEEDED(hr) && pClient) {
+ CComPtr<IDispatch> pDispatch;
+ hr = pClient->get_OLEServer(&pDispatch);
+ if (SUCCEEDED(hr) && pDispatch) {
+ hr = pDispatch.QueryInterface(&gme);
+ if (FAILED(hr)) {
+ gme = NULL;
+ }
+ }
+ }
+ }
+ return gme;
+ }
+
+ bool CMakeClosure::isSimpleConnection( IMgaConnection * connection)
+ {
+ bool res = true;
+ CComObjPtrVector<IMgaConnPoint> v;
+ COMTHROW( connection->get_ConnPoints( PutOut( v)) );
+
+ for( CComObjPtrVector<IMgaConnPoint>::iterator i = v.begin(); res && i != v.end(); ++i)
+ {
+ CComObjPtr<IMgaConnPoint> connpoint = *i;
+
+ CComObjPtrVector<IMgaFCO> refs;
+ COMTHROW( connpoint->get_References(PutOut( refs)) );
+ if( !refs.empty()) // it is a connection thru reference ports
+ res = false;
+ }
+
+ return res;
+ }
+
+
bool CMakeClosure::isValidConnection( IMgaConnection * connection)
{
bool res = true;
! CComObjPtrVector<IMgaConnPoint> v;
! COMTHROW( connection->get_ConnPoints( PutOut( v)) );
!
! for( CComObjPtrVector<IMgaConnPoint>::iterator i = v.begin(); res && i != v.end(); ++i)
{
! CComObjPtr<IMgaConnPoint> connpoint = *i;
!
! // general constraints (which apply for each case: LIB_*
! CComObjPtrVector<IMgaFCO> refs;
! COMTHROW( connpoint->get_References(PutOut( refs)) );
! for( CComObjPtrVector<IMgaFCO>::iterator ref_i = refs.begin(); res && ref_i != refs.end(); ++ref_i )
! {
! if( !m_bRefPortConnection)
! {
! res = false;//this is a connection between at least one reference port, so if the corresponding option is not set (m_bRefPortConnection) then we consider it invalid
!
! if( m_GME)
! {
! CComBSTR bstr, id, nm;
! COMTHROW( connection->get_ID( &id));
! COMTHROW( connection->get_Name( &nm));
! bstr.Append("Closure: <A HREF=\"mga:");
! bstr.AppendBSTR( id);
! bstr.Append("\">");
! bstr.AppendBSTR( nm);
! bstr.Append("</A> disregarded. Connection involving reference ports. Use the \"Connection thru refport\" option to include it.");
! COMTHROW(m_GME->ConsoleMessage(bstr, MSG_ERROR));
! }
!
! }
! }
!
! // constraints for lib_stop case
! if( m_iIntoLibraries == LIB_STOP)
{
CComObjPtr<IMgaFCO> target; // the src or dst of a connection
COMTHROW( connpoint->get_Target( PutOut( target)) );
***************
*** 438,446 ****
}
void CMakeClosure::procConnection( IMgaConnection *connection)
{
ASSERT( connection != NULL );
! if ( m_bConnection && isValidConnection( connection))
{
CComObjPtrVector<IMgaConnPoint> v;
--- 521,546 ----
}
+ bool CMakeClosure::postValidateSelection()
+ {
+ // check each object for validity...
+ return true;
+ }
+
+ bool CMakeClosure::postValidateFCO( IMgaFCO * fco)
+ {
+ return true;
+ }
+
+ bool CMakeClosure::postValidateConnection( IMgaConnection * connection)
+ {
+ return true;
+ }
+
void CMakeClosure::procConnection( IMgaConnection *connection)
{
ASSERT( connection != NULL );
! bool simple = isSimpleConnection( connection);
! if ( simple && m_bConnection || !simple && m_bRefPortConnection)
{
CComObjPtrVector<IMgaConnPoint> v;
***************
*** 455,458 ****
--- 555,560 ----
}
+ // if called from procConnection then the validity is checked
+ // if called from procMyConnections then it is checked as well
void CMakeClosure::procConnPoint( IMgaConnPoint *connpoint)
{
***************
*** 464,467 ****
--- 566,570 ----
CComObjPtr<IMgaConnection> conn; // the connection itself
COMTHROW( connpoint->get_Owner( PutOut( conn)) );
+
CComObjPtr<IMgaFCO> conn_fco;
COMTHROW( conn.QueryInterface( conn_fco));
***************
*** 470,495 ****
COMTHROW( connpoint->get_References( PutOut( refs)) );
! if( isValidConnection( conn))
{
! if ( refs.empty()) // simple connection, no reference ports involved
{
- insertNew( target);
insertNew( conn_fco);
! }
! else if ( m_bReferredBy) // because the internal representation of the connections through refports
! {
! bool inlib;
! inlib = isInLibrary( target);
! if ( inlib && m_iIntoLibraries == LIB_CONT || !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_iIntoLibraries == LIB_CONT || !inlib)
! {
! insertNew( conn_fco);
! insertNew( refs);
! }
}
}
-
}
--- 573,594 ----
COMTHROW( connpoint->get_References( PutOut( refs)) );
! if ( refs.empty()) // simple connection, no reference ports involved
{
! insertNew( target);
! insertNew( conn_fco);
! }
! else // refport conn, so insert everything
! {
! bool inlib;
! inlib = isInLibrary( target);
! if ( inlib && m_iIntoLibraries == LIB_CONT || !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_iIntoLibraries == LIB_CONT || !inlib)
{
insertNew( conn_fco);
! insertNew( refs);
}
}
}
***************
*** 497,501 ****
void CMakeClosure::procMyConnections( IMgaFCO * fco)
{
! if ( m_bConnection)
{
CComObjPtrVector<IMgaConnPoint> my_conns;
--- 596,600 ----
void CMakeClosure::procMyConnections( IMgaFCO * fco)
{
! if ( m_bConnection || m_bRefPortConnection)
{
CComObjPtrVector<IMgaConnPoint> my_conns;
***************
*** 503,507 ****
for( CComObjPtrVector<IMgaConnPoint>::iterator i = my_conns.begin(); i != my_conns.end(); ++i)
{
! procConnPoint( *i);//the validity of each connection is tested
}
}
--- 602,610 ----
for( CComObjPtrVector<IMgaConnPoint>::iterator i = my_conns.begin(); i != my_conns.end(); ++i)
{
! CComObjPtr<IMgaConnection> conn; // the connection itself
! COMTHROW( (*i)->get_Owner( PutOut( conn)) );
! bool simple = isSimpleConnection( conn);
! if( simple && m_bConnection || !simple && m_bRefPortConnection)
! procConnPoint( *i);//the validity of each connection is tested
}
}
***************
*** 959,962 ****
--- 1062,1068 ----
void CMakeClosure::autoWrap()
{
+ if( m_topFcos.empty() && m_topFolds.empty()) // no top objects == root folder selected
+ return;
+
CComObjPtrVector<IMgaFolder> f_parents;
CComObjPtrVector<IMgaModel> m_parents;
***************
*** 1202,1208 ****
}
! void CMakeClosure::checkMeta()
{
! if ( m_topFcos.empty() && m_topFolds.empty()) return;
//
--- 1308,1318 ----
}
! void CMakeClosure::checkMeta( const CComObjPtrVector<IMgaFolder>& p_folds, const CComObjPtrVector<IMgaFCO>& p_fcos)
{
! if ( p_folds.empty() && p_fcos.empty())
! {
! m_acceptingKindsAndFolders.push_back( rootfolder_str);
! return;
! }
//
***************
*** 1211,1215 ****
set < string > goody_folds;
bool goody_folds_init_done = false;
! for( CComObjPtrVector<IMgaFolder>::iterator fold_it = m_topFolds.begin(); fold_it != m_topFolds.end(); ++fold_it)
{
// obtaining its meta
--- 1321,1325 ----
set < string > goody_folds;
bool goody_folds_init_done = false;
! for( CComObjPtrVector<IMgaFolder>::const_iterator fold_it = p_folds.begin(); fold_it != p_folds.end(); ++fold_it)
{
// obtaining its meta
***************
*** 1256,1260 ****
}
! for( CComObjPtrVector<IMgaFCO>::iterator kind_it = m_topFcos.begin(); kind_it != m_topFcos.end(); ++kind_it)
{
// obtaining its meta
--- 1366,1370 ----
}
! for( CComObjPtrVector<IMgaFCO>::const_iterator kind_it = p_fcos.begin(); kind_it != p_fcos.end(); ++kind_it)
{
// obtaining its meta
***************
*** 1298,1302 ****
else // there are some libraries as top folders, the only possible target to paste in is the roofolder
{
! if( m_topFolds.size() == how_many_libraries || // there are no other folders OR
goody_folds.end() != goody_folds.find( rootfolder_str)) // the RootFolder is a good target for the regular folders and kinds
m_acceptingKindsAndFolders.push_back( rootfolder_str);
--- 1408,1412 ----
else // there are some libraries as top folders, the only possible target to paste in is the roofolder
{
! if( p_folds.size() == how_many_libraries || // there are no other folders OR
goody_folds.end() != goody_folds.find( rootfolder_str)) // the RootFolder is a good target for the regular folders and kinds
m_acceptingKindsAndFolders.push_back( rootfolder_str);
***************
*** 1307,1317 ****
// looking for potential model containers
! if ( m_topFolds.empty()) // if folds needed to be inserted then models positively are not possible containers
{
// will store the intersection of accepting models
set < string > goody_models;
bool goody_models_init_done = false;
! CComObjPtrVector<IMgaFCO>::iterator fco_it = m_topFcos.begin();
! for( ; fco_it != m_topFcos.end(); ++fco_it)
{
// will store the names of those models which may contain this kind (*fco_it)
--- 1417,1427 ----
// looking for potential model containers
! if ( p_folds.empty()) // if folds needed to be inserted then models positively are not possible containers
{
// will store the intersection of accepting models
set < string > goody_models;
bool goody_models_init_done = false;
! CComObjPtrVector<IMgaFCO>::const_iterator fco_it = p_fcos.begin();
! for( ; fco_it != p_fcos.end(); ++fco_it)
{
// will store the names of those models which may contain this kind (*fco_it)
***************
*** 1358,1362 ****
--- 1468,1474 ----
// these models may contain all objects ( topFCOs only since topFolders is empty)
for( set < string > :: iterator gid = goody_models.begin(); gid != goody_models.end(); ++gid)
+ {
m_acceptingKindsAndFolders.push_back( *gid);
+ }
}
}
***************
*** 1373,1376 ****
--- 1485,1489 ----
COMTHROW( m_project->BeginTransaction(m_territory, TRANSACTION_READ_ONLY) );
+ m_GME = get_GME(m_project);
// put the objects into the new territory
***************
*** 1476,1477 ****
--- 1589,1807 ----
}
+ bool CMakeClosure::isAnyAccepting() const
+ {
+ return m_acceptingKindsAndFolders.size() > 0;
+ }
+
+ void CMakeClosure::getAccKindsInString( string& p_resStr) const
+ {
+ unsigned int i = 0;
+ for( i = 0; i < m_acceptingKindsAndFolders.size(); ++i)
+ {
+ if(i) p_resStr += " ";
+
+ p_resStr += m_acceptingKindsAndFolders[i];
+ }
+ }
+
+ const vector< string >& CMakeClosure::getAccKindsVector() const
+ {
+ return m_acceptingKindsAndFolders;
+ }
+
+ void CMakeClosure::send2Console( const string& msg)
+ {
+ CComBSTR bstr( msg.c_str());
+ if( m_GME) m_GME->ConsoleMessage( bstr, MSG_INFO);
+ else ASSERT(0);// m_GME is not valid
+ }
+
+ //---------------------------------------------------------------------------
+ // C L A S S CKindSelectClosure
+ //---------------------------------------------------------------------------
+ bool CKindSelectClosure::isValidSelection()
+ {
+ m_peculiarFcos.clear(); // reset to prevent some data left in it
+ m_iniSelPath = ""; // not used currently in this class, only for the container
+ m_accKind = "";
+
+ checkMeta( m_selFolds, m_selFcos);// works based on the initially selected objects
+
+ getAccKindsInString( m_accKind);
+
+ return true;
+ }
+
+ void CKindSelectClosure::procObj( IMgaObject* obj)
+ {
+ ASSERT( obj != NULL );
+ //!m_bIntoLibraries <=> m_iIntoLibraries != 2
+ if ( m_iIntoLibraries != LIB_CONT && isInLibrary( obj)) // if no intention to step into libraries and the object is in a library then return
+ return;
+
+ objtype_enum objtype;
+ COMTHROW( obj->get_ObjType( &objtype) );
+
+ switch( objtype)
+ {
+ case OBJTYPE_FOLDER:
+ {
+ if ( m_bFolderContainment)
+ {
+ CComObjPtr<IMgaFolder> f;
+ COMTHROW( ::QueryInterface( obj, f) );
+ procFolder( f);
+ }
+ break;
+ }
+
+ case OBJTYPE_MODEL:
+ {
+ if ( m_bContainment)
+ {
+ CComObjPtr<IMgaModel> m;
+ COMTHROW( ::QueryInterface( obj, m) );
+
+ procModel( m);
+ }
+ break;
+ }
+
+ case OBJTYPE_REFERENCE:
+ {
+ if ( m_bRefs)
+ {
+ CComObjPtr<IMgaFCO> fco;
+ COMTHROW( ::QueryInterface( obj, fco) );
+ m_peculiarFcos.push_back( fco);
+ }
+ break;
+ }
+
+ case OBJTYPE_CONNECTION:
+ {
+ if ( m_bConns)
+ {
+ CComObjPtr<IMgaFCO> fco;
+ COMTHROW( ::QueryInterface( obj, fco) );
+ m_peculiarFcos.push_back( fco);
+ }
+ break;
+ }
+
+ case OBJTYPE_SET:
+ {
+ if ( m_bSets)
+ {
+ CComObjPtr<IMgaFCO> fco;
+ COMTHROW( ::QueryInterface( obj, fco) );
+ m_peculiarFcos.push_back( fco);
+ }
+ break;
+ }
+
+ default: { }
+ };
+ }
+
+ bool CKindSelectClosure::postValidateSelection()
+ {
+ return true;
+ }
+
+ void CKindSelectClosure::postProcess()
+ {
+ // acc kinds already calculated in isValidSelection()
+ // shows the acc kinds in the console window
+ send2Console( "[Smart Copy] The following kinds may accept the copied data: " + m_accKind + ".");
+
+ sort( m_peculiarFcos.begin(), m_peculiarFcos.end(), ConnsLast());
+
+ m_selFcos = m_topFcos = m_peculiarFcos;
+ ASSERT( m_peculiarFolds.size() == 0);
+ //m_selFolds = m_topFolds = m_peculiarFolds;
+
+ }
+
+ //---------------------------------------------------------------------------
+ // C L A S S CContainerSelectSomeKindClosure
+ //---------------------------------------------------------------------------
+ bool CContainerSelectSomeKindClosure::isValidSelection()
+ {
+ m_peculiarFcos.clear(); // reset to prevent some data left in it
+ m_iniSelPath = "";
+
+ CComBstrObj kind_name;
+ ASSERT( m_selFcos.size() + m_selFolds.size() == 1);
+ if( m_selFcos.size() + m_selFolds.size() != 1) return false;
+
+ for( unsigned int i = 0; i < m_selFcos.size(); ++i)
+ {
+ CComBSTR path;
+ COMTHROW( m_selFcos[i]->get_AbsPath( &path));
+ CopyTo( path, m_iniSelPath);
+
+ CComObjPtr<IMgaMetaFCO> k_meta;
+ COMTHROW( m_selFcos[i]->get_Meta( PutOut( k_meta)));
+ COMTHROW( k_meta->get_Name( PutOut(kind_name)) );
+
+ ASSERT( i == 0);
+ }
+
+ if( i == 0)
+ for( unsigned int j = 0; j < m_selFolds.size(); ++j)
+ {
+ CComBSTR path;
+ COMTHROW( m_selFolds[j]->get_AbsPath( &path));
+ CopyTo( path, m_iniSelPath);
+
+ CComObjPtr<IMgaMetaFolder> f_meta;
+ COMTHROW( m_selFolds[j]->get_MetaFolder( PutOut( f_meta)));
+ COMTHROW( f_meta->get_Name( PutOut(kind_name)) );
+
+ ASSERT( j == 0);
+ }
+
+ CopyTo( kind_name, m_accKind);// the acc kind is intended to be similar to the one and only container's kind
+
+ return true;
+ }
+
+ void CContainerSelectSomeKindClosure::postProcess()
+ {
+ // m_accKind already calculated in isValidSelection()
+ if( m_peculiarFcos.size() > 0)
+ send2Console( "[Smart Copy] The following container may accept the copied data: " + m_accKind + ".");
+ else
+ send2Console( "[Smart Copy] The container does not contain the kinds specified. No data copied.");
+
+ sort( m_peculiarFcos.begin(), m_peculiarFcos.end(), ConnsLast());
+
+ m_selFcos = m_topFcos = m_peculiarFcos;
+ ASSERT( m_peculiarFolds.size() == 0);
+ }
+
+ bool ConnsLast::operator()( const CComObjPtr<IMgaFCO>& p1, const CComObjPtr<IMgaFCO>& p2) const
+ {
+ // used for sort. 1st rule: Connections will be put in the back of the vector
+ // 2nd rule: if the two elements are both connections or none of them is connection then sort on ID
+ // returns true if p1 precedes p2
+
+ objtype_enum objtype1, objtype2;
+ COMTHROW( p1->get_ObjType( &objtype1));
+ COMTHROW( p2->get_ObjType( &objtype2));
+ bool c1 = objtype1 == OBJTYPE_CONNECTION;
+ bool c2 = objtype2 == OBJTYPE_CONNECTION;
+ if( c1 && c2 || !c1 && !c2)
+ {
+ //return true;// the predicate must be a strict weak ordering, so let's compare the IDs
+ CComBstrObj bstr1, bstr2;
+ COMTHROW( p1->get_ID( PutOut( bstr1)));
+ COMTHROW( p2->get_ID( PutOut( bstr2)));
+ return bstr1.Compare( bstr2) < 0;
+ }
+ else if( c2) // && !c1
+ return true;
+ else // c1
+ return false;
+ }
Index: MakeClosure.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MakeClosure.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MakeClosure.h 3 Aug 2004 21:20:12 -0000 1.4
--- MakeClosure.h 27 Sep 2004 21:50:53 -0000 1.5
***************
*** 34,38 ****
IMgaFCOs *fcos, IMgaFolders *fols,
int ref = 1, int refd = 1,
! int conn = 1,
int set_mem = 1, int mem_of_set = 1,
int cont = 1, int part_of_mod = 1,
--- 34,38 ----
IMgaFCOs *fcos, IMgaFolders *fols,
int ref = 1, int refd = 1,
! int conn = 1, int refport_conn = 1,
int set_mem = 1, int mem_of_set = 1,
int cont = 1, int part_of_mod = 1,
***************
*** 41,49 ****
int into_libr = LIB_STUBS,
int container_opt = 0,
! int direction_opt = 1
)
: m_bRefersTo( ref == 1)
, m_bReferredBy( refd == 1)
, m_bConnection( conn == 1)
, m_bSetMember( set_mem == 1)
, m_bMemberOfSets( mem_of_set == 1)
--- 41,51 ----
int into_libr = LIB_STUBS,
int container_opt = 0,
! int direction_opt = 1,
! int all_kinds = -1
)
: m_bRefersTo( ref == 1)
, m_bReferredBy( refd == 1)
, m_bConnection( conn == 1)
+ , m_bRefPortConnection( refport_conn == 1)
, m_bSetMember( set_mem == 1)
, m_bMemberOfSets( mem_of_set == 1)
***************
*** 57,60 ****
--- 59,63 ----
, m_iContainerOption( container_opt)
, m_bDirection( direction_opt == 1)
+ , m_kindFilter( all_kinds)
{
if ( fcos) CopyTo( fcos, m_selFcos);
***************
*** 67,71 ****
}
! ~CMakeClosure()
{
m_selFolds.clear();
--- 70,74 ----
}
! virtual ~CMakeClosure()
{
m_selFolds.clear();
***************
*** 75,79 ****
m_topFolds.clear();
m_topFcos.clear();
-
m_acceptingKindsAndFolders.clear();
}
--- 78,81 ----
***************
*** 88,97 ****
void getTopFolders( IMgaFolders **res_folds);
! vector< string > m_acceptingKindsAndFolders; // the meta names of those kinds which the closure may be inserted into
protected:
! void initTrans(); // transaction
void doneTrans( bool abort);
void doClosure();
--- 90,105 ----
void getTopFolders( IMgaFolders **res_folds);
! bool isAnyAccepting() const;
! void getAccKindsInString( string& p_resStr) const;
! const vector< string >& getAccKindsVector() const;
!
! void send2Console( const string& msg);
protected:
! void initTrans(); // transaction
void doneTrans( bool abort);
+ static CComPtr<IGMEOLEApp> get_GME(CComObjPtr<IMgaProject> project);
+
void doClosure();
***************
*** 99,102 ****
--- 107,111 ----
void processFCOs();
+ virtual void postProcess();
void selectTop();
void totalWrap();
***************
*** 104,110 ****
string processUpward(IMgaObject *obj, CComObjPtrVector<IMgaFolder>& f_parents, CComObjPtrVector<IMgaModel>& m_parents);
! void checkMeta();
! void procObj( IMgaObject* obj);
void procFolder( IMgaFolder *folder);
--- 113,120 ----
string processUpward(IMgaObject *obj, CComObjPtrVector<IMgaFolder>& f_parents, CComObjPtrVector<IMgaModel>& m_parents);
! void checkMeta( const CComObjPtrVector<IMgaFolder>& p_folds, const CComObjPtrVector<IMgaFCO>& p_fcos);
! vector< string > m_acceptingKindsAndFolders; // the meta names of those kinds which the closure may be inserted into
! virtual void procObj( IMgaObject* obj);
void procFolder( IMgaFolder *folder);
***************
*** 126,134 ****
void procMyDerivedTypes ( IMgaFCO * fco);
! bool isValidSelection();
! bool isValidFCO( IMgaFCO *fco);
! bool isValidConnection( IMgaConnection * connection);
bool isInLibrary( IMgaObject * obj);
bool findAmongSelected( const CComObjPtr<IMgaFCO>& in);
bool findAmongSelected( const CComObjPtr<IMgaFolder>& in);
--- 136,149 ----
void procMyDerivedTypes ( IMgaFCO * fco);
! bool isSimpleConnection( IMgaConnection * connection);
! virtual bool isValidSelection();
! virtual bool isValidFCO( IMgaFCO *fco);
! virtual bool isValidConnection( IMgaConnection * connection);
bool isInLibrary( IMgaObject * obj);
+ virtual bool postValidateSelection();
+ virtual bool postValidateFCO( IMgaFCO *fco);
+ virtual bool postValidateConnection( IMgaConnection * connection);
+
bool findAmongSelected( const CComObjPtr<IMgaFCO>& in);
bool findAmongSelected( const CComObjPtr<IMgaFolder>& in);
***************
*** 158,162 ****
while( i != e )
{
! insertNew( *i);
++i;
--- 173,199 ----
while( i != e )
{
! if( m_kindFilter == -1)
! insertNew( *i);
! else
! {
! CComObjPtr<element_type> elem( *i);
! CComObjPtr<IMgaFolder> f;
! CComObjPtr<IMgaModel> m;
! CComObjPtr<IMgaAtom> a;
! CComObjPtr<IMgaSet> s;
! CComObjPtr<IMgaReference> r;
! ::QueryInterface( elem, f);
! ::QueryInterface( elem, m);
! ::QueryInterface( elem, a);
! ::QueryInterface( elem, s);
! ::QueryInterface( elem, r);
!
! if( f && ( m_kindFilter & 0x1)
! || m && ( m_kindFilter & 0x2)
! || a && ( m_kindFilter & 0x4)
! || s && ( m_kindFilter & 0x8)
! || r && ( m_kindFilter & 0x10))
! insertNew( *i);
! }
++i;
***************
*** 165,168 ****
--- 202,207 ----
protected: // variables
+ CComPtr<IGMEOLEApp> m_GME; // to access the console
+
CComObjPtr<IMgaProject> m_project;
CComObjPtr<IMgaTerritory> m_territory;
***************
*** 183,186 ****
--- 222,226 ----
bool m_bConnection; // fcos on the other end of a connection and the connections themselves
+ bool m_bRefPortConnection; // special connections: thru reference ports
bool m_bSetMember; // members of a set
***************
*** 198,206 ****
int m_iIntoLibraries; // 0 stubs, 1 stop, 2 continue process through links that point into a library?
! int m_iContainerOption; // wrap?
bool m_bDirection; // up or down?
};
--- 238,338 ----
int m_iIntoLibraries; // 0 stubs, 1 stop, 2 continue process through links that point into a library?
! int m_iContainerOption; // wrap? 0: miniproj, 1: auto, 2: asis,
bool m_bDirection; // up or down?
+ int m_kindFilter; // if -1 then all kinds, otherwise bitmasking needed to calc which kinds are considered from the children
+ };
+
+ class CKindSelectClosure : public CMakeClosure
+ {
+ public:
+ CKindSelectClosure
+ ( IMgaFCOs *fcos
+ , IMgaFolders *fols
+ , int refs = 1
+ , int conns = 1
+ , int sets = 1
+ )
+ : CMakeClosure
+ ( fcos
+ , fols
+ , 0 //ref
+ , 0 //refd
+ , 0 //conn
+ , 0 //refportconn
+ , 0 //set_mem
+ , 0 //mem_of_set
+ , 1 //cont
+ , 0 //part_of_mod
+ , 1 //fold_cont
+ , 0 //part_of_fold
+ , 0 //base_type
+ , 0 //derived_type
+ , LIB_STUBS //into_libr
+ , 3 //container_opt( 3)
+ , 1 //direction_opt
+ , -1 //all kinds
+ )
+ , m_bRefs( refs == 1)
+ , m_bConns( conns == 1)
+ , m_bSets( sets == 1)
+ , m_peculiarFolds()
+ , m_peculiarFcos()
+ { }
+
+ ~CKindSelectClosure()
+ {
+ m_peculiarFolds.clear();
+ m_peculiarFcos.clear();
+ }
+
+ /*void getSpecFCOs( IMgaFCOs **spec_fcos);
+ void getSpecFolders( IMgaFolders **spec_folds);*/
+ /*virtual*/ void procObj( IMgaObject* obj);
+ /*virtual*/ bool isValidSelection();
+ /*virtual*/ bool postValidateSelection();
+ /*virtual*/ void postProcess();
+ string m_iniSelPath;
+ string m_accKind; // to store the special container kind the closure has been initiated from
+ protected:
+ bool m_bRefs;
+ bool m_bConns;
+ bool m_bSets;
+
+ CComObjPtrVector<IMgaFolder> m_peculiarFolds;
+ CComObjPtrVector<IMgaFCO> m_peculiarFcos;
+ };
+
+
+ class CContainerSelectSomeKindClosure : public CKindSelectClosure
+ {
+ public:
+ CContainerSelectSomeKindClosure
+ ( IMgaFCOs *fcos
+ , IMgaFolders *fols
+ , int refs = 1
+ , int conns = 1
+ , int sets = 1
+ )
+ : CKindSelectClosure
+ ( fcos
+ , fols
+ , refs
+ , conns
+ , sets
+ )
+ { }
+
+ /*virtual*/ bool isValidSelection();
+ /*virtual*/ void postProcess();
+ protected:
+
+ };
+
+ struct ConnsLast
+ {
+ bool operator()( const CComObjPtr<IMgaFCO>& p1, const CComObjPtr<IMgaFCO>& p2) const;
};
Index: MgaClosure.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MgaClosure.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MgaClosure.cpp 23 Jul 2004 18:56:51 -0000 1.3
--- MgaClosure.cpp 27 Sep 2004 21:50:53 -0000 1.4
***************
*** 4,7 ****
--- 4,9 ----
#include "ClosureDlg.h"
#include "ClosureRes.h"
+ #include "ClosureSmart.h"
+ #include "ClosureSpecDlg.h"
#include "MakeClosure.h"
***************
*** 11,15 ****
IMgaFCOs **sel_fcos, IMgaFolders **sel_folders,
IMgaFCOs **top_fcos, IMgaFolders **top_folders,
! int fc, long * pOptions)
{
AFX_MANAGE_STATE( AfxGetStaticModuleState());
--- 13,20 ----
IMgaFCOs **sel_fcos, IMgaFolders **sel_folders,
IMgaFCOs **top_fcos, IMgaFolders **top_folders,
! int fc,
! long *pOptions,
! BSTR *pAcceptingKinds
! )
{
AFX_MANAGE_STATE( AfxGetStaticModuleState());
***************
*** 21,28 ****
if ( dlg.DoModal() == IDOK)
{
CMakeClosure mc(
in_fcos, in_folders,
dlg.m_bRefersTo, dlg.m_bReferredBy,
! dlg.m_bConnection,
dlg.m_bSetMember, dlg.m_bMemberOfSets,
// compare the containment options with the direction option
--- 26,44 ----
if ( dlg.DoModal() == IDOK)
{
+ int kind_map = 0;//important to set it to 0
+ if( dlg.m_includeAllKindsRadio == 0)
+ kind_map = -1;//0xffffffff;
+ else
+ kind_map = kind_map
+ | (dlg.m_includeFolders?0x1:0)
+ | (dlg.m_includeModels?0x2:0)
+ | (dlg.m_includeAtoms?0x4:0)
+ | (dlg.m_includeSets?0x8:0)
+ | (dlg.m_includeReferences?0x10:0);
+
CMakeClosure mc(
in_fcos, in_folders,
dlg.m_bRefersTo, dlg.m_bReferredBy,
! dlg.m_bConnection, dlg.m_bRefPortConnection,
dlg.m_bSetMember, dlg.m_bMemberOfSets,
// compare the containment options with the direction option
***************
*** 33,37 ****
dlg.m_libraryHandling /*== 2*/, // in case of "continue" ("go on") only
dlg.m_wrappingOption,
! dlg.m_direction);
mc.process(); // do the hard job
--- 49,54 ----
dlg.m_libraryHandling /*== 2*/, // in case of "continue" ("go on") only
dlg.m_wrappingOption,
! dlg.m_direction,
! kind_map);
mc.process(); // do the hard job
***************
*** 50,60 ****
! if ( normal_tops && // avoid in case of non-normal tops
! dlg.m_wrappingOption > 0 && // avoid in case of miniproject
! mc.m_acceptingKindsAndFolders.size() > 0 ) // avoid if is no accepting kind/folder
{
! CClosureRes resdlg;
! resdlg.m_metaKindsAndFolders = mc.m_acceptingKindsAndFolders;
! resdlg.DoModal();
}
--- 67,87 ----
! if( normal_tops && // avoid in case of non-normal tops
! dlg.m_wrappingOption > 0 && // avoid in case of miniproject
! mc.isAnyAccepting()) // avoid if is no accepting kind/folder
{
! string res_str;
! //CClosureRes res_dlg;
!
! //res_dlg.m_metaKindsAndFolders = mc.getAccKindsVector();
! mc.getAccKindsInString( res_str);
!
! // shows the acc kinds in a dialog
! //res_dlg.DoModal();
! // shows the acc kinds in the console window
! //mc.send2Console( "[Closure] The following kinds may accept the closure:" + res_str + ".");
!
! CComBSTR acc_kind = res_str.c_str();
! *pAcceptingKinds = acc_kind.Detach();
}
***************
*** 77,82 ****
case 2:
{
if ( normal_tops)
! COMTHROW( dumper->DumpClosR( *sel_fcos, *sel_folders, PutInBstr( dlg.m_strOutputFile), *top_fcos, *top_folders, *pOptions) );
else
// dump like in miniproject case from The RootFolder
--- 104,110 ----
case 2:
{
+ BSTR p;
if ( normal_tops)
! COMTHROW( dumper->DumpClosR( *sel_fcos, *sel_folders, PutInBstr( dlg.m_strOutputFile), *top_fcos, *top_folders, *pOptions, p,p) );
else
// dump like in miniproject case from The RootFolder
***************
*** 96,99 ****
--- 124,211 ----
// else: clipboard
}
+ return S_OK;
+ }
+
+ STDMETHODIMP CMgaClosure::SmartCopy(
+ IMgaFCOs *in_fcos, IMgaFolders *in_folders,
+ IMgaFCOs **sel_fcos, IMgaFolders **sel_folders,
+ IMgaFCOs **top_fcos, IMgaFolders **top_folders,
+ int options_in,
+ long *pOptions,
+ BSTR *accept,
+ BSTR *path
+ )
+ {
+ AFX_MANAGE_STATE( AfxGetStaticModuleState());
+ ASSERT( pOptions);
+
+ bool res;
+ CWaitCursor w;
+ CClosureSmart dlg;
+ CKindSelectClosure *mc;
+
+ bool any_container = (options_in & 1024) == 1024; // container (model, folder)
+ if( any_container)
+ {
+ dlg.m_disable = false;
+
+ res = dlg.DoModal() == IDOK;
+ mc = new CContainerSelectSomeKindClosure
+ ( in_fcos
+ , in_folders
+ , dlg.m_bRefs
+ , dlg.m_bConns
+ , dlg.m_bSets
+ );
+ }
+ else
+ {
+ dlg.m_disable = true;
+ dlg.m_bRefs = (options_in & 2048) == 2048; // is any ref
+ dlg.m_bSets = (options_in & 4096) == 4096; // is any set
+ dlg.m_bConns = (options_in & 8192) == 8192; // is any conn
+
+ res = dlg.DoModal() == IDOK;
+
+ mc = new CKindSelectClosure
+ ( in_fcos
+ , in_folders
+ , dlg.m_bRefs
+ , dlg.m_bConns
+ , dlg.m_bSets
+ );
+ }
+
+ if( res)
+ {
+ mc->process(); // do the hard job
+
+ // load the results
+ mc->getFCOs( sel_fcos);
+ mc->getFolders( sel_folders);
+
+ bool normal_tops = !mc->noTopObjs();
+
+ if( normal_tops) // the top fcos/folds is calculated and The RootFolder is not among them
+ {
+ mc->getTopFCOs( top_fcos);
+ mc->getTopFolders( top_folders);
+ }
+
+ *pOptions = 0;
+ //*pOptions = (dlg.m_libraryHandling == 0)?0x1:0; // in case of "stubs" set the options to 1
+ *pOptions = (LIB_STUBS == 0)?0x1:0; // in case of "stubs" set the options to 1
+ *pOptions = *pOptions | 0x2; // dump the closure2 like attributes
+ *pOptions = *pOptions | 0x4; // smart copy signal
+
+ CComBSTR acckind = mc->m_accKind.c_str();
+ *accept = acckind.Detach();
+
+ CComBSTR name = mc->m_iniSelPath.c_str();
+ *path = name.Detach();
+ }
+
+ delete mc;
+
return S_OK;
}
Index: MgaClosure.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MgaClosure.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MgaClosure.h 30 Jun 2004 17:50:47 -0000 1.2
--- MgaClosure.h 27 Sep 2004 21:50:53 -0000 1.3
***************
*** 23,27 ****
// ------- Properties
! STDMETHOD(SelectiveClosure)( IMgaFCOs *in_fcos, IMgaFolders *in_folders, IMgaFCOs **sel_fcos, IMgaFolders **sel_folders, IMgaFCOs **top_fcos, IMgaFolders **top_folders, int fc, long * options);
// ------- Attributes and Methods
--- 23,28 ----
// ------- Properties
! STDMETHOD(SelectiveClosure)( IMgaFCOs *in_fcos, IMgaFolders *in_folders, IMgaFCOs **sel_fcos, IMgaFolders **sel_folders, IMgaFCOs **top_fcos, IMgaFolders **top_folders, int fc, long * options, BSTR *acckinds);
! STDMETHOD(SmartCopy)( IMgaFCOs *in_fcos, IMgaFolders *in_folders, IMgaFCOs **sel_fcos, IMgaFolders **sel_folders, IMgaFCOs **top_fcos, IMgaFolders **top_folders, int options_in, long * options, BSTR *acckinds, BSTR *path);
// ------- Attributes and Methods
Index: MgaUtil.dsp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MgaUtil.dsp,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** MgaUtil.dsp 10 Jun 2004 22:07:11 -0000 1.24
--- MgaUtil.dsp 27 Sep 2004 21:50:53 -0000 1.25
***************
*** 139,146 ****
--- 139,162 ----
# Begin Source File
+ SOURCE=.\ClosureKindSel.cpp
+ # End Source File
+ # Begin Source File
+
+ SOURCE=.\ClosurePage.cpp
+ # End Source File
+ # Begin Source File
+
SOURCE=.\ClosureRes.cpp
# End Source File
# Begin Source File
+ SOURCE=.\ClosureSmart.cpp
+ # End Source File
+ # Begin Source File
+
+ SOURCE=.\ClosureSpecDlg.cpp
+ # End Source File
+ # Begin Source File
+
SOURCE=.\colorbtn.cpp
# End Source File
***************
*** 321,325 ****
--- 337,357 ----
# Begin Source File
+ SOURCE=.\ClosureKindSel.h
+ # End Source File
+ # Begin Source File
+
+ SOURCE=.\ClosurePage.h
+ # End Source File
+ # Begin Source File
+
SOURCE=.\ClosureRes.h
+ # End Source File
+ # Begin Source File
+
+ SOURCE=.\ClosureSmart.h
+ # End Source File
+ # Begin Source File
+
+ SOURCE=.\ClosureSpecDlg.h
# End Source File
# Begin Source File
Index: MgaUtil.rc
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MgaUtil.rc,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** MgaUtil.rc 25 Aug 2004 20:36:32 -0000 1.40
--- MgaUtil.rc 27 Sep 2004 21:50:53 -0000 1.41
***************
*** 436,495 ****
END
! IDD_CLOSUREDLG DIALOG DISCARDABLE 0, 0, 264, 234
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Selective Closure"
FONT 8, "MS Sans Serif"
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
END
--- 436,502 ----
END
! IDD_CLOSUREDLG DIALOG DISCARDABLE 0, 0, 279, 253
STYLE 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",
! IDC_STATIC,21,4,237,113
CONTROL "Up",IDC_DIRECTIONUP,"Button",BS_AUTORADIOBUTTON |
! WS_GROUP | WS_TABSTOP,25,15,26,8
CONTROL "Down",IDC_DIRECTIONDN,"Button",BS_AUTORADIOBUTTON,25,26,
! 33,8
CONTROL "Part of Folders",IDC_CHECKPARTOFFOLDERS,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,69,14,61,8
! CONTROL "Part of Models",IDC_CHECKPARTOFMODEL,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,172,14,61,8
CONTROL "Folder Containment",IDC_CHECKFOLDERCONTAINMENT,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,69,26,77,8
! CONTROL "Containment",IDC_CHECKCONTAINMENT,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,69,37,52,8
! CONTROL "Include all kinds",IDC_INCLUDEALL,"Button",
! BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,172,26,67,8
! CONTROL "Include only",IDC_INCLUDESOME,"Button",
! BS_AUTORADIOBUTTON,172,37,52,8
! PUSHBUTTON ">>",IDC_FILTER,225,36,16,9
CONTROL "Refers To",IDC_CHECKREFERSTO,"Button",BS_AUTOCHECKBOX |
! WS_TABSTOP,69,68,53,8
! CONTROL "Referred By",IDC_CHECKREFERREDBY,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,69,79,51,8
CONTROL "Connection",IDC_CHECKCONNECTION,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,69,90,58,8
! CONTROL "Connection with refports",IDC_CHECKREFPORTCONNECTION,
! "Button",BS_AUTOCHECKBOX | WS_TABSTOP,79,101,89,9
CONTROL "Set Member",IDC_CHECKSETMEMBER,"Button",BS_AUTOCHECKBOX |
! WS_TABSTOP,172,68,55,8
! CONTROL "Member of Sets",IDC_CHECKMEMBEROF,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,172,79,67,8
! CONTROL "Base Type of This",IDC_CHECKBASETYPES,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,172,90,74,8
! CONTROL "Derived Types of This",IDC_CHECKSUBTYPES,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,172,101,85,8
! GROUPBOX "Wrap selected closure",IDC_STATIC,21,122,82,51
! CONTROL "Miniproject",IDC_WRAPMINIPROJ,"Button",
! BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,25,135,49,8
! CONTROL "Automatic",IDC_WRAPAUTO,"Button",BS_AUTORADIOBUTTON,25,
! 147,49,8
! CONTROL "As is",IDC_WRAPASIS,"Button",BS_AUTORADIOBUTTON,25,159,
! 32,8
! GROUPBOX "Library element handling",IDC_STATIC,118,122,140,51
CONTROL "Use stubs",IDC_LIBR1,"Button",BS_AUTORADIOBUTTON |
! WS_GROUP | WS_TABSTOP,122,135,61,8
CONTROL "Do not include in closure (stop)",IDC_LIBR2,"Button",
! BS_AUTORADIOBUTTON,122,147,115,8
CONTROL "Include in closure (continue)",IDC_LIBR3,"Button",
! BS_AUTORADIOBUTTON,122,159,116,8
! GROUPBOX "Output to",IDC_STATIC,22,181,236,38
CONTROL "Clipboard",IDC_OUTPUTTOCLIPBOARD,"Button",
! BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,25,192,49,9
CONTROL "File",IDC_OUTPUTTOFILE,"Button",BS_AUTORADIOBUTTON,25,
! 204,25,9
! EDITTEXT IDC_EDIT1,56,202,177,12,ES_AUTOHSCROLL
! PUSHBUTTON " ... ",IDC_BROWSE,237,202,15,12
! DEFPUSHBUTTON "OK",IDOK,63,231,50,14
! PUSHBUTTON "Cancel",IDCANCEL,157,231,50,14
END
***************
*** 506,509 ****
--- 513,557 ----
END
+ IDD_CLOSURESMARTCP DIALOG DISCARDABLE 0, 0, 226, 54
+ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+ CAPTION "Smart copy dialog"
+ FONT 8, "MS Sans Serif"
+ BEGIN
+ DEFPUSHBUTTON "OK",IDOK,169,6,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,169,23,50,14
+ CONTROL "References",IDC_CHECKREF,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,12,5,73,10
+ CONTROL "Sets",IDC_CHECKSET,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,12,17,73,10
+ CONTROL "Connections",IDC_CHECKCONN,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,12,29,73,10
+ END
+
+ IDD_CLOSUREPROPPAGE DIALOG DISCARDABLE 0, 0, 235, 156
+ STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
+ CAPTION "Property Page"
+ FONT 8, "MS Sans Serif"
+ BEGIN
+ END
+
+ IDD_CLOSUREKINDSEL DIALOG DISCARDABLE 0, 0, 186, 95
+ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+ CAPTION "Include the following children"
+ FONT 8, "MS Sans Serif"
+ BEGIN
+ DEFPUSHBUTTON "OK",IDOK,129,7,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
+ CONTROL "Folders",IDC_CHECK1,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,14,8,82,12
+ CONTROL "Models",IDC_CHECK2,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,14,24,82,12
+ CONTROL "Atoms",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
+ 14,40,82,12
+ CONTROL "Sets",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
+ 14,56,82,12
+ CONTROL "References",IDC_CHECK5,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,14,72,82,12
+ END
+
#ifdef APSTUDIO_INVOKED
***************
*** 720,726 ****
BEGIN
LEFTMARGIN, 7
! RIGHTMARGIN, 257
TOPMARGIN, 7
! BOTTOMMARGIN, 227
END
--- 768,774 ----
BEGIN
LEFTMARGIN, 7
! RIGHTMARGIN, 272
TOPMARGIN, 7
! BOTTOMMARGIN, 246
END
***************
*** 731,734 ****
--- 779,806 ----
TOPMARGIN, 7
BOTTOMMARGIN, 120
+ END
+
+ IDD_CLOSURESMARTCP, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 219
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 47
+ END
+
+ IDD_CLOSUREPROPPAGE, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 228
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 149
+ END
+
+ IDD_CLOSUREKINDSEL, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 179
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 88
END
END
Index: resource.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/resource.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** resource.h 25 Aug 2004 20:36:32 -0000 1.25
--- resource.h 27 Sep 2004 21:50:53 -0000 1.26
***************
*** 3,6 ****
--- 3,7 ----
// Used by MgaUtil.rc
//
+ #define IDD_CLOSUREPROPPAGE 107
#define IDD_PROPERTIES_DIALOG 141
#define IDD_CONNPROPERTIES_DIALOG 157
***************
*** 88,91 ****
--- 89,94 ----
#define IDD_CLOSURERES 2065
#define IDR_MGAEVENTLOGGER 2066
+ #define IDD_CLOSURESMARTCP 2067
+ #define IDD_CLOSUREKINDSEL 2069
#define IDR_COMPONENTPROXY 2090
#define IDC_PROGRESS1 2150
***************
*** 176,180 ****
#define IDC_LIST1 2241
#define IDC_LIBR3 2242
! #define IDC_LABELAVOIDANCE 2243
#define ID_CNTX_ADDNODE 32774
#define ID_CNTX_CLEARNODE 32775
--- 179,194 ----
#define IDC_LIST1 2241
#define IDC_LIBR3 2242
! #define IDC_CHECKSET 2243
! #define IDC_CHECKCONN 2244
! #define IDC_CHECKREF 2247
! #define IDC_INCLUDESOME 2250
! #define IDC_INCLUDEALL 2251
! #define IDC_CHECKREFPORTCONNECTION 2252
! #define IDC_CHECK2 2253
! #define IDC_CHECK3 2254
! #define IDC_CHECK4 2255
! #define IDC_CHECK5 2256
! #define IDC_FILTER 2257
! #define IDC_LABELAVOIDANCE 2258
#define ID_CNTX_ADDNODE 32774
#define ID_CNTX_CLEARNODE 32775
***************
*** 186,192 ****
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
! #define _APS_NEXT_RESOURCE_VALUE 2067
#define _APS_NEXT_COMMAND_VALUE 32778
! #define _APS_NEXT_CONTROL_VALUE 2244
#define _APS_NEXT_SYMED_VALUE 2091
#endif
--- 200,206 ----
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
! #define _APS_NEXT_RESOURCE_VALUE 2070
#define _APS_NEXT_COMMAND_VALUE 32778
! #define _APS_NEXT_CONTROL_VALUE 2259
#define _APS_NEXT_SYMED_VALUE 2091
#endif
- Previous message: [GME-commit] GMESRC/GME/Mga MgaFCO.cpp,1.31,1.32 MgaFCO.h,1.18,1.19
MgaFolder.cpp,1.24,1.25 MgaProject.cpp,1.57,1.58
MgaProject.h,1.26,1.27
- Next message: [GME-commit]
GMESRC/GME/GMEActiveBrowser ActiveBrowserPropertyPage.cpp,1.35,1.36
ActiveBrowserPropertyPage.h,1.8,1.9
AggregateContextMenu.cpp,1.17,1.18 AggregateContextMenu.h,1.3,1.4
AggregateTreeCtrl.cpp,1.18,1.19 GMEActiveBrowser.rc,1.8,1.9
resource.h,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list