[GME-commit]
GMESRC/Paradigms/MetaGME/BonExtension/Rep Any.cpp,1.9,1.10
Any.h,1.6,1.7 Dumper.cpp,1.11,1.12 FCO.cpp,1.15,1.16
FCO.h,1.12,1.13 Sheet.cpp,1.6,1.7 Sheet.h,1.5,1.6
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Fri Jul 16 18:39:09 CDT 2004
- Previous message: [GME-commit]
GMESRC/Paradigms/MetaGME/BonExtension BON2Component.cpp,1.16,1.17
BON2Component.h,1.8,1.9 entity.h,1.3,1.4 relation.h,1.1,1.2
- Next message: [GME-commit] GMESRC/Paradigms/MetaGME/MetaInterpreter2004
BON2Component.cpp,1.17,1.18 BON2Component.h,1.7,1.8
entity.h,1.3,1.4 relation.h,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep
In directory braindrain:/tmp/cvs-serv22622/BonExtension/Rep
Modified Files:
Any.cpp Any.h Dumper.cpp FCO.cpp FCO.h Sheet.cpp Sheet.h
Log Message:
New isAbstract, isInRootFolder handling.
CVS User: zolmol
Index: Any.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/Any.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Any.cpp 16 Jun 2004 18:35:02 -0000 1.9
--- Any.cpp 16 Jul 2004 22:39:06 -0000 1.10
***************
*** 17,20 ****
--- 17,22 ----
/*static*/ const std::string Any::m_startUPToken = "///BUP";
/*static*/ const std::string Any::m_endUPToken = "///EUP";
+ /*static*/ const std::string Any::InRootFolder_str = "InRootFolder";
+
bool AnyLexicographicSort::operator()( Any * op1, Any * op2) const
***************
*** 48,51 ****
--- 50,55 ----
Any::Any( BON::FCO& ptr)
: m_ptr( ptr)
+ , m_isInRootFolder( false)
+ , m_equivs()
, m_toEx( true)
, m_globalHeader()
***************
*** 57,79 ****
Any::~Any()
{
}
! bool Any::isToBeEx() const
{
! return m_toEx;
}
! void Any::toBeEx( bool t)
{
! m_toEx = t;
}
! bool Any::getAttribute( const std::string & val, bool& is_it)
{
! is_it = m_ptr->getAttribute( val)->getBooleanValue();
! return is_it;
}
--- 61,100 ----
Any::~Any()
{
+ m_equivs.clear();
}
! // applicable for folders only
! void Any::initAttributes()
{
! // for folders the default value (from the meta) true
! // for fcos the default value (from the meta) false
!
! m_isInRootFolder = m_ptr->getAttribute( InRootFolder_str)->getBooleanValue();
! // try to find one among the equivalent classes which is in the root folder
! std::set< BON::FCO >::const_iterator it = m_equivs.begin();
! for ( ; !m_isInRootFolder && it != m_equivs.end(); ++it)
! {
! if ( *it == m_ptr) continue;
!
! m_isInRootFolder = m_isInRootFolder || (*it)->getAttribute( InRootFolder_str)->getBooleanValue();
! }
}
! bool Any::isInRootFolder()
{
! return m_isInRootFolder;
}
+ bool Any::isToBeEx() const
+ {
+ return m_toEx;
+ }
!
! void Any::toBeEx( bool t)
{
! m_toEx = t;
}
Index: Any.h
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/Any.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Any.h 16 Jun 2004 18:35:02 -0000 1.6
--- Any.h 16 Jul 2004 22:39:06 -0000 1.7
***************
*** 21,24 ****
--- 21,26 ----
class Any
{
+ public: // constant strings
+ static const std::string InRootFolder_str;//"InRootFolder"
public: // types
typedef enum
***************
*** 57,60 ****
--- 59,63 ----
public:
+ virtual void initAttributes();
virtual KIND_TYPE getMyKind() const = 0;
std::string getMyKindStr() const;
***************
*** 65,72 ****
BON::FCO getPtr() const { return m_ptr; }
! bool getAttribute( const std::string & val, bool& is_it);
BON::Folder getParentFolder() const { return m_parentFolder; }
void setParentFolder( const BON::Folder& folder) { m_parentFolder = folder; }
std::string getMyPrefix() const;
--- 68,76 ----
BON::FCO getPtr() const { return m_ptr; }
! bool isInRootFolder();
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; }
std::string getMyPrefix() const;
***************
*** 105,108 ****
--- 109,116 ----
// pointer of the parent folder
BON::Folder m_parentFolder;
+
+ // equivalent peers
+ std::set< BON::FCO > m_equivs;
+ bool m_isInRootFolder;
// indicates if it is to be extended or not
Index: Dumper.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/Dumper.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Dumper.cpp 16 Jun 2004 18:35:02 -0000 1.11
--- Dumper.cpp 16 Jul 2004 22:39:06 -0000 1.12
***************
*** 671,675 ****
if ( i != -1)
{
! global_vars.output_directory_name = opt.m_headerName.Left( i);
}
--- 671,675 ----
if ( i != -1)
{
! global_vars.output_directory_name = opt.m_headerName.Left( i+1);
}
Index: FCO.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/FCO.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** FCO.cpp 30 Jun 2004 17:58:24 -0000 1.15
--- FCO.cpp 16 Jul 2004 22:39:06 -0000 1.16
***************
*** 14,17 ****
--- 14,18 ----
extern Globals global_vars;
+ /*static*/ const std::string FCO::IsAbstract_str = "IsAbstract";
FCO::FCO( BON::FCO& ptr)
***************
*** 70,73 ****
--- 71,112 ----
m_clique[i] = 0;
}
+ }
+
+
+ void FCO::initAttributes()
+ {
+ m_isInRootFolder = m_isInRootFolder || m_ptr->getAttribute( InRootFolder_str)->getBooleanValue();
+
+ // isAbstract: true iff all values (which are set) are true
+ bool isabs = true; // if any of the set values is false it will change
+ bool isabs_set = false;
+ //m_isAbstract = m_isAbstract && m_ptr->getAttribute( IsAbstract_str)->getBooleanValue();
+ if( m_ptr->getAttribute( IsAbstract_str)->getStatus() == BON::AS_Here)
+ {
+ isabs = isabs && m_ptr->getAttribute( IsAbstract_str)->getBooleanValue();
+ isabs_set = true;
+ }
+
+ // abstract iff all equivalent classes are abstract
+ std::set< BON::FCO >::const_iterator it = m_equivs.begin();
+ for ( ; it != m_equivs.end(); ++it)
+ {
+ if ( *it == m_ptr) continue;
+
+ // --the following 4 attributes are applicable to proxies as well--
+ // InRootFolder: true if one is at least true
+ m_isInRootFolder = m_isInRootFolder || (*it)->getAttribute( InRootFolder_str)->getBooleanValue();
+
+ // isAbstract: true if all objects are true
+ //m_isAbstract = m_isAbstract && (*it)->getAttribute( IsAbstract_str)->getBooleanValue();
+ if( (*it)->getAttribute( IsAbstract_str)->getStatus() == BON::AS_Here) // if set by the user
+ {
+ isabs = isabs && (*it)->getAttribute( IsAbstract_str)->getBooleanValue();
+ isabs_set = true;
+ }
+ }
+
+ if( isabs_set) m_isAbstract = isabs;
+
}
Index: FCO.h
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/FCO.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** FCO.h 30 Jun 2004 17:58:24 -0000 1.12
--- FCO.h 16 Jul 2004 22:39:06 -0000 1.13
***************
*** 17,20 ****
--- 17,22 ----
class FCO : public Any
{
+ public: // constant strings
+ static const std::string IsAbstract_str;//"IsAbstract"
public: // typedefs
typedef std::vector<ModelRep *> ModelRepPtrList;
***************
*** 43,46 ****
--- 45,49 ----
virtual KIND_TYPE getMyKind() const = 0;
+ /*virtual*/ void initAttributes();
// abstract
bool isAbstract() const;
Index: Sheet.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/Sheet.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Sheet.cpp 10 Mar 2004 02:50:18 -0000 1.6
--- Sheet.cpp 16 Jul 2004 22:39:06 -0000 1.7
***************
*** 119,122 ****
--- 119,123 ----
&& doInheritance( FCO::IMPLEMENTATION))
{
+ init();
initRoleNames();
***************
*** 130,133 ****
--- 131,186 ----
}
+ void Sheet::init()
+ {
+ {FcoRep_Iterator it0( m_fcoRepList.begin());
+ for( ; it0 != m_fcoRepList.end(); ++it0 )
+ {
+ (*it0)->initAttributes();
+ if ( isInRootFolder( *it0)) m_rootFolder.addRootElement( *it0);
+ }}
+
+ {AtomRep_Iterator it1 = m_atomList.begin();
+ for( ; it1 != m_atomList.end(); ++it1 )
+ {
+ (*it1)->initAttributes();
+ if ( isInRootFolder( *it1)) m_rootFolder.addRootElement( *it1);
+ }}
+
+ {ModelRep_Iterator it2 = m_modelList.begin();
+ for( ; it2 != m_modelList.end(); ++it2 )
+ {
+ (*it2)->initAttributes();
+ if ( isInRootFolder( *it2)) m_rootFolder.addRootElement( *it2);
+ }}
+
+ {ConnectionRep_Iterator it3 = m_connList.begin();
+ for( ; it3 != m_connList.end(); ++it3 )
+ {
+ (*it3)->initAttributes();
+ if ( isInRootFolder( *it3)) m_rootFolder.addRootElement( *it3);
+ }}
+
+ {SetRep_Iterator it4 = m_setList.begin();
+ for( ; it4 != m_setList.end(); ++it4 )
+ {
+ (*it4)->initAttributes();
+ if ( isInRootFolder( *it4)) m_rootFolder.addRootElement( *it4);
+ }}
+
+ {ReferenceRep_Iterator it5 = m_refList.begin();
+ for( ; it5 != m_refList.end(); ++it5 )
+ {
+ (*it5)->initAttributes();
+ if ( isInRootFolder( *it5)) m_rootFolder.addRootElement( *it5);
+ }}
+
+ {FolderRep_Iterator it6 = m_folderList.begin();
+ for( ; it6 != m_folderList.end(); ++it6 )
+ {
+ (*it6)->initAttributes();
+ if ( isInRootFolder( *it6)) m_rootFolder.addSubFolder( *it6);
+ }}
+ }
+
void Sheet::initRoleNames()
***************
*** 146,151 ****
FcoRep * ll = new FcoRep( ptr);
addFcoRep( ll);
- if ( isInRootFolder( ll))
- m_rootFolder.addRootElement( ll);
return ll;
}
--- 199,202 ----
***************
*** 156,161 ****
AtomRep * ll = new AtomRep( ptr);
addAtomRep( ll);
- if ( isInRootFolder( ll))
- m_rootFolder.addRootElement( ll);
return ll;
}
--- 207,210 ----
***************
*** 166,171 ****
ModelRep * ll = new ModelRep( ptr);
addModelRep( ll);
- if ( isInRootFolder( ll))
- m_rootFolder.addRootElement( ll);
return ll;
}
--- 215,218 ----
***************
*** 176,181 ****
ConnectionRep * ll = new ConnectionRep( ptr);
addConnectionRep( ll);
- if ( isInRootFolder( ll))
- m_rootFolder.addRootElement( ll);
return ll;
}
--- 223,226 ----
***************
*** 186,191 ****
SetRep * ll = new SetRep( ptr);
addSetRep( ll);
- if ( isInRootFolder( ll))
- m_rootFolder.addRootElement( ll);
return ll;
}
--- 231,234 ----
***************
*** 196,201 ****
ReferenceRep * ll = new ReferenceRep( ptr);
addReferenceRep( ll);
- if ( isInRootFolder( ll))
- m_rootFolder.addRootElement( ll);
return ll;
}
--- 239,242 ----
***************
*** 206,211 ****
FolderRep * ll = new FolderRep( ptr, resp_ptr);
addFolderRep( ll);
- if ( isInRootFolder( ll))
- m_rootFolder.addSubFolder( ll);
return ll;
}
--- 247,250 ----
***************
*** 366,374 ****
bool Sheet::isInRootFolder( Any * elem)
{
! bool is_it;
!
! elem->getAttribute("InRootFolder", is_it);
!
! return is_it;
}
--- 405,409 ----
bool Sheet::isInRootFolder( Any * elem)
{
! return elem->isInRootFolder();
}
***************
*** 378,381 ****
--- 413,417 ----
m_BON_Project_Root_Folder = p;
}
+
void Sheet::gatherNodes( NODE_VECTOR & nodes)
Index: Sheet.h
===================================================================
RCS file: /var/lib/gme/GMESRC/Paradigms/MetaGME/BonExtension/Rep/Sheet.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Sheet.h 10 Mar 2004 02:50:18 -0000 1.5
--- Sheet.h 16 Jul 2004 22:39:06 -0000 1.6
***************
*** 96,101 ****
BON::Folder m_BON_Project_Root_Folder;
-
private:
bool isInRootFolder( Any * elem);
void initRoleNames();
--- 96,101 ----
BON::Folder m_BON_Project_Root_Folder;
private:
+ void init();
bool isInRootFolder( Any * elem);
void initRoleNames();
- Previous message: [GME-commit]
GMESRC/Paradigms/MetaGME/BonExtension BON2Component.cpp,1.16,1.17
BON2Component.h,1.8,1.9 entity.h,1.3,1.4 relation.h,1.1,1.2
- Next message: [GME-commit] GMESRC/Paradigms/MetaGME/MetaInterpreter2004
BON2Component.cpp,1.17,1.18 BON2Component.h,1.7,1.8
entity.h,1.3,1.4 relation.h,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list