[GME-commit] GMESRC/Paradigms/MetaGME/BonExtension/Rep AttributeRep.cpp,1.5,1.6 AttributeRep.h,1.3,1.4 Dumper.cpp,1.8,1.9 FCO.cpp,1.7,1.8 FCO.h,1.7,1.8

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Wed Mar 10 11:42:18 CST 2004


Update of /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep
In directory braindrain:/tmp/cvs-serv942

Modified Files:
	AttributeRep.cpp AttributeRep.h Dumper.cpp FCO.cpp FCO.h 
Log Message:
Attributes: useless methods removed
FCO: finalAttribute eliminated
FCO::prepareAttribute: sort initial attributes, thus typedefs will be generated in order.
Modified Files:
 	AttributeRep.cpp AttributeRep.h Dumper.cpp FCO.cpp FCO.h 


CVS User: zolmol

Index: AttributeRep.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/AttributeRep.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AttributeRep.cpp	10 Mar 2004 02:50:18 -0000	1.5
--- AttributeRep.cpp	10 Mar 2004 17:42:16 -0000	1.6
***************
*** 57,91 ****
  }
  
- std::string AttributeRep::dumpHelp()
- {
- 	std::string mmm;
- 	BON::FCO bon_ptr = static_cast<BON::FCO>(this->m_ptr);
- 	std::string help = bon_ptr->getAttribute("Help")->getStringValue();
- 	if( !help.empty())
- 		mmm += indStr() + "<regnode name=\"help\" value = \"" + help + "\"></regnode>\n";
- 
- 	return mmm;
- }
- 
- 
- void AttributeRep::getXY( unsigned int * x, unsigned int * y) const
- {
- 	BON::Atom bon_ptr = static_cast<BON::Atom>(this->m_ptr);
- 
- 	BON::Point p = bon_ptr->getRegistry()->getLocation("Visualization");
- 	*x = p.first;
- 	*y = p.second;
- }
- 
- 
- bool AttributeRep::lessThan( const AttributeRep * rep) const
- {
- 	unsigned int x, y;
- 	unsigned int rep_x, rep_y;
- 	getXY( &x, &y);
- 	rep->getXY( &rep_x, &rep_y);
- 	return ( y < rep_y || (y == rep_y && x < rep_x ));
- }
- 
  
  void AttributeRep::addOwner( FCO * owner)
--- 57,60 ----
***************
*** 231,234 ****
--- 200,204 ----
  }
  
+ 
  /*virtual*/ std::string EnumAttributeRep::getMethodName()
  {
***************
*** 237,247 ****
  }
  
- /*std::string EnumAttributeRep::doDumpAttrHdr()
- {
- 	std::string hdr;
- 	hdr = "  virtual std::string " + getMethodName() + "();\n";
- 
- 	return hdr;
- }*/
  
  Method EnumAttributeRep::createMethodForAttr( FCO * container)
--- 207,210 ----
***************
*** 311,314 ****
--- 274,278 ----
  }
  
+ 
  /*virtual*/ std::string EnumAttributeRep::doDumpErroneousAttrHdr()
  {
***************
*** 322,325 ****
--- 286,290 ----
  }
  
+ 
  /*virtual*/ std::string EnumAttributeRep::doDumpErroneousAttrSrc( FCO*)
  {
***************
*** 327,330 ****
--- 292,296 ----
  }
  
+ 
  /*virtual*/ std::string BoolAttributeRep::getMethodName()
  {
***************
*** 333,344 ****
  
  
- /*std::string BoolAttributeRep::doDumpAttrHdr()
- {
- 	std::string hdr;
- 	hdr = "  virtual bool " + getMethodName() + "();\n";
- 
- 	return hdr;
- }*/
- 
  Method BoolAttributeRep::createMethodForAttr( FCO * container)
  {
--- 299,302 ----
***************
*** 358,361 ****
--- 316,320 ----
  }
  
+ 
  /*virtual*/ std::string BoolAttributeRep::doDumpErroneousAttrHdr()
  {
***************
*** 369,372 ****
--- 328,332 ----
  }
  
+ 
  /*virtual*/ std::string BoolAttributeRep::doDumpErroneousAttrSrc( FCO*)
  {
***************
*** 374,377 ****
--- 334,338 ----
  }
  
+ 
  /*virtual*/ std::string FieldAttributeRep::getMethodName()
  {
***************
*** 409,421 ****
  	return "global_vars.error";
  }
- 
- 
- /*std::string FieldAttributeRep::doDumpAttrHdr()
- {
- 	std::string hdr;
- 	hdr = "  virtual " + getTypeStr() + " " + getMethodName() + "();\n";
- 
- 	return hdr;
- }*/
  
  
--- 370,373 ----

Index: AttributeRep.h
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/AttributeRep.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AttributeRep.h	10 Mar 2004 02:50:18 -0000	1.3
--- AttributeRep.h	10 Mar 2004 17:42:16 -0000	1.4
***************
*** 31,37 ****
  	std::string getNameToUse();
  	virtual std::string getMethodName() = 0;
- 	std::string dumpHelp();
- 	void getXY( unsigned int * x, unsigned int *y) const;
- 	bool lessThan( const AttributeRep * rep) const;
  
  	void addOwner( FCO * owner_fco);
--- 31,34 ----

Index: Dumper.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/Dumper.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Dumper.cpp	10 Mar 2004 16:42:33 -0000	1.8
--- Dumper.cpp	10 Mar 2004 17:42:16 -0000	1.9
***************
*** 266,270 ****
  void Dumper::doDump()
  {
- 	// connections
  	AnyLexicographicSort lex;
  	std::sort( m_folderList.begin(),  m_folderList.end(), lex );
--- 266,269 ----
***************
*** 275,278 ****
--- 274,278 ----
  	std::sort( m_setList.begin(), m_setList.end(), lex );
  	std::sort( m_modelList.begin(), m_modelList.end(), lex );
+ 	// attributes sort by FCO::prepare
  
  	std::vector<FCO*> sorted = sortBasedOnLevels();
***************
*** 518,522 ****
  void Dumper::selConf( std::vector<FCO*>& s)
  {
! 		
  	std::vector< std::string > tmp,vec;
  	fetchConfigurationNames( tmp);
--- 518,522 ----
  void Dumper::selConf( std::vector<FCO*>& s)
  {
! 	CWaitCursor wait;	
  	std::vector< std::string > tmp,vec;
  	fetchConfigurationNames( tmp);
***************
*** 552,555 ****
--- 552,556 ----
  	if ( sc.DoModal() == IDOK)
  	{
+ 		wait.Restore();
  		if ( sc.m_currSelConfigStr != "Default")
  		{

Index: FCO.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/FCO.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** FCO.cpp	10 Mar 2004 02:50:18 -0000	1.7
--- FCO.cpp	10 Mar 2004 17:42:16 -0000	1.8
***************
*** 23,27 ****
  	, m_partOfFinal()
  	, m_initialAttributeList()
- 	, m_finalAttributeList()
  	, m_multipleBaseClasses()
  	, m_virtualBaseClasses()
--- 23,26 ----
***************
*** 51,55 ****
  	m_partOfFinal.clear();
  	m_initialAttributeList.clear();
- 	m_finalAttributeList.clear();
  
  	m_multipleBaseClasses.clear();
--- 50,53 ----
***************
*** 409,441 ****
  }
  
- 
- void FCO::addFinalAttribute( AttributeRep * attr)
- {
- 	AttributeRepPtrList_ConstIterator it = 
- 		std::find( m_finalAttributeList.begin(), m_finalAttributeList.end(), attr);
- 
- 	if ( it == m_finalAttributeList.end()) // not found so insert
- 		m_finalAttributeList.push_back( attr);
- 	/*else not an error because of multiple inheritance
- 		global_vars.err << attr->getName() << " attribute owned by " << getName() << " twice\n";*/
- }
- 
- 
- void FCO::addFinalAttributeList(const AttributeRepPtrList& t_list)
- {
- 	AttributeRepPtrList_ConstIterator it_pos = t_list.begin();
- 	for( ; it_pos != t_list.end(); ++it_pos)
- 		addFinalAttribute( *it_pos);
- }
- 
- bool FCO::findFinalAttributeBasedOnName( const std::string & name)
- {
- 	AttributeRepPtrList_Iterator it;
- 	it = m_finalAttributeList.begin();
- 	while( it != m_finalAttributeList.end() && !((*it)->getName() == name /*&& (*it)->isViewable()*/))
- 		++it;
- 	return ( it != m_finalAttributeList.end()); // if found
- }
- 
   
  std::vector<FCO *> FCO::getAllChildren() const
--- 407,410 ----
***************
*** 712,715 ****
--- 681,687 ----
  void FCO::prepareAttributes()
  {
+ 	AnyLexicographicSort lex;
+ 	std::sort( m_initialAttributeList.begin(), m_initialAttributeList.end(), lex);
+ 
  	AttributeRepPtrList_ConstIterator it = m_initialAttributeList.begin();
  	for( ; it != m_initialAttributeList.end(); ++it)

Index: FCO.h
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/FCO.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** FCO.h	10 Mar 2004 02:50:18 -0000	1.7
--- FCO.h	10 Mar 2004 17:42:16 -0000	1.8
***************
*** 142,149 ****
  	const AttributeRepPtrList& getInitialAttributeRepPtrList() const;
  
- 	void addFinalAttribute( AttributeRep * attr);
- 	void addFinalAttributeList(const AttributeRepPtrList& t_list);
- 	bool findFinalAttributeBasedOnName( const std::string & name);
- 
  	// dumpers
  
--- 142,145 ----
***************
*** 184,188 ****
  	// attributes
  	AttributeRepPtrList m_initialAttributeList;
- 	AttributeRepPtrList m_finalAttributeList;
  
  	// stores the direct descendant list according to 
--- 180,183 ----



More information about the GME-commit mailing list