[GME-commit] GMESRC/GME/ConstraintManager GMEViolationDialog.h,1.12,1.13 GMEViolationDialog.cpp,1.16,1.17

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Fri Nov 12 09:09:20 CST 2004


Update of /var/lib/gme/GMESRC/GME/ConstraintManager
In directory braindrain:/tmp/cvs-serv12099

Modified Files:
	GMEViolationDialog.h GMEViolationDialog.cpp 
Log Message:
violations to console

CVS User: bogyom

Index: GMEViolationDialog.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/ConstraintManager/GMEViolationDialog.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** GMEViolationDialog.h	13 Oct 2004 15:17:54 -0000	1.12
--- GMEViolationDialog.h	12 Nov 2004 15:09:11 -0000	1.13
***************
*** 14,17 ****
--- 14,18 ----
  
  #include "GMEConstraintEx.h"
+ #include "ConstraintManager.h"
  
  namespace OclGmeCM {
***************
*** 39,42 ****
--- 40,44 ----
  private :
  	CComPtr<IMgaProject>			m_spProject;
+ 	CComPtr<IGMEOLEApp>				m_oleapp;
  
  	CImageList						m_lstErrorImages;

Index: GMEViolationDialog.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/ConstraintManager/GMEViolationDialog.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** GMEViolationDialog.cpp	13 Oct 2004 15:17:54 -0000	1.16
--- GMEViolationDialog.cpp	12 Nov 2004 15:09:12 -0000	1.17
***************
*** 39,42 ****
--- 39,57 ----
  {
  	m_spProject = project;
+ 
+ 	COMTRY 
+ 	{	
+ 		CComBSTR app("GME.Application");
+ 		CComPtr<IMgaClient> client;
+ 		COMTHROW(m_spProject->GetClientByName((BSTR)app, &client));
+ 
+ 		CComPtr<IDispatch> gui;
+ 		COMTHROW(client->get_OLEServer(&gui));
+ 		COMTHROW(gui.QueryInterface(&m_oleapp));
+ 	}
+ 	catch(hresult_exception &)
+ 	{ 
+ 	} 
+ 
  	//{{AFX_DATA_INIT(CViolationDialog)
  	//}}AFX_DATA_INIT
***************
*** 412,415 ****
--- 427,452 ----
  	{
  		m_vecRecords.push_back( item );
+ 		// ??
+ 		COMTRY 
+ 		{
+ 			OclTree::Violation vi = item.vecViolations[ item.vecViolations.size()-1 ]; // which violation ? 
+ 			CComPtr<IUnknown> logfco = vi.vecObjectsPtr[0]; // self needed
+ 			CComPtr<IMgaFCO> fco;
+ 			COMTHROW(logfco.QueryInterface(&fco));
+ 
+ 			CComBSTR bstr, id, nm;
+ 			COMTHROW( fco->get_ID( &id));
+ 			COMTHROW( fco->get_Name( &nm));
+ 			bstr.Append("Constraint Violation: <A HREF=\"mga:");
+ 			bstr.AppendBSTR( id);
+ 			bstr.Append("\">");
+ 			bstr.AppendBSTR( nm);
+ 			bstr.Append("</A>: ");
+ 			bstr.Append(item.spConstraint.Ptr()->GetMessage().c_str());
+ 			COMTHROW(m_oleapp->ConsoleMessage(bstr, MSG_ERROR));
+ 		}
+ 		catch(hresult_exception &)
+ 		{ 
+ 		}
  	}
  
***************
*** 740,742 ****
--- 777,781 ----
  
  }; // namespace OclGmeCM
+ 
+ 
  



More information about the GME-commit mailing list