[GME-commit] GMESRC/GME/Mga MgaLibOps.cpp, 1.19, 1.20 MgaLibOps.h, 1.8, 1.9

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Thu Mar 8 13:24:35 CST 2007


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

Modified Files:
	MgaLibOps.cpp MgaLibOps.h 
Log Message:
GUID based Library dependency tracking/updating fixed. Code simplified.



CVS User: Zoltan Molnar, ISIS (zolmol)

Index: MgaLibOps.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Mga/MgaLibOps.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** MgaLibOps.cpp	7 Mar 2007 22:09:37 -0000	1.19
--- MgaLibOps.cpp	8 Mar 2007 19:24:33 -0000	1.20
***************
*** 335,339 ****
  }
  									   
! void CreateLibraryImage(CMgaProject *mgaproject, LibWorker& lw, CoreObj &libimgroot, bool p_tolerateOldMga, bool *p_ptrIsOldMga, Typedefs::LIBMAP& p_results, CComBSTR& p_includedIdList, CComBSTR& p_infoMsg) {
  	CComBSTR connstr = lw.getConnectionStr();
  	CComPtr<IMgaProject> p;
--- 335,339 ----
  }
  									   
! void CreateLibraryImage(CMgaProject *mgaproject, LibWorker& lw, CoreObj &libimgroot, bool p_tolerateOldMga, bool *p_ptrIsOldMga, Typedefs::LIBMAP& p_results, Typedefs::LIBVEC& p_dependentLibs, CComBSTR& p_infoMsg) {
  	CComBSTR connstr = lw.getConnectionStr();
  	CComPtr<IMgaProject> p;
***************
*** 508,516 ****
  		
  		//*************************************************
! 		// saving dependency information: IncludedBy
  		//*************************************************
  		if( lw.isOptimized())
  		{
! 			LibImgHelper::createDeps( libimgroot, matching_libs, reporter, p_includedIdList);
  		}
  		//else {}// not optimized, is it needed?
--- 508,516 ----
  		
  		//*************************************************
! 		// collect the dependent (included by me) libraries
  		//*************************************************
  		if( lw.isOptimized())
  		{
! 			LibImgHelper::collectDep( matching_libs, reporter, p_dependentLibs);
  		}
  		//else {}// not optimized, is it needed?
***************
*** 561,567 ****
  		bool accept_old_lib( false); // don't tolerate old format MGA files (attachment of such a library fails)
  		bool is_old_lib( false);
! 		CComBSTR idlist; // can't save includes information until libimgroot became child of self
  		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);
--- 561,567 ----
  		bool accept_old_lib( false); // don't tolerate old format MGA files (attachment of such a library fails)
  		bool is_old_lib( false);
! 		Typedefs::LIBVEC dep_libs; // those libraries which are factored out
  		CComBSTR infmsg; // informative message about the lib pairs found
! 		CreateLibraryImage(mgaproject, lw, libimgroot, accept_old_lib, &is_old_lib, top_libs, dep_libs, infmsg);
  		if( lw.isOptimized() && infmsg && infmsg.Length() > 0) // informative message about possible guid duplications in the library
  			reporter.show( infmsg, false);
***************
*** 569,579 ****
  		assignnewchild(libimgroot);
  
! 		if( idlist && idlist.Length() > 0)
  		{
! 			Ozer::addIncludes( libimgroot, idlist);
! 		}
! 
  
! 		lw.flatten( self, libimgroot);
  
  		docheck(mgaproject);
--- 569,581 ----
  		assignnewchild(libimgroot);
  
! 		if( lw.isOptimized())
  		{
! 			// more libraries factored out
! 			lw.flatten( self, libimgroot, dep_libs);
  
! 			// store dependency info on factored out libs
! 			Ozer::createDeps( libimgroot, dep_libs);
! 		}
! 		else ASSERT( dep_libs.empty());
  
  		docheck(mgaproject);
***************
*** 819,825 ****
  			bool accept_old_lib( true); // refreshment of an old format MGA file is allowed
  			bool is_old_lib_copy( false);
! 			CComBSTR idlist;
  			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);
--- 821,827 ----
  			bool accept_old_lib( true); // refreshment of an old format MGA file is allowed
  			bool is_old_lib_copy( false);
! 			Typedefs::LIBVEC dep_libs; // those libraries which are factored out
  			CComBSTR infmsg;
! 			CreateLibraryImage(mgaproject, lw, libimgroot, accept_old_lib, &is_old_lib_copy, lib_results, dep_libs, infmsg);
  			if( lw.isOptimized() && infmsg && infmsg.Length() > 0) // informative message about possible guid duplications in the library
  				reporter.show( infmsg, false);
***************
*** 828,840 ****
  			libimgroot[ATTRID_RELID] = self[ATTRID_RELID];
  
- 			if( idlist && idlist.Length() > 0)
- 			{
- 				Ozer::addIncludes( libimgroot, idlist);
- 
- 				// need to replace the id of self to the id of libimgroot
- 				// in included libraries' 'IncludedBy' regnode
- 				// actually self's id needs to be removed only
- 			}
- 
  			if( is_old_lib_copy) // do a plain old refresh
  			{
--- 830,833 ----
***************
*** 863,874 ****
  
  				// remove from all included libraries the 'dependent on self' info
! 				// it does something only in No-optimized refresh case !!!
  				Ozer::copyIncludedBy( self, libimgroot);
- 				Ozer::syncAllLibPeers( mgaproject, corerf, self, libimgroot, false);
- 				Ozer::syncAllLibPeers( mgaproject, corerf, self, libimgroot, true);
  
  				inDeleteObject();
  
! 				lw.flatten( corerf, libimgroot);
  
  				try {
--- 856,875 ----
  
  				// remove from all included libraries the 'dependent on self' info
! 				Ozer::cutInclusions( corerf, self);
! 				// including libraries of self will continue to include the newself (=libimgroot)
! 				// but we need to copy the includedness of self into newself
  				Ozer::copyIncludedBy( self, libimgroot);
  
  				inDeleteObject();
  
! 				if( lw.isOptimized())
! 				{
! 					// more libraries factored out
! 					lw.flatten( corerf, libimgroot, dep_libs);
! 
! 					// store dependency info on factored out libs
! 					Ozer::createDeps( libimgroot, dep_libs);
! 				} 
! 				else ASSERT( dep_libs.empty());
  
  				try {
***************
*** 1086,1091 ****
  
  // static
! void LibImgHelper::groupTheLibs( CoreObj&              p_container
!                                , Typedefs::LIBMAP&     p_results)
  {
  	for( Typedefs::LIBMAP_ITER it = p_results.begin(), endit = p_results.end(); it != endit; ++it)
--- 1087,1093 ----
  
  // static
! void LibImgHelper::ungroupLibs( CoreObj&              p_container
!                               , Typedefs::LIBMAP&     p_results
!                               , Typedefs::LIBVEC&     p_depLibs)
  {
  	for( Typedefs::LIBMAP_ITER it = p_results.begin(), endit = p_results.end(); it != endit; ++it)
***************
*** 1103,1114 ****
  				librf[ATTRID_FCOPARENT] = p_container;
  
! 				// save the dependency info
! 				Ozer::addIncludedBy( librf, id2);
! 
! 				CComBSTR id3;
! 				LibImgHelper::GetItsGuid( librf, &id3);
  
! 				// save the includes info
! 				Ozer::addIncludes( librfparent, id3);
  			}
  		}
--- 1105,1116 ----
  				librf[ATTRID_FCOPARENT] = p_container;
  
! 				// take off the Library (ro) flag!
! 				librf[ATTRID_PERMISSIONS] = librf[ATTRID_PERMISSIONS] & ~LIBRARY_FLAG;
  
! 				// collect more dependency info
! 				// this librf will depend on 'self'
! 				// = will be marked 'included by me'
! 				if( p_depLibs.end() == std::find( p_depLibs.begin(), p_depLibs.end(), librf))
! 					p_depLibs.push_back( librf);
  			}
  		}
***************
*** 1117,1121 ****
  
  void LibWorker::flatten( CoreObj&     p_rootfolder
!                        , CoreObj&     p_libimgroot)
  {
  	if( m_optimized)
--- 1119,1124 ----
  
  void LibWorker::flatten( CoreObj&     p_rootfolder
!                        , CoreObj&     p_libimgroot
!                        , Typedefs::LIBVEC& p_depLibs)
  {
  	if( m_optimized)
***************
*** 1123,1127 ****
  		Typedefs::LIBMAP results;
  		LibImgHelper::recordLibs( true, p_libimgroot, results);
! 		LibImgHelper::groupTheLibs( p_rootfolder, results);
  	}
  }
--- 1126,1130 ----
  		Typedefs::LIBMAP results;
  		LibImgHelper::recordLibs( true, p_libimgroot, results);
! 		LibImgHelper::ungroupLibs( p_rootfolder, results, p_depLibs);
  	}
  }
***************
*** 1198,1231 ****
  
  //static 
! void LibImgHelper::createDeps( CoreObj&                      p_libImageRoot
!                              , Typedefs::LIBPAIRVEC&         p_matchingLibs
                               , Reporter&                     p_reporter
!                              , CComBSTR&                     p_includedIdList)
  {
- 	CComBSTR id_of_toplib;
- 	FCO*     libimgroot2    = ObjForCore( p_libImageRoot);
- 
- 	if( libimgroot2) LibImgHelper::GetItsGuid( p_libImageRoot, &id_of_toplib);
- 	else             throw hresult_exception( -1);
- 
  	for( Typedefs::LIBPAIRVEC::iterator iiit = p_matchingLibs.begin(), eeen = p_matchingLibs.end(); iiit != eeen; ++iiit)
  	{
  		try
  		{
! 			Ozer::addIncludedBy( iiit->second, id_of_toplib);
! 
! 			//
! 			// put the 'includes' information into the toplib also
! 			CComBSTR id_of_innerlib;
! 			FCO* s = ObjForCore( iiit->second);
! 			if( s) LibImgHelper::GetItsGuid( iiit->second, &id_of_innerlib);
! 			else throw hresult_exception( -1);
  
- 			// 
- 			// currently store it in a string only
- 			// (registry of libimgroot is not available yet because its parent is not set)
- 			if( p_includedIdList && p_includedIdList.Length() > 0) 
- 				p_includedIdList.Append( L"\n");
- 			p_includedIdList.AppendBSTR( id_of_innerlib);
  		} 
  		catch( ... ) 
--- 1201,1216 ----
  
  //static 
! void LibImgHelper::collectDep( Typedefs::LIBPAIRVEC&         p_matchingLibs
                               , Reporter&                     p_reporter
!                              , Typedefs::LIBVEC&             p_dependentLibs)
  {
  	for( Typedefs::LIBPAIRVEC::iterator iiit = p_matchingLibs.begin(), eeen = p_matchingLibs.end(); iiit != eeen; ++iiit)
  	{
  		try
  		{
! 			// collect second parameters of the matching map into the library vector
! 			if( p_dependentLibs.end() == std::find( p_dependentLibs.begin(), p_dependentLibs.end(), iiit->second))
! 				p_dependentLibs.push_back( iiit->second);
  
  		} 
  		catch( ... ) 
***************
*** 1370,1447 ****
  }
  
- // removes relation to one library, add relation to another
- bool Ozer::AlterRelation::operator() ( CoreObj& p_library)
- {
- 	bool lib_freed = false;
- 	bool all_right = Ozer::loseRelation( p_library, m_libIdToRemove, m_incOrIncBy, lib_freed);
- 
- 	if( !m_incOrIncBy && all_right)
- 		all_right = Ozer::addIncludes( p_library, m_lidIdToAdd);
- 
- 	return all_right;
- }
- 
- // take all peers listed as Includes or IncludedBy
- // and synchronize to the new lib id, replacing the old lib id
- void Ozer::syncAllLibPeers( CMgaProject* p_mgaproject
-                           , CoreObj&     p_rootfolder
-                           , CoreObj&     p_libimgroot
-                           , CoreObj&     p_newlibimgroot
-                           , bool         p_depsOrIncs)
- {
- 	CComBSTR valb;
- 	if( p_depsOrIncs) Ozer::StorageMgr::getIncludes( p_libimgroot, valb);
- 	else              Ozer::StorageMgr::getIncludedBy( p_libimgroot, valb);
- 
- 	if( valb && valb.Length() > 0)
- 	{
- 		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
- 		// and will get a new referral to p_newlibimgroot (in case of the
- 		// inclusions)
- 
- 		// function object declared 
- 		AlterRelation doAlter( lib_id_to_remove, lib_id_to_add, p_depsOrIncs);
- 
- 		for( Ozer::DependentIterator it( valb); !it.isDone(); it.next())
- 		{
- 			CComBSTR current_val = it.getCurrentBstr();
- 			CoreObj lib;
- 			if( lib = SearchTool::findTopLibrary( p_rootfolder, current_val))
- 			{
- 				try {
- 					if( !doAlter( lib)) // went wrong
- 						throw hresult_exception( -1);
- 				} catch( hresult_exception& ) {
- 					CComBSTR msg;
- 					msg.Append( L"Exception while updating library dependency info of ");
- 					msg.Append( current_val);
- 					msg.Append( L" library!");
- 					Reporter( p_mgaproject).show( msg);
- 					ASSERT(0); // lib might be a zombie
- 				}
- 			}
- 		}
- 	}
- }
- 
  bool Ozer::loseRelation  ( CoreObj&          p_fldCore
                           , const CComBSTR&   p_idToRemoveFromReg
!                          , bool              p_incOrIncBy
                           , bool&             p_libraryBecameFree)
  {
  	bool all_right     = false;
! 	long prm           = p_fldCore[ATTRID_PERMISSIONS];
  	CComBSTR valb;
  
! 	p_fldCore[ATTRID_PERMISSIONS] = prm & ~READONLY_FLAG;
! 	if( p_incOrIncBy) Ozer::StorageMgr::getIncludedBy( p_fldCore, valb);
  	else              Ozer::StorageMgr::getIncludes( p_fldCore, valb);
! 	p_fldCore[ATTRID_PERMISSIONS] = prm;
  
  	if( valb && valb.Length() > 0)
--- 1355,1371 ----
  }
  
  bool Ozer::loseRelation  ( CoreObj&          p_fldCore
                           , const CComBSTR&   p_idToRemoveFromReg
!                          , bool              p_incByOrInc
                           , bool&             p_libraryBecameFree)
  {
  	bool all_right     = false;
! 	//long prm           = p_fldCore[ATTRID_PERMISSIONS];
  	CComBSTR valb;
  
! 	//p_fldCore[ATTRID_PERMISSIONS] = prm & ~READONLY_FLAG;
! 	if( p_incByOrInc) Ozer::StorageMgr::getIncludedBy( p_fldCore, valb);
  	else              Ozer::StorageMgr::getIncludes( p_fldCore, valb);
! 	//p_fldCore[ATTRID_PERMISSIONS] = prm;
  
  	if( valb && valb.Length() > 0)
***************
*** 1450,1462 ****
  		{
  			// save modified value back
! 			p_fldCore[ATTRID_PERMISSIONS] = prm & ~READONLY_FLAG;
! 			if( p_incOrIncBy) Ozer::StorageMgr::setIncludedBy( p_fldCore, valb);
  			else              Ozer::StorageMgr::setIncludes( p_fldCore, valb);
! 			p_fldCore[ATTRID_PERMISSIONS] = prm;
  
  			if( valb.Length() == 0) // library became free
  			{
  				// let's take off the read-only flag
! 				p_fldCore[ATTRID_PERMISSIONS] = prm & ~READONLY_FLAG;
  				p_libraryBecameFree = true;
  			}
--- 1374,1386 ----
  		{
  			// save modified value back
! 			//p_fldCore[ATTRID_PERMISSIONS] = prm & ~READONLY_FLAG;
! 			if( p_incByOrInc) Ozer::StorageMgr::setIncludedBy( p_fldCore, valb);
  			else              Ozer::StorageMgr::setIncludes( p_fldCore, valb);
! 			//p_fldCore[ATTRID_PERMISSIONS] = prm;
  
  			if( valb.Length() == 0) // library became free
  			{
  				// let's take off the read-only flag
! 				//p_fldCore[ATTRID_PERMISSIONS] = prm & ~READONLY_FLAG;
  				p_libraryBecameFree = true;
  			}
***************
*** 1472,1528 ****
  }
  
! bool Ozer::addIncludes( CoreObj&           p_fldCore
!                       , const CComBSTR&    p_idToAddToReg)
  {
- 	long prm        = p_fldCore[ATTRID_PERMISSIONS];
- 
  	// take off the Library (ro) flag
! 	p_fldCore[ATTRID_PERMISSIONS] = prm & ~LIBRARY_FLAG & ~READONLY_FLAG;
  
! 	// registry asked about 'Includes' info
! 	// might create the node if not existing
  	CComBSTR valu;
! 	Ozer::StorageMgr::getIncludes( p_fldCore, valu);
  	
! 	// registry altered to show which library is logically included by this one (this depends on that)
  	if( valu && valu.Length() > 0) valu.Append( L"\n");
  	valu.AppendBSTR( p_idToAddToReg); // p_idToAddToReg might be a list of ids !!!
  
  	// save value
! 	Ozer::StorageMgr::setIncludes( p_fldCore, valu);
  
  	// set saved perm values back
! 	p_fldCore[ATTRID_PERMISSIONS] = prm;
! 
! 	return true;
! }
! 
! bool Ozer::addIncludedBy( CoreObj&            p_fldCore
!                         , const CComBSTR&     p_idToAddToReg)
! {
! 	long prm        = p_fldCore[ATTRID_PERMISSIONS];
! 
! 	// take off the Library (ro) flag
! 	p_fldCore[ATTRID_PERMISSIONS] = prm & ~LIBRARY_FLAG & ~READONLY_FLAG;
! 
! 	// registry asked about 'IncludedBy' info
! 	// might create the node if not existing
! 	CComBSTR valu;
! 	Ozer::StorageMgr::getIncludedBy( p_fldCore, valu);
! 	
! 	// alter value
! 	if( valu && valu.Length() > 0) valu.Append( L"\n");
! 	valu.AppendBSTR( p_idToAddToReg);
! 
! 	// registry altered to show which library includes this one (depends of me)
! 	// save value
! 	Ozer::StorageMgr::setIncludedBy( p_fldCore, valu);
! 
! 	// alter permission values finally: READONLY applied, LIBRARY_FLAG unset
! 	// MODIF:
! 	// don't apply any readonly flag for now this way we allow 
! 	// refresh for such included libraries as well
! 	// 
! 	//p_fldCore[ATTRID_PERMISSIONS] = prm & ~LIBRARY_FLAG | READONLY_FLAG;
  
  	return true;
--- 1396,1422 ----
  }
  
! bool Ozer::addRelation( CoreObj&           p_fldCore
!                       , const CComBSTR&    p_idToAddToReg
!                       , bool               p_incByOrInc)
  {
  	// take off the Library (ro) flag
! 	//long prm        = p_fldCore[ATTRID_PERMISSIONS];
! 	//p_fldCore[ATTRID_PERMISSIONS] = prm & ~LIBRARY_FLAG & ~READONLY_FLAG;
  
! 	// registry asked about 'IncludedBy/s' info
  	CComBSTR valu;
! 	if( p_incByOrInc) Ozer::StorageMgr::getIncludedBy( p_fldCore, valu);
! 	else              Ozer::StorageMgr::getIncludes( p_fldCore, valu);
  	
! 	// value appended
  	if( valu && valu.Length() > 0) valu.Append( L"\n");
  	valu.AppendBSTR( p_idToAddToReg); // p_idToAddToReg might be a list of ids !!!
  
  	// save value
! 	if( p_incByOrInc) Ozer::StorageMgr::setIncludedBy( p_fldCore, valu);
! 	else              Ozer::StorageMgr::setIncludes( p_fldCore, valu);
  
  	// set saved perm values back
! 	//p_fldCore[ATTRID_PERMISSIONS] = prm;
  
  	return true;
***************
*** 1575,1581 ****
  		Ozer::StorageMgr::setIncludedBy( p_newLib, list);
  	}
  
! 	// what about refreshing the idlist of these containing libs?
  }
  
  void Ozer::StorageMgr::writer( CoreObj&                p_fldCore
--- 1469,1521 ----
  		Ozer::StorageMgr::setIncludedBy( p_newLib, list);
  	}
+ }
  
! // remove IncludedBy dependency reference from included 
! // libraries of oldlib, the new lib will add again
! // dependency reference for its own included libraries
! // (i.e. some libraries may be deleted from a new 
! // version of a library, in such cases some of the old
! // included ones become 'free' or 'freelancers')
! void Ozer::cutInclusions( CoreObj&     p_rootfolder
!                         , CoreObj&     p_oldLib)
! {
! 	CComBSTR list;
! 	Ozer::StorageMgr::getIncludes( p_oldLib, list);
! 	if( list && list.Length() > 0) // save info if not empty
! 	{
! 		CComBSTR oldlib_guid;
! 		LibImgHelper::GetItsGuid( p_oldLib, &oldlib_guid);
! 
! 		for( DependentIterator it( list); !it.isDone(); it.next())
! 		{
! 			CoreObj lib_i;
! 			if( lib_i = SearchTool::findTopLibrary( p_rootfolder, it.getCurrentBstr()))
! 			{
! 				// remove lib_i's IncludedBy reference to oldlib
! 				bool free;
! 				Ozer::loseRelation( lib_i, oldlib_guid, true, free);
! 			}
! 		}
! 	}
  }
+ 
+ // recreate the dependencies based on the vector of 
+ // factored-out ( = dependent = included) libraries
+ void Ozer::createDeps( CoreObj&          p_mainLib
+                      , Typedefs::LIBVEC& p_depnLibs)
+ {
+ 	CComBSTR m_gd;
+ 	LibImgHelper::GetItsGuid( p_mainLib, &m_gd);
+ 
+ 	for( Typedefs::LIBVEC_ITER i = p_depnLibs.begin(), e = p_depnLibs.end(); i != e; ++i)
+ 	{
+ 		CComBSTR i_gd;
+ 		LibImgHelper::GetItsGuid( *i, &i_gd);
+ 
+ 		Ozer::addRelation( p_mainLib, i_gd, false); // includes, p_mainLib includes a lib with i_gd
+ 		Ozer::addRelation( *i,        m_gd, true);  // includedBy, *i is included by a lib with m_gd
+ 	}
+ }
+ 
  
  void Ozer::StorageMgr::writer( CoreObj&                p_fldCore

Index: MgaLibOps.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Mga/MgaLibOps.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** MgaLibOps.h	7 Mar 2007 22:09:37 -0000	1.8
--- MgaLibOps.h	8 Mar 2007 19:24:33 -0000	1.9
***************
*** 457,480 ****
  protected:
  
- 	class AlterRelation
- 	{
- 		const CComBSTR& m_libIdToRemove;
- 		const CComBSTR& m_lidIdToAdd;
- 		const bool      m_incOrIncBy;
- 	public:
- 		AlterRelation( const CComBSTR&           p_lib_id_to_remove
- 		             , const CComBSTR&           p_lib_id_to_add
- 		             , bool                      p_incOrIncBy)
- 		    : m_libIdToRemove( p_lib_id_to_remove)
- 		    , m_lidIdToAdd   ( p_lib_id_to_add)
- 		    , m_incOrIncBy   ( p_incOrIncBy)
- 		{}
- 
- 		bool operator() ( CoreObj& p_library);
- 	};
- 
  	static bool removeFromList( const CComBSTR&     p_erasableVal
  	                          ,       CComBSTR&     p_valueList);
  
  public:
  
--- 457,472 ----
  protected:
  
  	static bool removeFromList( const CComBSTR&     p_erasableVal
  	                          ,       CComBSTR&     p_valueList);
  
+ 	static bool addRelation( CoreObj&             p_fldCore
+ 	                       , const CComBSTR&      p_idToAddToReg
+ 	                       , bool                 p_incByOrInc);
+ 
+ 	static bool loseRelation  ( CoreObj&          p_fldCore
+ 	                          , const CComBSTR&   p_idToRemoveFromReg
+ 	                          , bool              p_incByOrInc
+ 	                          , bool&             p_libraryBecameFree);
+ 
  public:
  
***************
*** 498,522 ****
  	};
  
! 	static bool addIncludedBy( CoreObj&            p_fldCore
!                              , const CComBSTR&     p_idToAddToReg);
! 
! 	static bool addIncludes( CoreObj&              p_fldCore
!                            , const CComBSTR&       p_idToAddToReg);
  
- 	static bool loseRelation  ( CoreObj&          p_fldCore
- 	                          , const CComBSTR&   p_idToRemoveFromReg
- 	                          , bool              p_incOrIncBy
- 	                          , bool&             p_libraryBecameFree);
  
! 	static bool isIncluded( CoreObj&  p_fldCore);
  
  	static void copyIncludedBy( CoreObj&     p_oldLib
  	                          , CoreObj&     p_newLib);
  
! 	static void syncAllLibPeers( CMgaProject* p_mgaproject
! 	                           , CoreObj&     p_rootfolder
! 	                           , CoreObj&     p_libimgroot
! 	                           , CoreObj&     p_newlibimgroot
! 	                           , bool         p_depsOrIncs);
  
  };
--- 490,504 ----
  	};
  
! 	static bool isIncluded( CoreObj&  p_fldCore);
  
  
! 	static void cutInclusions( CoreObj&     p_rootfld
! 	                         , CoreObj&     p_oldLib);
  
  	static void copyIncludedBy( CoreObj&     p_oldLib
  	                          , CoreObj&     p_newLib);
  
! 	static void createDeps( CoreObj&            p_lib
! 	                      , Typedefs::LIBVEC&   p_deps);
  
  };
***************
*** 542,547 ****
  
  	void flatten( CoreObj&     p_rootfolder
!                 , CoreObj&     p_libimgroot);
! 
  };
  
--- 524,529 ----
  
  	void flatten( CoreObj&     p_rootfolder
! 	            , CoreObj&     p_libimgroot
! 	            , Typedefs::LIBVEC& p_depLibs);
  };
  
***************
*** 585,595 ****
  	                                 , Reporter&                p_reporter);
  
! 	static void createDeps( CoreObj&                      p_libImageRoot
! 	                      , Typedefs::LIBPAIRVEC&         p_matchingInfo
  	                      , Reporter&                     p_reporter
! 	                      , CComBSTR&                     p_includedIdList);
  
! 	static void groupTheLibs( CoreObj&              p_container
! 	                        , Typedefs::LIBMAP&     p_results);
  
  	static void recordLibs( bool               p_recordAllLibs
--- 567,577 ----
  	                                 , Reporter&                p_reporter);
  
! 	static void collectDep( Typedefs::LIBPAIRVEC&         p_matchingInfo
  	                      , Reporter&                     p_reporter
! 	                      , Typedefs::LIBVEC&             p_depLibs);
  
! 	static void ungroupLibs( CoreObj&              p_container
! 	                       , Typedefs::LIBMAP&     p_results
! 	                       , Typedefs::LIBVEC&     p_depLibs);
  
  	static void recordLibs( bool               p_recordAllLibs



More information about the GME-commit mailing list