[GME-commit]
GMESRC/Paradigms/MetaGME/BonExtension/Rep Dumper.cpp,1.15,1.16
FCO.cpp,1.20,1.21 FCO.h,1.14,1.15
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Mon Sep 26 21:26:25 CDT 2005
Update of /project/gme-repository/GMESRC/Paradigms/MetaGME/BonExtension/Rep
In directory escher:/tmp/cvs-serv5209/Rep
Modified Files:
Dumper.cpp FCO.cpp FCO.h
Log Message:
More flexibility in BonX. Captured as option added.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: FCO.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/Paradigms/MetaGME/BonExtension/Rep/FCO.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** FCO.cpp 17 Jun 2005 18:29:57 -0000 1.20
--- FCO.cpp 26 Sep 2005 20:26:23 -0000 1.21
***************
*** 406,409 ****
--- 406,410 ----
{
m_extedAnc = ptr;
+ if( ptr) ptr->addNonExtedDesc( this);
}
***************
*** 418,422 ****
{
ASSERT( ptr);
! m_nonExtedDescs.push_back( ptr);
}
--- 419,424 ----
{
ASSERT( ptr);
! if( m_nonExtedDescs.end() == std::find( m_nonExtedDescs.begin(), m_nonExtedDescs.end(), ptr))
! m_nonExtedDescs.push_back( ptr);
}
***************
*** 440,443 ****
--- 442,459 ----
}
+ FCO* FCO::findRspPtr( const std::string& responsible)
+ {
+ FCO* found_anc = 0;
+ std::vector<FCO *> ancestor;
+ getIntAncestors( ancestor);
+
+ for( unsigned int i = 0; !found_anc && i < ancestor.size(); ++i)
+ {
+ if( getMyKind() == ancestor[i]->getMyKind() && ancestor[i]->getName() == responsible) // it is the same kind that fco_ptr
+ found_anc = ancestor[i];
+ }
+
+ return found_anc; // it is a valid ancestor or 0
+ }
void FCO::setAncestors( INHERITANCE_TYPE type, const std::vector<FCO*> &anc_list)
Index: FCO.h
===================================================================
RCS file: /project/gme-repository/GMESRC/Paradigms/MetaGME/BonExtension/Rep/FCO.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** FCO.h 30 Jul 2004 00:37:49 -0000 1.14
--- FCO.h 26 Sep 2005 20:26:23 -0000 1.15
***************
*** 135,138 ****
--- 135,139 ----
void setExtedAnc( FCO * ptr);
FCO * getExtedAnc() const;
+ FCO* findRspPtr( const std::string& responsible);
// adds a non-extended descendant which has to be included in the IMPLEMENT_BONEXT macro (its kind name)
Index: Dumper.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/Paradigms/MetaGME/BonExtension/Rep/Dumper.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Dumper.cpp 31 Dec 2004 19:51:20 -0000 1.15
--- Dumper.cpp 26 Sep 2005 20:26:23 -0000 1.16
***************
*** 591,597 ****
std::string regVal = (*it_b)->getMyRegistry()->getValueByPath( "/Configs/Default");
if ( regVal == "false")
! last_id = sc.addEntry( name, 0, false, *it_b);
else
! last_id = sc.addEntry( name, 0, true, *it_b);
}
--- 591,597 ----
std::string regVal = (*it_b)->getMyRegistry()->getValueByPath( "/Configs/Default");
if ( regVal == "false")
! last_id = sc.addEntry( name, 'f', 0, false, "", *it_b);
else
! last_id = sc.addEntry( name, 'f', 0, true, "", *it_b);
}
***************
*** 599,608 ****
{
CString name = (*it)->getName().c_str();
int clique = (*it)->getCliqueId( FCO::INTERFACE);
std::string regVal = (*it)->getMyRegistry()->getValueByPath( "/Configs/Default");
! if ( regVal == "false")
! last_id = sc.addEntry( name, clique, false, *it);
! else
! last_id = sc.addEntry( name, clique, true, *it);
}
--- 599,616 ----
{
CString name = (*it)->getName().c_str();
+ const char kinds[] = "AMCSRF f";
+ char kind = ' ';
+ if( (int) (*it)->getMyKind() < sizeof(kinds)/sizeof(char))
+ kind = kinds[(int) (*it)->getMyKind()];
int clique = (*it)->getCliqueId( FCO::INTERFACE);
std::string regVal = (*it)->getMyRegistry()->getValueByPath( "/Configs/Default");
! std::string rspVal = (*it)->getMyRegistry()->getValueByPath( "/Configs/Default/Resp");
! if( !(*it)->findRspPtr( rspVal)) // valid info in Responsible registry?
! {
! rspVal = "";
! (*it)->getMyRegistry()->setValueByPath( "/Configs/Default/Resp", rspVal);
! }
!
! last_id = sc.addEntry( name, kind, clique, regVal != "false", rspVal.c_str(), *it);
}
***************
*** 618,622 ****
for( std::vector< FCO *>::iterator it = s.begin(); it != s.end(); ++it)
{
! if ( !(*it)->isToBeEx() && (*it)->isFCO())
{
int my_level = (*it)->getLevel( FCO::INTERFACE);
--- 626,630 ----
for( std::vector< FCO *>::iterator it = s.begin(); it != s.end(); ++it)
{
! /*if ( !(*it)->isToBeEx() && (*it)->isFCO())
{
int my_level = (*it)->getLevel( FCO::INTERFACE);
***************
*** 642,646 ****
selected_extended_anc->addNonExtedDesc( *it);
}
! }
}
}
--- 650,654 ----
selected_extended_anc->addNonExtedDesc( *it);
}
! }*/
}
}
More information about the GME-commit
mailing list