[GME-commit] GMESRC/GME/MgaUtil AlterNmspDlg.cpp,NONE,1.1 AlterNmspDlg.h,NONE,1.1 MgaResolver.cpp,1.12,1.13 MgaResolver.h,1.4,1.5 MgaUtil.rc,1.52,1.53 MgaUtil.vcproj,1.3,1.4 resource.h,1.33,1.34

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Fri Jul 21 20:23:32 CDT 2006


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

Modified Files:
	MgaResolver.cpp MgaResolver.h MgaUtil.rc MgaUtil.vcproj 
	resource.h 
Added Files:
	AlterNmspDlg.cpp AlterNmspDlg.h 
Log Message:
Namespace related changes.
Modified Files:
	MgaResolver.cpp MgaResolver.h MgaUtil.rc MgaUtil.vcproj 
 	resource.h 
Added Files:
 	AlterNmspDlg.cpp AlterNmspDlg.h 


CVS User: Zoltan Molnar, ISIS (zolmol)

--- NEW FILE: AlterNmspDlg.h ---
#pragma once

#include "resource.h"

// AlterNmspDlg dialog

class AlterNmspDlg : public CDialog
{
	DECLARE_DYNAMIC(AlterNmspDlg)

public:
	AlterNmspDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~AlterNmspDlg();

// Dialog Data
	enum { IDD = IDD_ALTERNMSPDLG };
	CEdit	m_edtPrefix;
	CEdit	m_edtTrunc;
	CButton m_chkAlterSticky;
	CButton m_radAlter0;
	CButton m_radAlter1;
	CButton m_radAlter2;
	CButton m_radAlter3;

	CString m_strPrefix;
	CString m_strTrunc;
	int		m_vRadAlter;
	BOOL	m_bAlterSticky;

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();
	virtual void OnOK();

	DECLARE_MESSAGE_MAP()

public:
	afx_msg void OnBnClickedRadAlter0();
	afx_msg void OnBnClickedRadAlter1();
	afx_msg void OnBnClickedRadAlter2();
	afx_msg void OnBnClickedRadAlter3();

public:
	//CString m_storedStrPrefix;
	//CString m_storedStrTrunc;
	//int     m_storedAltOption;
	//BOOL    m_storedAltSticky;

	afx_msg void OnBnClickedButton1();
};

Index: MgaUtil.rc
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/MgaUtil.rc,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** MgaUtil.rc	12 Jan 2006 22:43:54 -0000	1.52
--- MgaUtil.rc	21 Jul 2006 19:23:30 -0000	1.53
***************
*** 26,30 ****
  //
  
! IDD_DIALOG_LIST DIALOGEX 0, 0, 232, 106
  STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  FONT 8, "MS Sans Serif", 0, 0, 0x1
--- 26,30 ----
  //
  
! IDD_DIALOG_LIST DIALOGEX 0, 0, 232, 111
  STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  FONT 8, "MS Sans Serif", 0, 0, 0x1
***************
*** 36,40 ****
      PUSHBUTTON      "&Ignore",IDC_BUTTON_IGNORE,175,43,50,14
      CONTROL         "",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | BS_LEFT | 
!                     BS_MULTILINE | WS_TABSTOP,7,87,218,12,WS_EX_TRANSPARENT
  END
  
--- 36,41 ----
      PUSHBUTTON      "&Ignore",IDC_BUTTON_IGNORE,175,43,50,14
      CONTROL         "",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | BS_LEFT | 
!                     BS_MULTILINE | WS_GROUP | WS_TABSTOP,7,87,218,12,
!                     WS_EX_TRANSPARENT
  END
  
***************
*** 593,596 ****
--- 594,623 ----
  END
  
+ IDD_ALTERNMSPDLG DIALOGEX 0, 0, 213, 90
+ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
+     WS_SYSMENU
+ CAPTION "Importing objects from a different paradigm"
+ FONT 8, "MS Shell Dlg", 400, 0, 0x1
+ BEGIN
+     CONTROL         "Unalter",IDC_RAD_ALTER0,"Button",BS_AUTORADIOBUTTON | 
+                     WS_GROUP | WS_TABSTOP,11,19,102,10
+     CONTROL         "Prefix with",IDC_RAD_ALTER1,"Button",BS_AUTORADIOBUTTON,
+                     11,32,48,10
+     CONTROL         "Truncate",IDC_RAD_ALTER2,"Button",BS_AUTORADIOBUTTON,11,
+                     45,48,10
+     CONTROL         "Migrate",IDC_RAD_ALTER3,"Button",BS_AUTORADIOBUTTON,11,
+                     58,48,10
+     EDITTEXT        IDC_EDTPREFIX,68,31,75,14,ES_AUTOHSCROLL
+     EDITTEXT        IDC_EDTTRUNC,68,45,75,14,ES_AUTOHSCROLL
+     CONTROL         "Apply to all objects",IDC_APPLY_ALL,"Button",
+                     BS_AUTOCHECKBOX | BS_LEFT | BS_MULTILINE | WS_TABSTOP,12,
+                     73,114,12,WS_EX_TRANSPARENT
+     DEFPUSHBUTTON   "OK",IDOK,156,7,50,14
+     PUSHBUTTON      "Cancel",IDCANCEL,156,24,50,14
+     PUSHBUTTON      "Help",IDC_BUTTON1,156,41,50,14
+     LTEXT           "Would you like to alter kind and role names?",
+                     IDC_STATIC,7,7,141,8
+ END
+ 
  
  #ifdef APSTUDIO_INVOKED
***************
*** 698,702 ****
          RIGHTMARGIN, 225
          TOPMARGIN, 7
!         BOTTOMMARGIN, 99
      END
  
--- 725,729 ----
          RIGHTMARGIN, 225
          TOPMARGIN, 7
!         BOTTOMMARGIN, 104
      END
  
***************
*** 835,838 ****
--- 862,873 ----
          LEFTMARGIN, 7
          RIGHTMARGIN, 179
+         TOPMARGIN, 7
+         BOTTOMMARGIN, 83
+     END
+ 
+     IDD_ALTERNMSPDLG, DIALOG
+     BEGIN
+         LEFTMARGIN, 7
+         RIGHTMARGIN, 206
          TOPMARGIN, 7
          BOTTOMMARGIN, 83

Index: MgaUtil.vcproj
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/MgaUtil.vcproj,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MgaUtil.vcproj	19 Jul 2005 17:35:17 -0000	1.3
--- MgaUtil.vcproj	21 Jul 2006 19:23:30 -0000	1.4
***************
*** 175,178 ****
--- 175,181 ----
  			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
  			<File
+ 				RelativePath=".\AlterNmspDlg.cpp">
+ 			</File>
+ 			<File
  				RelativePath="AnnotationAspectList.cpp">
  				<FileConfiguration
***************
*** 1082,1085 ****
--- 1085,1091 ----
  			Name="Header Files"
  			Filter="h;hpp;hxx;hm;inl">
+ 			<File
+ 				RelativePath=".\AlterNmspDlg.h">
+ 			</File>
  			<File
  				RelativePath="AnnotationAspectList.h">

--- NEW FILE: AlterNmspDlg.cpp ---
// AlterNmspDlg.cpp : implementation file
//

#include "stdafx.h"
#include "MgaUtil.h"
#include "AlterNmspDlg.h"
#include ".\alternmspdlg.h"


// AlterNmspDlg dialog

IMPLEMENT_DYNAMIC(AlterNmspDlg, CDialog)
AlterNmspDlg::AlterNmspDlg(CWnd* pParent /*=NULL*/)
	: CDialog(AlterNmspDlg::IDD, pParent)
{
	m_strPrefix   = _T("");
	m_strTrunc    = _T("");
	m_vRadAlter   = 0;
	m_bAlterSticky= FALSE;

	//m_storedStrPrefix = _T("");
	//m_storedStrTrunc  = _T("");
	//m_storedAltOption = 0;
	//m_storedAltSticky = TRUE;
}

AlterNmspDlg::~AlterNmspDlg()
{
}

void AlterNmspDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control( pDX, IDC_EDTPREFIX, m_edtPrefix);
	DDX_Control( pDX, IDC_EDTTRUNC,  m_edtTrunc);
	DDX_Control( pDX, IDC_RAD_ALTER0, m_radAlter0);
	DDX_Control( pDX, IDC_RAD_ALTER1, m_radAlter1);
	DDX_Control( pDX, IDC_RAD_ALTER2, m_radAlter2);
	DDX_Control( pDX, IDC_RAD_ALTER3, m_radAlter3);
	DDX_Control( pDX, IDC_APPLY_ALL,  m_chkAlterSticky);

	DDX_Text(    pDX, IDC_EDTPREFIX, m_strPrefix);
	DDX_Text(    pDX, IDC_EDTTRUNC,  m_strTrunc);
	DDX_Radio(   pDX, IDC_RAD_ALTER0, m_vRadAlter);
	DDX_Check(   pDX, IDC_APPLY_ALL,  m_bAlterSticky);
}


BEGIN_MESSAGE_MAP(AlterNmspDlg, CDialog)
	ON_BN_CLICKED(IDC_RAD_ALTER0, OnBnClickedRadAlter0)
	ON_BN_CLICKED(IDC_RAD_ALTER1, OnBnClickedRadAlter1)
	ON_BN_CLICKED(IDC_RAD_ALTER2, OnBnClickedRadAlter2)
	ON_BN_CLICKED(IDC_RAD_ALTER3, OnBnClickedRadAlter3)
	ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
END_MESSAGE_MAP()


// AlterNmspDlg message handlers
BOOL AlterNmspDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	//m_strPrefix    = m_storedStrPrefix;
	//m_strTrunc     = m_storedStrTrunc;
	//m_vRadAlter    = m_storedAltOption;
	//m_bAlterSticky = m_storedAltSticky;

	m_edtPrefix.EnableWindow( FALSE);
	m_edtTrunc.EnableWindow(  FALSE);
	m_chkAlterSticky.ShowWindow( SW_HIDE);

	UpdateData( FALSE);
	return TRUE;
}

void AlterNmspDlg::OnOK() 
{
	UpdateData( TRUE);

	// TODO: Add extra validation here
	if( m_vRadAlter == 1 && m_strPrefix.IsEmpty()
	 || m_vRadAlter == 2 && m_strTrunc.IsEmpty()
	 || m_vRadAlter == 3 && ( m_strPrefix.IsEmpty() || m_strTrunc.IsEmpty()))
	{
		AfxMessageBox( "Please do NOT specify empty string in the edit box!");
		return; // don't allow these scenarios
	}

	// completing the namespaces with the operator: '::'
	if( !m_strPrefix.IsEmpty() && m_strPrefix.Right(2) != "::") m_strPrefix += "::";
	if( !m_strTrunc.IsEmpty()  && m_strTrunc.Right(2)  != "::") m_strTrunc  += "::";

	UpdateData( FALSE);
	//m_storedStrPrefix = m_strPrefix;
	//m_storedStrTrunc  = m_strTrunc;
	//m_storedAltOption = m_vRadAlter;
	//m_storedAltSticky = m_bAlterSticky;

	CDialog::OnOK();
}

void AlterNmspDlg::OnBnClickedRadAlter0()
{
	m_edtPrefix.EnableWindow( FALSE);
	m_edtTrunc.EnableWindow(  FALSE);
}

void AlterNmspDlg::OnBnClickedRadAlter1()
{
	m_edtPrefix.EnableWindow( TRUE);
	m_edtTrunc.EnableWindow(  FALSE);
}

void AlterNmspDlg::OnBnClickedRadAlter2()
{
	m_edtPrefix.EnableWindow( FALSE);
	m_edtTrunc.EnableWindow(  TRUE);
}

void AlterNmspDlg::OnBnClickedRadAlter3()
{
	m_edtPrefix.EnableWindow( TRUE);
	m_edtTrunc.EnableWindow(  TRUE);
}
void AlterNmspDlg::OnBnClickedButton1()
{
	AfxMessageBox("Kinds may differ in this paradigm compared to the originating one. You might choose to "
		"prefix the originating object kinds and roles with a specific namespace string. "
		"You might also choose to disregard namespace related information from the XML data by using the Trunc option. "
		"To migrate from one namespace to another you can specify the namespace string to be removed (in the 2nd edit box) and the namespace "
		"string to be used then as a prefix (in the 1st edit box).", MB_OK | MB_ICONINFORMATION);
}

Index: MgaResolver.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/MgaResolver.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** MgaResolver.cpp	30 Jul 2004 13:34:40 -0000	1.12
--- MgaResolver.cpp	21 Jul 2006 19:23:30 -0000	1.13
***************
*** 5,8 ****
--- 5,9 ----
  #include "MgaResolver.h"
  #include "DialogList.h"
+ #include "AlterNmspDlg.h"
  
  /////////////////////////////////////////////////////////////////////////////
***************
*** 47,51 ****
--- 48,89 ----
  /////////////////////////////////////////////////////////////////////////////
  // CMgaResolver
+ CComBSTR CMgaResolver::prefixIt(CComBSTR pIn)
+ {
+ 	CComBSTR rval;
+ 	rval.AppendBSTR( m_prefix); 
+ 	rval.AppendBSTR( pIn);
+ 
+ 	return rval;
+ }
  
+ CComBSTR CMgaResolver::truncIt(CComBSTR pIn)
+ {
+ 	CComBSTR rval;
+ 
+ 	CString crole( pIn);
+ 	CString trunc( m_trunc);
+ 
+ 	if( crole.Left( trunc.GetLength()) == trunc)
+ 	{
+ 		rval.Append( crole.Right( crole.GetLength() - trunc.GetLength()));
+ 	}
+ 
+ 	return rval;
+ }
+ 
+ bool CMgaResolver::isAlterationSet() const
+ {
+ 	return m_alter_option == CH_PREFIX 
+ 		|| m_alter_option == CH_TRUNCATE
+ 		|| m_alter_option == CH_MIGRATE;
+ }
+ 
+ void CMgaResolver::setAlteration( alter_mode_enum v)
+ {
+ 	if( v >= CH_NONE && v <= CH_MIGRATE)
+ 		m_alter_option = v;
+ 	else
+ 		m_alter_option = CH_NONE;
+ }
  
  STDMETHODIMP CMgaResolver::Clear() {
***************
*** 74,77 ****
--- 112,121 ----
  
  	mb_use_sticky = false;
+ 
+ 	// namespace related
+ 	m_alter_option = CH_NONE;
+ 	m_prefix = "";
+ 	m_trunc  = "";
+ 	mb_name_alteration_sticky = false;
  }
  
***************
*** 96,99 ****
--- 140,161 ----
  }
  
+ STDMETHODIMP CMgaResolver::getUserOptions()
+ {
+ 	AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ 
+ 	if( !this->mb_is_interactive) return S_OK;
+ 
+ 	COMTRY {
+ 		AlterNmspDlg cdl;
+ 		if( cdl.DoModal() == IDOK)
+ 		{
+ 			this->m_prefix = cdl.m_strPrefix;
+ 			this->m_trunc  = cdl.m_strTrunc;
+ 			this->setAlteration( (alter_mode_enum) cdl.m_vRadAlter);
+ 			this->mb_name_alteration_sticky = cdl.m_bAlterSticky == TRUE;
+ 		}
+ 	} COMCATCH(;)
+ }
+ 
  
  STDMETHODIMP CMgaResolver::get_FolderByStr(IMgaFolder *parent, 
***************
*** 123,130 ****
  
  		COMTHROW( 
! 			(hr = parent_mfolder->get_LegalChildFolderByName(kind, &mfolder)) ?
  			S_OK : hr
  		);
  
  		if (mfolder.p != NULL) {
  			COMTHROW( mfolder.CopyTo(p) );
--- 185,226 ----
  
  		COMTHROW( 
! 			(hr = parent_mfolder->get_LegalChildFolderByName(kind, &mfolder)) ? // == E_NOTFOUND???
  			S_OK : hr
  		);
  
+ 		// if not found and namespace settings are available
+ 		if (mfolder.p == NULL && isAlterationSet())
+ 		{
+ 			// (exclusive or: either truncate or prefix or migrate)
+ 			if( m_alter_option == CH_PREFIX)
+ 			{
+ 				CComBSTR kind2 = prefixIt( kind);
+ 				// try with prefixed name
+ 				COMTHROW( 
+ 					(hr = parent_mfolder->get_LegalChildFolderByName(kind2, &mfolder)) ? // == E_NOTFOUND???
+ 					S_OK : hr
+ 				);
+ 			}
+ 			else if( m_alter_option == CH_TRUNCATE)
+ 			{
+ 				CComBSTR kind2 = truncIt( kind);
+ 				// try with truncated name
+ 				COMTHROW( 
+ 					(hr = parent_mfolder->get_LegalChildFolderByName(kind2, &mfolder)) ? // == E_NOTFOUND???
+ 					S_OK : hr
+ 				);
+ 			}
+ 			else if( m_alter_option == CH_MIGRATE)
+ 			{
+ 				CComBSTR kind1 = truncIt( kind);
+ 				CComBSTR kind2 = prefixIt( kind1);
+ 				// try with migrated name from one namespace to another
+ 				COMTHROW( 
+ 					(hr = parent_mfolder->get_LegalChildFolderByName(kind2, &mfolder)) ? // == E_NOTFOUND???
+ 					S_OK : hr
+ 				);
+ 			}
+ 		}
+ 
  		if (mfolder.p != NULL) {
  			COMTHROW( mfolder.CopyTo(p) );
***************
*** 281,284 ****
--- 377,416 ----
  			);
  
+ 			// if not found and namespace settings are available
+ 			if( hr == E_NOTFOUND && isAlterationSet())
+ 			{
+ 				// exclusive or
+ 				if( m_alter_option == CH_PREFIX)
+ 				{
+ 					CComBSTR kind2 = prefixIt( kind);
+ 					// try with prefixed name
+ 					COMTHROW( 
+ 						((hr = parent_mf->get_LegalRootObjectByName(kind2, &mfco)) == E_NOTFOUND) ?
+ 						S_OK : hr
+ 					);
+ 				}
+ 				else if( m_alter_option == CH_TRUNCATE)
+ 				{
+ 					CComBSTR kind2 = truncIt( kind);
+ 					// try with truncated name
+ 					if( kind2.Length() > 0)
+ 						COMTHROW( 
+ 							((hr = parent_mf->get_LegalRootObjectByName(kind2, &mfco)) == E_NOTFOUND) ?
+ 							S_OK : hr
+ 						);
+ 				}
+ 				else if( m_alter_option == CH_MIGRATE)
+ 				{
+ 					CComBSTR kind1 = truncIt( kind);
+ 					CComBSTR kind2 = prefixIt( kind1);
+ 					// try with migrated name from one namespace to another
+ 					if( kind2.Length() > 0) 
+ 						COMTHROW( 
+ 							((hr = parent_mf->get_LegalRootObjectByName(kind2, &mfco)) == E_NOTFOUND) ?
+ 							S_OK : hr
+ 						);
+ 				}
+ 			}
+ 
  			if (mfco != NULL) {
  
***************
*** 553,556 ****
--- 685,727 ----
  		);
  
+ 		// if not found and namespace settings are available
+ 		if( hr == E_NOTFOUND && isAlterationSet())
+ 		{
+ 			// (exclusive or: either truncate or prefix)
+ 			if( m_alter_option == CH_PREFIX)
+ 			{
+ 				CComBSTR role2 = prefixIt( role);
+ 				// try with prefixed name
+ 				COMTHROW( 
+ 					((hr = parent_meta->get_RoleByName(role2, &targ_role)) == E_NOTFOUND) ? 
+ 					S_OK : hr
+ 				);
+ 			}
+ 			else if( m_alter_option == CH_TRUNCATE)
+ 			{
+ 				CComBSTR role2 = truncIt( role);
+ 				// try with truncated name
+ 				if( role2.Length() > 0) 
+ 					COMTHROW( 
+ 						((hr = parent_meta->get_RoleByName(role2, &targ_role)) == E_NOTFOUND) ? 
+ 						S_OK : hr
+ 					);
+ 			}
+ 			else if( m_alter_option == CH_MIGRATE)
+ 			{
+ 				CComBSTR role1 = truncIt( role);
+ 				CComBSTR role2 = prefixIt( role1);
+ 				// try with migrated name from one namespace to another
+ 				if( role2.Length() > 0)
+ 					COMTHROW( 
+ 						((hr = parent_meta->get_RoleByName(role2, &targ_role)) == E_NOTFOUND) ? 
+ 						S_OK : hr
+ 					);
+ 			}
+ 
+ 		}
+ 
+ 		
+ 
  		if ((hr == S_OK) && (targ_role != NULL ) ) {
  
***************
*** 639,642 ****
--- 810,850 ----
  			S_OK : hr
  		);
+ 
+ 		// if not found and namespace settings are available
+ 		if( hr == E_NOTFOUND && isAlterationSet())
+ 		{
+ 			// (exclusive or: either truncate or prefix)
+ 			if( m_alter_option == CH_PREFIX)
+ 			{
+ 				CComBSTR kind2 = prefixIt( kind);
+ 				// try with prefixed name
+ 				COMTHROW( 
+ 					((hr = parent_meta->get_DefinedFCOByName(kind2, VARIANT_TRUE, &targ_fco)) == E_NOTFOUND) ? 
+ 					S_OK : hr
+ 				);
+ 			}
+ 			else if( m_alter_option == CH_TRUNCATE)
+ 			{
+ 				CComBSTR kind2 = truncIt( kind);
+ 				// try with truncated name
+ 				if( kind2.Length() > 0)
+ 					COMTHROW( 
+ 						((hr = parent_meta->get_DefinedFCOByName(kind2, VARIANT_TRUE, &targ_fco)) == E_NOTFOUND) ? 
+ 						S_OK : hr
+ 					);
+ 			}
+ 			else if( m_alter_option == CH_MIGRATE)
+ 			{
+ 				CComBSTR kind1 = truncIt( kind);
+ 				CComBSTR kind2 = prefixIt( kind1);
+ 				// try with migrated name from one namespace to another
+ 				if( kind2.Length() > 0) 
+ 					COMTHROW( 
+ 						((hr = parent_meta->get_DefinedFCOByName(kind2, VARIANT_TRUE, &targ_fco)) == E_NOTFOUND) ? 
+ 						S_OK : hr
+ 					);
+ 			}
+ 
+ 		}
  
  		if ((hr == S_OK) && (targ_fco != NULL)) {

Index: resource.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/resource.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** resource.h	12 Jan 2006 22:43:54 -0000	1.33
--- resource.h	21 Jul 2006 19:23:30 -0000	1.34
***************
*** 94,97 ****
--- 94,98 ----
  #define IDD_CLOSUREKINDSEL              2069
  #define IDD_CLOSURESIMPLECP             2070
+ #define IDD_ALTERNMSPDLG                2071
  #define IDR_COMPONENTPROXY              2090
  #define IDC_PROGRESS1                   2150
***************
*** 204,207 ****
--- 205,216 ----
  #define IDC_CMBFMTSTRS                  2268
  #define IDC_TIMESTAMPING                2269
+ #define IDC_EDTPREFIX                   2270
+ #define IDC_EDTTRUNC                    2271
+ #define IDC_ALTER_STICKY                2272
+ #define IDC_APPLY_ALL                   2273
+ #define IDC_RAD_ALTER0                  2274
+ #define IDC_RAD_ALTER1                  2275
+ #define IDC_RAD_ALTER2                  2276
+ #define IDC_RAD_ALTER3                  2277
  #define ID_CNTX_ADDNODE                 32774
  #define ID_CNTX_CLEARNODE               32775
***************
*** 213,219 ****
  #ifdef APSTUDIO_INVOKED
  #ifndef APSTUDIO_READONLY_SYMBOLS
! #define _APS_NEXT_RESOURCE_VALUE        2071
  #define _APS_NEXT_COMMAND_VALUE         32778
! #define _APS_NEXT_CONTROL_VALUE         2270
  #define _APS_NEXT_SYMED_VALUE           2091
  #endif
--- 222,228 ----
  #ifdef APSTUDIO_INVOKED
  #ifndef APSTUDIO_READONLY_SYMBOLS
! #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

Index: MgaResolver.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaUtil/MgaResolver.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MgaResolver.h	28 Nov 2005 22:12:23 -0000	1.4
--- MgaResolver.h	21 Jul 2006 19:23:30 -0000	1.5
***************
*** 170,173 ****
--- 170,175 ----
  public:
  	CMgaResolver() : mb_is_interactive(true), mb_use_sticky(false)
+ 		, mb_name_alteration_sticky( false)
+ 		, m_alter_option( CH_NONE)
  	{
  	}
***************
*** 183,187 ****
--- 185,206 ----
  END_COM_MAP()
  
+ public:
+ 	// enums
+ 	typedef enum { CH_NONE, CH_PREFIX, CH_TRUNCATE, CH_MIGRATE } alter_mode_enum;
+ 
  private:
+ 	// namespace related methods
+ 	bool isAlterationSet() const;
+ 	void setAlteration( alter_mode_enum v);
+ 
+ 	CComBSTR prefixIt(CComBSTR pIn);
+ 	CComBSTR truncIt(CComBSTR pIn);
+ 
+ 	// namespace related vars
+ 	alter_mode_enum      m_alter_option;
+ 	CComBSTR             m_prefix;
+ 	CComBSTR             m_trunc;
+ 	bool                 mb_name_alteration_sticky;
+ 
  	bool mb_is_interactive, mb_use_sticky;
  	void clear_mappings();
***************
*** 219,222 ****
--- 238,243 ----
  	STDMETHOD(put_IsStickyEnabled)(VARIANT_BOOL p);
  	STDMETHOD(get_IsStickyEnabled)(VARIANT_BOOL *p);
+ 
+ 	STDMETHOD(getUserOptions)();
  
  	STDMETHOD(get_FolderByStr)(IMgaFolder *parent, BSTR kind, IMgaMetaFolder **p);



More information about the GME-commit mailing list