[GME-commit]
GMESRC/Paradigms/MetaGME/BonExtension/Rep Dumper.cpp,1.7,1.8
FolderRep.cpp,1.6,1.7 FolderRep.h,1.3,1.4 Method.cpp,1.4,1.5
SetRep.cpp,1.5,1.6 SetRep.h,1.3,1.4
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Wed Mar 10 10:42:36 CST 2004
- Previous message: [GME-commit]
GMESRC/Paradigms/UML UML.xmp,1.5,1.6 UMLMeta.xme,1.2,1.3
- Next message: [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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep
In directory braindrain:/tmp/cvs-serv704
Modified Files:
Dumper.cpp FolderRep.cpp FolderRep.h Method.cpp SetRep.cpp
SetRep.h
Log Message:
Reintroduced FolderMembership and SetMembership extension.
Modified Files:
Dumper.cpp FolderRep.cpp FolderRep.h Method.cpp SetRep.cpp SetRep.h
CVS User: zolmol
Index: Dumper.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/Dumper.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Dumper.cpp 10 Mar 2004 02:50:18 -0000 1.7
--- Dumper.cpp 10 Mar 2004 16:42:33 -0000 1.8
***************
*** 69,72 ****
--- 69,81 ----
(*conn_iter)->inherit();
+ // task 4 - for all sets on the sheet
+ SetRep_Iterator set_iter( m_setList.begin());
+ for( ; set_iter != m_setList.end(); ++set_iter)
+ (*set_iter)->extendMembership();
+
+ // task 5 folder element hierarchies
+ std::vector<FolderRep*>::iterator folder_iter( m_folderList.begin());
+ for( ; folder_iter != m_folderList.end(); ++folder_iter)
+ (*folder_iter)->extendMembership();
}
Index: FolderRep.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/FolderRep.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** FolderRep.cpp 10 Mar 2004 02:50:18 -0000 1.6
--- FolderRep.cpp 10 Mar 2004 16:42:33 -0000 1.7
***************
*** 80,83 ****
--- 80,106 ----
+ void FolderRep::extendMembership()
+ {
+ std::vector<FCO *> temp_list;
+ FCO_Iterator fco_it = m_fcoList.begin();
+ for( ; fco_it != m_fcoList.end(); ++fco_it)
+ {
+ FCO * fco_ptr = *fco_it;
+ std::vector<FCO*> descendants;
+ fco_ptr->getIntDescendants( descendants);
+ std::vector<FCO*>::iterator desc_it = descendants.begin();
+ for( ; desc_it != descendants.end(); ++desc_it)
+ {
+ FCO * new_member = *desc_it;
+ if ( temp_list.end() ==
+ std::find( temp_list.begin(), temp_list.end(), new_member)) // not found
+ temp_list.push_back( new_member);
+ }
+ }
+ // append the temp_list to the end of the fco_list
+ m_fcoList.insert( m_fcoList.end(), temp_list.begin(), temp_list.end());
+ }
+
+
void FolderRep::createMethods()
{
Index: FolderRep.h
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/FolderRep.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** FolderRep.h 10 Mar 2004 02:50:18 -0000 1.3
--- FolderRep.h 10 Mar 2004 16:42:33 -0000 1.4
***************
*** 53,56 ****
--- 53,58 ----
void addSubFolderRep( FolderRep * ptr, const std::string & card);
+ void extendMembership();
+
std::string doDump();
Index: Method.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/Method.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Method.cpp 10 Mar 2004 02:50:18 -0000 1.4
--- Method.cpp 10 Mar 2004 16:42:33 -0000 1.5
***************
*** 13,24 ****
}
Method::Method()
! : m_virtual( true),
! m_static( false),
! m_returnValue(),
! m_signature(),
! m_implementation(),
! m_comment(),
! m_container(0)
{ }
--- 13,25 ----
}
+
Method::Method()
! : m_virtual( true)
! , m_static( false)
! , m_returnValue()
! , m_signature()
! , m_implementation()
! , m_comment()
! , m_container(0)
{ }
***************
*** 27,34 ****
{
std::string ret_val = (m_virtual?"virtual ":"") + m_returnValue;
! int fill_size = ret_val.size() < 20? 20 - ret_val.size(): ret_val.size() < 32? 32-ret_val.size(): ret_val.size() < 44? 44-ret_val.size():1;
return CodeGen::indent(1) + ret_val + CodeGen::fill( fill_size) + m_signature + ";";
}
std::string Method::getSource()
{
--- 28,36 ----
{
std::string ret_val = (m_virtual?"virtual ":"") + m_returnValue;
! int fill_size = ret_val.size() < 20? 20 - ret_val.size(): ret_val.size() < 40? 40-ret_val.size(): ret_val.size() < 50? 50-ret_val.size():1;
return CodeGen::indent(1) + ret_val + CodeGen::fill( fill_size) + m_signature + ";";
}
+
std::string Method::getSource()
{
***************
*** 37,40 ****
--- 39,43 ----
}
+
std::string Method::getExposed()
{
***************
*** 42,45 ****
--- 45,49 ----
}
+
std::string Method::getHidden()
{
***************
*** 49,52 ****
--- 53,57 ----
}
+
Method::operator bool()
{
***************
*** 55,57 ****
else
return false;
! }
\ No newline at end of file
--- 60,63 ----
else
return false;
! }
!
Index: SetRep.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/SetRep.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SetRep.cpp 10 Mar 2004 02:50:18 -0000 1.5
--- SetRep.cpp 10 Mar 2004 16:42:33 -0000 1.6
***************
*** 14,17 ****
--- 14,35 ----
extern Globals global_vars;
+
+ SetRep::SetRep( BON::FCO& ptr)
+ : FCO( ptr)
+ , m_memberList()
+ , m_finalMemberList()
+ , m_setMethods()
+ {
+ }
+
+
+ SetRep::~SetRep()
+ {
+ m_memberList.clear();
+ m_finalMemberList.clear();
+ m_setMethods.clear();
+ }
+
+
void SetRep::addMember( FCO * member)
{
***************
*** 26,33 ****
void SetRep::createMethods()
{
! SetMemberList_Iterator it = m_memberList.begin();
! for( ; it != m_memberList.end(); ++it)
{
m_setMethods.push_back( CodeGen::dumpSetGetter( this, *it, ""));
--- 44,72 ----
+ void SetRep::extendMembership()
+ {
+ // insert in the m_finalMemberList all non-abstract interface descendants of the original members
+ SetMemberList_ConstIterator member_it = m_memberList.begin();
+ for( ; member_it != m_memberList.end(); ++member_it)
+ {
+ FCO * member_ptr = *member_it;
+ std::vector<FCO*> descendants;
+ member_ptr->getIntDescendants( descendants);
+ std::vector<FCO*>::iterator desc_it = descendants.begin();
+ for( ; desc_it != descendants.end(); ++desc_it)
+ {
+ FCO * new_member = *desc_it;
+ if ( !new_member->isAbstract() &&
+ m_finalMemberList.end() == std::find( m_finalMemberList.begin(), m_finalMemberList.end(), new_member)) // not found
+ m_finalMemberList.push_back( new_member);
+ }
+ }
+ }
+
+
void SetRep::createMethods()
{
! SetMemberList_Iterator it = m_finalMemberList.begin();
! for( ; it != m_finalMemberList.end(); ++it)
{
m_setMethods.push_back( CodeGen::dumpSetGetter( this, *it, ""));
Index: SetRep.h
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/SetRep.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SetRep.h 10 Mar 2004 02:50:18 -0000 1.3
--- SetRep.h 10 Mar 2004 16:42:33 -0000 1.4
***************
*** 26,37 ****
public: // types
! SetRep( BON::FCO& ptr): FCO( ptr)
! {
! m_memberList.clear();
! }
! ~SetRep()
! {
! m_memberList.clear();
! }
inline Any::KIND_TYPE getMyKind() const { return Any::SET; }
--- 26,31 ----
public: // types
! SetRep( BON::FCO& ptr);
! ~SetRep();
inline Any::KIND_TYPE getMyKind() const { return Any::SET; }
***************
*** 39,42 ****
--- 33,37 ----
// adds new elements to the m_memberList vector
void addMember( FCO * member);
+ void extendMembership();
std::string doDump();
***************
*** 49,56 ****
std::string hide();
protected:
- std::vector<Method> m_setMethods;
// stores those FCO-s which are in SET_MEMBER relationship with (*this)
// coresponds to "initial"
SetMemberList m_memberList;
private: // forbiding copy
--- 44,53 ----
std::string hide();
protected:
// stores those FCO-s which are in SET_MEMBER relationship with (*this)
// coresponds to "initial"
SetMemberList m_memberList;
+ SetMemberList m_finalMemberList;
+
+ std::vector<Method> m_setMethods;
private: // forbiding copy
- Previous message: [GME-commit]
GMESRC/Paradigms/UML UML.xmp,1.5,1.6 UMLMeta.xme,1.2,1.3
- Next message: [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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list