[GME-commit] GMESRC/GME/Mga MgaLibOps.h, 1.7, 1.8 MgaLibOps.cpp, 1.18, 1.19

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Wed Mar 7 16:09:39 CST 2007


Update of /project/gme-repository/GMESRC/GME/Mga
In directory escher:/tmp/cvs-serv23714

Modified Files:
	MgaLibOps.h MgaLibOps.cpp 
Log Message:
Dependency info swapped from ID to GUID.
New interface methods AttachLibraryV3, RefreshLibraryV3 introduced, along with Get/SetVirtuallyInclude(s)/(dBy).



CVS User: Zoltan Molnar, ISIS (zolmol)

Index: MgaLibOps.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Mga/MgaLibOps.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** MgaLibOps.cpp	12 Feb 2007 18:24:30 -0000	1.18
--- MgaLibOps.cpp	7 Mar 2007 22:09:37 -0000	1.19
***************
*** 54,57 ****
--- 54,174 ----
  }
  
+ void FCO::prepareDepInfo2Coll( CComBSTR& pInfo, IMgaFolders** pResColl)
+ {
+ 	CREATECOLLECTION_FOR(IMgaFolder,q);	
+ 
+ 	for( Ozer::DependentIterator it( pInfo); !it.isDone(); it.next())
+ 	{
+ 		CComBSTR current_val = it.getCurrentBstr();
+ 		CoreObj lib;
+ 		CComPtr<IMgaFolders> coll;
+ 		if( SUCCEEDED( mgaproject->GetTopLibraries( current_val, &coll)))
+ 		{
+ 			// append coll to q
+ 			long len = 0;
+ 			if( coll) COMTHROW( coll->get_Count( &len));
+ 
+ 			for( long i = 1; i <= len; ++i)
+ 			{
+ 				CComPtr<IMgaFolder> ele;
+ 				COMTHROW( coll->get_Item( i, &ele));
+ 
+ 				ASSERT( ele);
+ 				if( ele)
+ 					q->Add( ele);
+ 			}
+ 		}
+ 		else
+ 		{
+ 			ASSERT( 0);
+ 		}
+ 	}
+ 	
+ 	*pResColl = 0;
+ 	long res_length = 0;
+ 	if( q) COMTHROW( q->get_Count( &res_length));
+ 	if( res_length)
+ 		*pResColl = q.Detach();
+ }
+ 
+ 
+ void FCO::prepareColl2DepInfo( IMgaFolders* pColl, CComBSTR& pResBstr)
+ {
+ 	long len = 0;
+ 	if( pColl) COMTHROW( pColl->get_Count( &len));
+ 	for( long i = 1; i <= len; ++i)
+ 	{
+ 		CComPtr<IMgaFolder> ele;
+ 		COMTHROW( pColl->get_Item( i, &ele));
+ 
+ 		ASSERT( ele);
+ 		if( ele)
+ 		{
+ 			CComBSTR gd;
+ 			COMTHROW( ele->GetGuidDisp( &gd));
+ 			
+ 			// '\n' delimited list created (no '\n' at the end)
+ 			if( pResBstr && pResBstr.Length() > 0) pResBstr.Append( "\n");
+ 			pResBstr.AppendBSTR( gd);
+ 		}
+ 	}
+ }
+ 
+ HRESULT FCO::GetVirtuallyIncludedBy( IMgaFolders** pDep)
+ {
+ 	COMTRY {
+ 		CHECK_OUTPAR( pDep);
+ 		CheckRead();
+ 		if(self[ATTRID_PERMISSIONS] & LIBROOT_FLAG) {
+ 
+ 			CComBSTR info;	
+ 			Ozer::StorageMgr::getIncludedBy( self, info);
+ 			prepareDepInfo2Coll( info, pDep);
+ 		}
+ 		else *pDep = NULL;
+ 	} COMCATCH(;);
+ }
+ HRESULT FCO::SetVirtuallyIncludedBy( IMgaFolders*  pDep)
+ {
+ 	COMTRY_IN_TRANSACTION {
+ 		CHECK_INPAR( pDep);
+ 		CheckWrite();
+ 
+ 		CComBSTR info;
+ 		prepareColl2DepInfo( pDep, info);
+ 		Ozer::StorageMgr::setIncludedBy( self, info);
+ 
+ 		SelfMark(OBJEVENT_REGISTRY);
+ 
+ 	} COMCATCH_IN_TRANSACTION(;);
+ }
+ HRESULT FCO::GetVirtuallyIncludes  ( IMgaFolders** pDep)
+ {
+ 	COMTRY {
+ 		CHECK_OUTPAR( pDep);
+ 		CheckRead();
+ 		if(self[ATTRID_PERMISSIONS] & LIBROOT_FLAG) {
+ 
+ 			CComBSTR info;
+ 			Ozer::StorageMgr::getIncludes( self, info);
+ 			prepareDepInfo2Coll( info, pDep);
+ 		}
+ 		else *pDep = NULL;
+ 	} COMCATCH(;);
+ }
+ HRESULT FCO::SetVirtuallyIncludes  ( IMgaFolders*  pDep)
+ {
+ 	COMTRY_IN_TRANSACTION {
+ 		CHECK_INPAR( pDep);
+ 		CheckWrite();
+ 
+ 		CComBSTR info;
+ 		prepareColl2DepInfo( pDep, info);
+ 		Ozer::StorageMgr::setIncludes( self, info);
+ 
+ 		SelfMark(OBJEVENT_REGISTRY);
+ 
+ 	} COMCATCH_IN_TRANSACTION(;);
+ }
  /* *************************** Pointer Fixup ************************************** */
  /*
***************
*** 387,391 ****
  		}
  
! 		libimgroot[ATTRID_NAME] = lw.getLongName();//connstr;
  		libimgroot[ATTRID_PERMISSIONS] = LIBROOT_FLAG;
  		
--- 504,508 ----
  		}
  
! 		libimgroot[ATTRID_NAME] = lw.getConnectionStr();
  		libimgroot[ATTRID_PERMISSIONS] = LIBROOT_FLAG;
  		
***************
*** 418,435 ****
  }
  
! HRESULT FCO::AttachLibrary(BSTR libname, IMgaFolder **f, long relid) {
  	COMTRY_IN_TRANSACTION {
  		CHECK_OUTPTRPARVALIDNULL(f);
  			
  		Reporter reporter( mgaproject);
! 		reporter.show( CComBSTR( "~~~~~~~~Examining toplevel libraries in project"), false);
  
  		// 'self' here is the rootfolder of the project
  		Typedefs::LIBMAP top_libs;
! 		LibWorker lw( mgaproject, libname);
  		SearchTool::m_optimized = lw.isOptimized();
  		LibImgHelper::recordLibs( false, self, top_libs); // consider existing toplibs only (self = project)
  		
! 		reporter.show( CComBSTR( "~~~~~~~~Examining the attachable library"), false);
  
  		CoreObj libimgroot;
--- 535,560 ----
  }
  
! HRESULT FCO::doAttach( BSTR libname, VARIANT_BOOL ungroup, IMgaFolder **f) {
  	COMTRY_IN_TRANSACTION {
  		CHECK_OUTPTRPARVALIDNULL(f);
  			
  		Reporter reporter( mgaproject);
! 
! 		// examining toplevel libraries in project
  
  		// 'self' here is the rootfolder of the project
  		Typedefs::LIBMAP top_libs;
! 		LibWorker lw( mgaproject, libname, ungroup);
  		SearchTool::m_optimized = lw.isOptimized();
  		LibImgHelper::recordLibs( false, self, top_libs); // consider existing toplibs only (self = project)
  		
! 		// examining the attachable library
! 		CComBSTR msg( "--------------------- Creating ");
! 		if( lw.isOptimized())
! 			msg.Append( "optimized ");
! 		msg.Append("library image from [");
! 		msg.Append( lw.getConnectionStr());
! 		msg.Append("]--");
! 		reporter.show( msg, false);
  
  		CoreObj libimgroot;
***************
*** 439,444 ****
  		CComBSTR infmsg; // informative message about the lib pairs found
  		CreateLibraryImage(mgaproject, lw, libimgroot, accept_old_lib, &is_old_lib, top_libs, idlist, infmsg);
! 		
! 		reporter.show( infmsg, false);
  
  		assignnewchild(libimgroot);
--- 564,569 ----
  		CComBSTR infmsg; // informative message about the lib pairs found
  		CreateLibraryImage(mgaproject, lw, libimgroot, accept_old_lib, &is_old_lib, top_libs, idlist, infmsg);
! 		if( lw.isOptimized() && infmsg && infmsg.Length() > 0) // informative message about possible guid duplications in the library
! 			reporter.show( infmsg, false);
  
  		assignnewchild(libimgroot);
***************
*** 461,464 ****
--- 586,598 ----
  }
  
+ 
+ HRESULT FCO::AttachLibraryV3(BSTR libname, VARIANT_BOOL ungroup, IMgaFolder **f) {
+ 	return doAttach( libname, ungroup, f);
+ }
+ 
+ HRESULT FCO::AttachLibrary(BSTR libname, IMgaFolder **f) {
+ 	return doAttach( libname, VARIANT_FALSE, f);
+ }
+ 
  /* *************************** Refresh ********************************************* */
  
***************
*** 590,594 ****
  
  
! HRESULT FCO::RefreshLibrary(BSTR libname) {
  	COMTRY_IN_TRANSACTION {
  		Reporter reporter(mgaproject);
--- 724,734 ----
  
  
! 
! HRESULT FCO::doRefresh( BSTR libname, VARIANT_BOOL ungroup, long *ptrNumOfErrors) {
! 	long placeholder;
! 	if( !ptrNumOfErrors) // invalid ptr
! 		ptrNumOfErrors = &placeholder;
! 	*ptrNumOfErrors = 0;
! 
  	COMTRY_IN_TRANSACTION {
  		Reporter reporter(mgaproject);
***************
*** 605,612 ****
  			}
  
! 			LibWorker lw( mgaproject, libname);
  			SearchTool::m_optimized = lw.isOptimized();
  
! 			reporter.show( CComBSTR( "~~~~~~~~Examining toplevel libraries in project"), false);
  
  			CComPtr<IMgaFolder> prroot;
--- 745,752 ----
  			}
  
! 			LibWorker lw( mgaproject, libname, ungroup);
  			SearchTool::m_optimized = lw.isOptimized();
  
! 			// examining toplevel libraries in project
  
  			CComPtr<IMgaFolder> prroot;
***************
*** 622,664 ****
  			LibImgHelper::recordLibs( false, corerf, lib_results, id_of_this_library);
  
! 			reporter.show( CComBSTR( "~~~~~~~~Examining the refreshable library"), false);
! #ifdef _DEBUG
! 			Typedefs::LIBMAP my_inner_lib_results;
! 			// in the refreshable lib examine the whole lib
! 			LibImgHelper::recordLibs( true, self, my_inner_lib_results);
! 
! 			for( Typedefs::LIBMAP_ITER it = my_inner_lib_results.begin(), endit = my_inner_lib_results.end(); it != endit; ++it)
! 			{
! 				for( Typedefs::LIBVEC_ITER jt = it->second.begin(), endjt = it->second.end(); jt != endjt; ++jt)
! 				{
! 					CComBSTR id;
! 					ObjForCore( *jt)->get_ID( &id);
! 					Typedefs::LIBMAP_ITER kt = lib_results.find( it->first);
! 					if( kt != lib_results.end()) // 
! 					{
! 						ASSERT( kt->first == it->first);
! 						// look for 'id' in vector kt->second
! 						for( std::vector< CoreObj >::iterator lt = kt->second.begin()
! 							; lt != kt->second.end()
! 							; ++lt)
! 						{
! 							CComBSTR id2;
! 							ObjForCore( *lt)->get_ID( &id2);
! 							if( id == id2) // found
! 							{
! 								ASSERT( 0 );
! 								// recordlibs should have ignored the copies which are refershed
! 								kt->second.erase( lt);
! 								/*CComBSTR nsg;
! 								nsg.Append( id);
! 								nsg.Append( L" has been deleted from common map.");
! 								reporter.show( nsg, false);*/
! 								break;
! 							}
! 						}
! 					}
! 				}
! 			}
! #endif
  
  			CComBSTR ln(libname);
--- 762,816 ----
  			LibImgHelper::recordLibs( false, corerf, lib_results, id_of_this_library);
  
! 			// examining the refreshable library
! 			CComBSTR msg( "--------------------- Creating ");
! 			if( lw.isOptimized())
! 				msg.Append( "optimized ");
! 			msg.Append("library image from [");
! 			msg.Append( lw.getConnectionStr());
! 			msg.Append("]--");
! 			reporter.show( msg, false);
! //
! //  If required another logic could be introduced later:
! //  If two or more copies of the same lib (or GUID conlfict) found on toplevel 
! //  then we could restrict optimization to not optimize (thus remove) such copies. 
! //
! //#if(0)
! //			Typedefs::LIBMAP my_inner_lib_results;
! //			// in the refreshable lib examine the whole lib
! //			LibImgHelper::recordLibs( true, self, my_inner_lib_results);
! //
! //			for( Typedefs::LIBMAP_ITER it = my_inner_lib_results.begin(), endit = my_inner_lib_results.end(); it != endit; ++it)
! //			{
! //				for( Typedefs::LIBVEC_ITER jt = it->second.begin(), endjt = it->second.end(); jt != endjt; ++jt)
! //				{
! //					CComBSTR id;
! //					LibImgHelper::GetItsGuid( *jt, &id);
! //					Typedefs::LIBMAP_ITER kt = lib_results.find( it->first);
! //					if( kt != lib_results.end()) // 
! //					{
! //						ASSERT( kt->first == it->first);
! //						// look for 'id' in vector kt->second
! //						for( std::vector< CoreObj >::iterator lt = kt->second.begin()
! //							; lt != kt->second.end()
! //							; ++lt)
! //						{
! //							CComBSTR id2;
! //							LibImgHelper::GetItsGuid( *lt, &id2);
! //							if( id == id2) // found
! //							{
! //								ASSERT( 0 );
! //								// recordlibs should have ignored the copies which are refershed
! //								kt->second.erase( lt);
! //								CComBSTR nsg;
! //								nsg.Append( id);
! //								nsg.Append( L" has been deleted from common map.");
! //								reporter.show( nsg, false);
! //								break;
! //							}
! //						}
! //					}
! //				}
! //			}
! //#endif
  
  			CComBSTR ln(libname);
***************
*** 670,674 ****
  			CComBSTR infmsg;
  			CreateLibraryImage(mgaproject, lw, libimgroot, accept_old_lib, &is_old_lib_copy, lib_results, idlist, infmsg);
! 			reporter.show( infmsg, false);
  	 
  			libimgroot[ATTRID_PARENT] = self[ATTRID_PARENT];
--- 822,827 ----
  			CComBSTR infmsg;
  			CreateLibraryImage(mgaproject, lw, libimgroot, accept_old_lib, &is_old_lib_copy, lib_results, idlist, infmsg);
! 			if( lw.isOptimized() && infmsg && infmsg.Length() > 0) // informative message about possible guid duplications in the library
! 				reporter.show( infmsg, false);
  	 
  			libimgroot[ATTRID_PARENT] = self[ATTRID_PARENT];
***************
*** 723,728 ****
  
  					MyCComBSTR msg;
! 					msg.Append( "----------------------Library refresh done--------");
! 					rm.getNumOfErrors( msg);
  					msg.Append( "--");
  					reporter.show( msg, false);
--- 876,884 ----
  
  					MyCComBSTR msg;
! 					msg.Append( "----------------------Library refresh done [");
! 					msg.AppendBSTR( libname);
! 					msg.Append("]--------");
! 					int num = rm.getNumOfErrors( msg);
! 					*ptrNumOfErrors = num;
  					msg.Append( "--");
  					reporter.show( msg, false);
***************
*** 731,739 ****
  					MyCComBSTR msg( "Check failed after refresh!");
  					reporter.show( msg);
  					throw;
  				}
  			}
  		} // else
! 	} COMCATCH_IN_TRANSACTION( Reporter(mgaproject).show( MyCComBSTR( "----------------------Library refresh failed----------------------")));
  }
  
--- 887,906 ----
  					MyCComBSTR msg( "Check failed after refresh!");
  					reporter.show( msg);
+ 					int num = rm.getNumOfErrors( msg);
+ 					*ptrNumOfErrors = num + 1;
  					throw;
  				}
  			}
  		} // else
! 	} COMCATCH_IN_TRANSACTION( if( *ptrNumOfErrors == 0) *ptrNumOfErrors = 1; Reporter(mgaproject).show( MyCComBSTR( "----------------------Library refresh failed----------------------")));
! }
! 
! HRESULT FCO::RefreshLibraryV3(BSTR libname, VARIANT_BOOL ungroup, long *ptrNumOfErrors) {
! 	return doRefresh( libname, ungroup, ptrNumOfErrors);
! }
! 
! HRESULT FCO::RefreshLibrary(BSTR libname) {
! 	long numOfErrs( 0);
! 	return doRefresh( libname, VARIANT_FALSE, &numOfErrs);
  }
  
***************
*** 826,844 ****
  
  LibWorker::LibWorker( CMgaProject* p_mgaProject
!                     , CComBSTR     p_libName)
      : m_mgaProject( p_mgaProject)
      , m_libName( p_libName)
!     , m_optimized( false)
  {
- 	std::string ln;
- 	CopyTo( m_libName, ln);
- 	std::string magic_str( " (optimized)");
- 	std::string::size_type pos = ln.find( magic_str);
- 	if( pos != std::string::npos && pos + magic_str.length() == ln.length())
- 	{
- 		m_optimized = true;
- 		ln = ln.substr( 0, pos);
- 		CopyTo( ln, &m_libName);
- 	}
  }
  
--- 993,1002 ----
  
  LibWorker::LibWorker( CMgaProject* p_mgaProject
!                     , CComBSTR     p_libName
!                     , bool         p_optimize)
      : m_mgaProject( p_mgaProject)
      , m_libName( p_libName)
!     , m_optimized( p_optimize)
  {
  }
  
***************
*** 853,874 ****
  }
  
- CComBSTR LibWorker::getLongName() const
- {
- 	CComBSTR res;
- 	res.AppendBSTR( m_libName);
- 	if( m_optimized)
- 	{
- 		std::string magic_str( " (optimized)");
- 		res.Append( magic_str.c_str());
- 	}
- 
- 	return res;
- }
- 
- 
  void LibWorker::showDetails( CoreObj&  p_container, std::map< BinGuid, std::vector< CoreObj > >&  p_results)
  {
  	CComBSTR oid;
! 	ObjForCore( p_container)->get_ID( &oid);
  	oid.Append( L" lib recorded");
  	if( m_mgaProject) Reporter::showIt( m_mgaProject, oid, false);
--- 1011,1018 ----
  }
  
  void LibWorker::showDetails( CoreObj&  p_container, std::map< BinGuid, std::vector< CoreObj > >&  p_results)
  {
  	CComBSTR oid;
! 	LibImgHelper::GetItsGuid( p_container, &oid);
  	oid.Append( L" lib recorded");
  	if( m_mgaProject) Reporter::showIt( m_mgaProject, oid, false);
***************
*** 952,957 ****
  			CoreObj librfparent = librf[ATTRID_PARENT];
  			CComBSTR id1, id2;
! 			ObjForCore( p_container)->get_ID( &id1);
! 			ObjForCore( librfparent)->get_ID( &id2);
  			if( id1 != id2)
  			{
--- 1096,1101 ----
  			CoreObj librfparent = librf[ATTRID_PARENT];
  			CComBSTR id1, id2;
! 			LibImgHelper::GetItsGuid( p_container, &id1);
! 			LibImgHelper::GetItsGuid( librfparent, &id2);
  			if( id1 != id2)
  			{
***************
*** 963,967 ****
  
  				CComBSTR id3;
! 				ObjForCore( librf)->get_ID( &id3);
  
  				// save the includes info
--- 1107,1111 ----
  
  				CComBSTR id3;
! 				LibImgHelper::GetItsGuid( librf, &id3);
  
  				// save the includes info
***************
*** 990,994 ****
  	if( !p_log || !p_log.Length())
  	{
! 		p_log.Append( "~~~~~~~~Opportunities for optimization found.");
  	}
  	
--- 1134,1138 ----
  	if( !p_log || !p_log.Length())
  	{
! 		p_log.Append( "Opportunities for optimization found.");
  	}
  	
***************
*** 1062,1066 ****
  	FCO*     libimgroot2    = ObjForCore( p_libImageRoot);
  
! 	if( libimgroot2) COMTHROW( libimgroot2->get_ID( &id_of_toplib));
  	else             throw hresult_exception( -1);
  
--- 1206,1210 ----
  	FCO*     libimgroot2    = ObjForCore( p_libImageRoot);
  
! 	if( libimgroot2) LibImgHelper::GetItsGuid( p_libImageRoot, &id_of_toplib);
  	else             throw hresult_exception( -1);
  
***************
*** 1075,1079 ****
  			CComBSTR id_of_innerlib;
  			FCO* s = ObjForCore( iiit->second);
! 			if( s) COMTHROW( s->get_ID( &id_of_innerlib));
  			else throw hresult_exception( -1);
  
--- 1219,1223 ----
  			CComBSTR id_of_innerlib;
  			FCO* s = ObjForCore( iiit->second);
! 			if( s) LibImgHelper::GetItsGuid( iiit->second, &id_of_innerlib);
  			else throw hresult_exception( -1);
  
***************
*** 1179,1182 ****
--- 1323,1366 ----
  }
  
+ //static 
+ void LibImgHelper::GetItsGuid( CoreObj&           p_coreObj
+                              , BSTR*              p_guidDisp)
+ {
+ 	//
+ 	// better be in sync with FCO::GetGuidDisp() in MgaFCO.cpp
+ 	//
+ 	// in constrast to MgaFCO::GetGuidDisp this method does not 
+ 	// require the CheckRead() test, thus external, zombie or
+ 	// not-yet-attached objects can be provided as well in its
+ 	// coreObj parameter
+ 	long v1(0), v2(0), v3(0), v4(0);
+ 	v1 = p_coreObj[ATTRID_GUID1];
+ 	v2 = p_coreObj[ATTRID_GUID2];
+ 	v3 = p_coreObj[ATTRID_GUID3];
+ 	v4 = p_coreObj[ATTRID_GUID4];
+ 	
+ 	GUID t_guid;
+ 	t_guid.Data1 = v1;
+ 	t_guid.Data2 = (v2 >> 16);
+ 	t_guid.Data3 = (v2 << 16) >> 16;
+ 	t_guid.Data4[0] = (v3 >> 24);
+ 	t_guid.Data4[1] = (v3 << 8) >> 24;
+ 	t_guid.Data4[2] = (v3 << 16) >> 24;
+ 	t_guid.Data4[3] = (v3 << 24) >> 24;
+ 
+ 	t_guid.Data4[4] = (v4 >> 24);
+ 	t_guid.Data4[5] = (v4 << 8) >> 24;
+ 	t_guid.Data4[6] = (v4 << 16) >> 24;
+ 	t_guid.Data4[7] = (v4 << 24) >> 24;
+ 
+ 	char buff[39];
+ 	sprintf( buff, "{%08lX-%04X-%04x-%02X%02X-%02X%02X%02X%02X%02X%02X}",
+ 		t_guid.Data1, t_guid.Data2, t_guid.Data3,
+ 		t_guid.Data4[0], t_guid.Data4[1], t_guid.Data4[2], t_guid.Data4[3],
+ 		t_guid.Data4[4], t_guid.Data4[5], t_guid.Data4[6], t_guid.Data4[7]);
+ 
+ 	*p_guidDisp = CComBSTR( buff).Detach();
+ }
+ 
  bool Ozer::isIncluded( CoreObj&  p_fldCore)
  {
***************
*** 1213,1220 ****
  	{
  		CComBSTR lib_id_to_remove;
! 		ObjForCore( p_libimgroot)->get_ID( &lib_id_to_remove);
  		
  		CComBSTR lib_id_to_add;
! 		ObjForCore( p_newlibimgroot)->get_ID( &lib_id_to_add);
  
  		// libs enumerated in vals will loose all referrals to p_libimgroot
--- 1397,1404 ----
  	{
  		CComBSTR lib_id_to_remove;
! 		LibImgHelper::GetItsGuid( p_libimgroot, &lib_id_to_remove);
  		
  		CComBSTR lib_id_to_add;
! 		LibImgHelper::GetItsGuid( p_newlibimgroot, &lib_id_to_add);
  
  		// libs enumerated in vals will loose all referrals to p_libimgroot
***************
*** 1229,1233 ****
  			CComBSTR current_val = it.getCurrentBstr();
  			CoreObj lib;
! 			if( SearchTool::findTopLibInProj( p_mgaproject, current_val, lib))
  			{
  				try {
--- 1413,1417 ----
  			CComBSTR current_val = it.getCurrentBstr();
  			CoreObj lib;
! 			if( lib = SearchTool::findTopLibrary( p_rootfolder, current_val))
  			{
  				try {

Index: MgaLibOps.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Mga/MgaLibOps.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** MgaLibOps.h	12 Feb 2007 18:24:30 -0000	1.7
--- MgaLibOps.h	7 Mar 2007 22:09:37 -0000	1.8
***************
*** 535,543 ****
  
  	LibWorker( CMgaProject* p_mgaProject
! 	         , CComBSTR     p_libName);
  
  	bool          isOptimized() const;
  	CComBSTR      getConnectionStr() const;
- 	CComBSTR      getLongName() const;
  
  	void flatten( CoreObj&     p_rootfolder
--- 535,543 ----
  
  	LibWorker( CMgaProject* p_mgaProject
! 	         , CComBSTR     p_libName
! 	         , bool         p_optimize);
  
  	bool          isOptimized() const;
  	CComBSTR      getConnectionStr() const;
  
  	void flatten( CoreObj&     p_rootfolder
***************
*** 598,600 ****
--- 598,602 ----
  	                      , const CComBSTR&    p_avoidThisLibrary = "");
  
+ 	static void GetItsGuid( CoreObj&           p_coreObj
+ 	                      , BSTR*              p_guidDisp);
  };



More information about the GME-commit mailing list