[GME-commit] GMESRC/Paradigms/MetaGME/BonExtension/Rep Any.cpp, 1.16, 1.17 Any.h, 1.11, 1.12

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Thu Mar 8 16:54:51 CST 2007


Update of /project/gme-repository/GMESRC/Paradigms/MetaGME/BonExtension/Rep
In directory escher:/tmp/cvs-serv18116/BonExtension/Rep

Modified Files:
	Any.cpp Any.h 
Log Message:
Nested libraries caused some problems
for namespace init & registry write operations.

Nested libraries will have a fake parentFolder, will be set to the main rootfolder.



CVS User: Zoltan Molnar, ISIS (zolmol)

Index: Any.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/Paradigms/MetaGME/BonExtension/Rep/Any.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** Any.cpp	22 Sep 2006 16:05:47 -0000	1.16
--- Any.cpp	8 Mar 2007 22:54:49 -0000	1.17
***************
*** 97,109 ****
  		else
  		{
! 			// if object is from a library its m_parentFolder variable holds the librootfolder (a readwriteable object)
! 			ASSERT( !m_parentFolder->isInLibrary());
! 			BON::Folder parent( m_parentFolder);
! 			while( parent && parent->isInLibrary()) {
! 				parent = parent->getParentFolder();
! 			} // the first parent which is not in the library is the LibRootFolder
! 
! 			BON::RegistryNode rn;
! 			if( parent)	rn = parent->getRegistry()->getChild( "Namespace");
  
  			if( rn)	m_namespace = rn->getValue();
--- 97,103 ----
  		else
  		{
! 			// find the Namespace value from the namespace holding rootfolder
! 			// in case of nested libs m_libRootFolder and m_nmspRootFolder are !equal
! 			BON::RegistryNode rn = m_nmspRootFolder->getRegistry()->getChild( "Namespace");
  
  			if( rn)	m_namespace = rn->getValue();

Index: Any.h
===================================================================
RCS file: /project/gme-repository/GMESRC/Paradigms/MetaGME/BonExtension/Rep/Any.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Any.h	22 Sep 2006 16:05:47 -0000	1.11
--- Any.h	8 Mar 2007 22:54:49 -0000	1.12
***************
*** 119,123 ****
  
  	BON::Folder getParentFolder() const { return m_parentFolder; }
! 	void setParentFolder( const BON::Folder& folder) { m_parentFolder = folder; }
  	void setEquivPeers( const std::set< BON::FCO >& ps) { m_equivs = ps; } 
  
--- 119,123 ----
  
  	BON::Folder getParentFolder() const { return m_parentFolder; }
! 	void setParentFolder( const BON::Folder& writableRegFolder, const BON::Folder& nmspHolderFolder) { m_parentFolder = writableRegFolder; m_nmspRootFolder = nmspHolderFolder;}
  	void setEquivPeers( const std::set< BON::FCO >& ps) { m_equivs = ps; } 
  
***************
*** 172,175 ****
--- 172,179 ----
  	// pointer of the parent folder
  	BON::Folder m_parentFolder;
+ 
+ 	// namespace info taken from this folder
+ 	// typically same with m_parentFolder
+ 	BON::Folder m_nmspRootFolder;
  
  	// equivalent peers



More information about the GME-commit mailing list