[GME-commit]
GMESRC/GME/MgaUtil MgaResolver.cpp,1.11,1.12 MgaResolver.h,1.2,1.3
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Fri Jul 30 09:34:42 CDT 2004
- Previous message: [GME-commit]
GMESRC/GME/Gme GME.dsp,1.91,1.92 GMEVersion.h,1.19,1.20
- Next message: [GME-commit]
GMESRC/Paradigms/MetaGME/BonExtension BON2Engine.cpp,NONE,1.1
BON2Component.cpp,1.18,1.19 BON2Component.h,1.9,1.10
Globals.h,1.6,1.7 logger.cpp,1.2,1.3 logger.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/gme/GMESRC/GME/MgaUtil
In directory braindrain:/tmp/cvs-serv22789/GME/MgaUtil
Modified Files:
MgaResolver.cpp MgaResolver.h
Log Message:
Resolver uses GME COnsole for error reports
CVS User: volgy
Index: MgaResolver.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MgaResolver.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** MgaResolver.cpp 9 Mar 2004 21:35:57 -0000 1.11
--- MgaResolver.cpp 30 Jul 2004 13:34:40 -0000 1.12
***************
*** 225,229 ****
);
! AfxMessageBox(sz_format, MB_ICONSTOP | MB_OK);
}
--- 225,237 ----
);
! CComPtr<IMgaProject> mgaProject;
! COMTHROW(parent->get_Project(&mgaProject));
! CComPtr<IGMEOLEApp> pGME = get_GME(mgaProject);
! if (pGME) {
! COMTHROW(pGME->ConsoleMessage(CComBSTR(sz_format), MSG_ERROR));
! }
! else {
! AfxMessageBox(sz_format, MB_ICONSTOP | MB_OK);
! }
}
***************
*** 340,344 ****
);
! AfxMessageBox(sz_format, MB_ICONSTOP | MB_OK);
}
--- 348,361 ----
);
! CComPtr<IMgaProject> mgaProject;
! COMTHROW(parent->get_Project(&mgaProject));
! CComPtr<IGMEOLEApp> pGME = get_GME(mgaProject);
! if (pGME) {
! COMTHROW(pGME->ConsoleMessage(CComBSTR(sz_format), MSG_ERROR));
! }
! else {
! AfxMessageBox(sz_format, MB_ICONSTOP | MB_OK);
! }
!
}
***************
*** 403,407 ****
sz_format += sentence;
! AfxMessageBox(sz_format, MB_ICONSTOP | MB_OK);
}
--- 420,433 ----
sz_format += sentence;
! CComPtr<IMgaProject> mgaProject;
! COMTHROW(parent->get_Project(&mgaProject));
! CComPtr<IGMEOLEApp> pGME = get_GME(mgaProject);
! if (pGME) {
! COMTHROW(pGME->ConsoleMessage(CComBSTR(sz_format), MSG_ERROR));
! }
! else {
! AfxMessageBox(sz_format, MB_ICONSTOP | MB_OK);
! }
!
}
***************
*** 423,427 ****
COMTHROW(fco_ix->get_Name(&newname));
sentence += "\nUsing the only valid choice '" + CString(newname) + "' instead.";
! AfxMessageBox(sentence, MB_ICONSTOP | MB_OK);
}
// update mapping
--- 449,463 ----
COMTHROW(fco_ix->get_Name(&newname));
sentence += "\nUsing the only valid choice '" + CString(newname) + "' instead.";
!
! CComPtr<IMgaProject> mgaProject;
! COMTHROW(parent->get_Project(&mgaProject));
! CComPtr<IGMEOLEApp> pGME = get_GME(mgaProject);
! if (pGME) {
! COMTHROW(pGME->ConsoleMessage(CComBSTR(sentence), MSG_ERROR));
! }
! else {
! AfxMessageBox(sentence, MB_ICONSTOP | MB_OK);
! }
!
}
// update mapping
***************
*** 834,838 ****
}
! AfxMessageBox(sz_format, MB_ICONSTOP | MB_OK);
}
--- 870,882 ----
}
! CComPtr<IMgaProject> mgaProject;
! COMTHROW(parent->get_Project(&mgaProject));
! CComPtr<IGMEOLEApp> pGME = get_GME(mgaProject);
! if (pGME) {
! COMTHROW(pGME->ConsoleMessage(CComBSTR(sz_format), MSG_ERROR));
! }
! else {
! AfxMessageBox(sz_format, MB_ICONSTOP | MB_OK);
! }
}
***************
*** 986,990 ****
);
! AfxMessageBox(sz_format,MB_ICONSTOP | MB_OK);
--- 1030,1042 ----
);
! CComPtr<IMgaProject> mgaProject;
! COMTHROW(parent->get_Project(&mgaProject));
! CComPtr<IGMEOLEApp> pGME = get_GME(mgaProject);
! if (pGME) {
! COMTHROW(pGME->ConsoleMessage(CComBSTR(sz_format), MSG_ERROR));
! }
! else {
! AfxMessageBox(sz_format, MB_ICONSTOP | MB_OK);
! }
***************
*** 1367,1371 ****
sz_format += sz_format_tmp;
! AfxMessageBox(sz_format);
return RESOLV_ERR_get_ConnRoleByMeta;
--- 1419,1431 ----
sz_format += sz_format_tmp;
! CComPtr<IMgaProject> mgaProject;
! COMTHROW(parent->get_Project(&mgaProject));
! CComPtr<IGMEOLEApp> pGME = get_GME(mgaProject);
! if (pGME) {
! COMTHROW(pGME->ConsoleMessage(CComBSTR(sz_format), MSG_ERROR));
! }
! else {
! AfxMessageBox(sz_format, MB_ICONSTOP | MB_OK);
! }
return RESOLV_ERR_get_ConnRoleByMeta;
***************
*** 1610,1614 ****
sz_format += sz_format_tmp;
! AfxMessageBox(sz_format);
return RESOLV_ERR_get_ConnRoleByMeta;
--- 1670,1683 ----
sz_format += sz_format_tmp;
! CComPtr<IMgaProject> mgaProject;
! COMTHROW(parent->get_Project(&mgaProject));
! CComPtr<IGMEOLEApp> pGME = get_GME(mgaProject);
! COMTHROW(pGME->ConsoleMessage(CComBSTR(sz_format), MSG_ERROR));
! if (pGME) {
! COMTHROW(pGME->ConsoleMessage(CComBSTR(sz_format), MSG_ERROR));
! }
! else {
! AfxMessageBox(sz_format, MB_ICONSTOP | MB_OK);
! }
return RESOLV_ERR_get_ConnRoleByMeta;
***************
*** 2024,2027 ****
--- 2093,2117 ----
return true;
+ }
+
+ CComPtr<IGMEOLEApp> CMgaResolver::get_GME(CComPtr<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;
}
Index: MgaResolver.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/MgaUtil/MgaResolver.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MgaResolver.h 24 Aug 2001 20:57:00 -0000 1.2
--- MgaResolver.h 30 Jul 2004 13:34:40 -0000 1.3
***************
*** 207,210 ****
--- 207,212 ----
bool map_put_RoleByPathStr(BSTR path, IMgaMetaBase *parent, objtype_enum objtype, IMgaMetaRole *p);
+ CComPtr<IGMEOLEApp> get_GME(CComPtr<IMgaProject> project);
+
// IMgaResolver
- Previous message: [GME-commit]
GMESRC/GME/Gme GME.dsp,1.91,1.92 GMEVersion.h,1.19,1.20
- Next message: [GME-commit]
GMESRC/Paradigms/MetaGME/BonExtension BON2Engine.cpp,NONE,1.1
BON2Component.cpp,1.18,1.19 BON2Component.h,1.9,1.10
Globals.h,1.6,1.7 logger.cpp,1.2,1.3 logger.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list