[GME-commit]
GMESRC/GME/Parser MetaParser.cpp,1.23,1.24 MgaDumper.cpp,1.30,1.31
MgaParser.cpp,1.33,1.34 MgaParserBC.cpp,1.8,1.9
MgaParserSC.cpp,1.10,1.11 edf.dtd,1.8,1.9 mgaclosure.dtd,1.4,1.5
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Fri Jul 21 17:50:53 CDT 2006
- Previous message: [GME-commit]
GMESRC/GME/Interfaces Meta.idl,1.21,1.22 Mga.idl,1.50,1.51
MgaUtil.idl,1.48,1.49
- Next message: [GME-commit] GMESRC/GME/Meta CoreMetaDefines.cpp,1.9,1.10
CoreMetaDefines.h,1.5,1.6 MetaUtilities.cpp,1.8,1.9
MetaUtilities.h,1.9,1.10 MgaMetaBase.h,1.9,1.10
MgaMetaConstraint.cpp,1.5,1.6 MgaMetaConstraint.h,1.7,1.8
MgaMetaFolder.cpp,1.1,1.2 MgaMetaModel.cpp,1.2,1.3
MgaMetaPointerItem.cpp,1.2,1.3 MgaMetaPointerItem.h,1.1,1.2
MgaMetaProject.cpp,1.5,1.6 MgaMetaProject.h,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /project/gme-repository/GMESRC/GME/Parser
In directory escher:/tmp/cvs-serv2290
Modified Files:
MetaParser.cpp MgaDumper.cpp MgaParser.cpp MgaParserBC.cpp
MgaParserSC.cpp edf.dtd mgaclosure.dtd
Log Message:
Namespace related change in MetaParser (edf.dtd has also changed, .mta compatibility affected): new 'defdfornamesp' token for Constraints.
Parser: -when importing data from a different paradigm invokes Resolver's getUserOption for instructions regarding namespace truncation/prefixation/migration.
-when importing a Closure/Smart data even though the guids are there, disregard them
Dumper: paradigmhint attribute, to help parser identify text coming from other paradigms.
DumpFCOs, DumpClos, DumpClosR methods dump Guids of objects.
mgaclosure.dtd also changed accordingly (Note: Importing a closure into an older GME is not possible. When facing this, ask for the a new version of mgaclosure.dtd and replace the old one in GME Directory).
Modified Files:
MetaParser.cpp MgaDumper.cpp MgaParser.cpp MgaParserBC.cpp
MgaParserSC.cpp edf.dtd mgaclosure.dtd
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: MgaParser.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Parser/MgaParser.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** MgaParser.cpp 19 May 2006 18:45:35 -0000 1.33
--- MgaParser.cpp 21 Jul 2006 16:50:51 -0000 1.34
***************
*** 585,588 ****
--- 585,601 ----
GetCurrent().object = project;
+ // get metaproject
+ CComObjPtr<IMgaMetaProject> metaproject;
+ if( project) COMTHROW( project->get_RootMeta(PutOut(metaproject)) );
+ ASSERT( metaproject != NULL );
+
+ // obtain the current paradigm name
+ CComBSTR host_pn;
+ if( metaproject) COMTHROW( metaproject->get_Name( &host_pn));
+
+ // is the resolver interactive?
+ VARIANT_BOOL int_mode = VARIANT_FALSE;
+ COMTHROW( resolver->get_IsInteractive( &int_mode));
+
attributes_iterator i = attributes.begin();
attributes_iterator e = attributes.end();
***************
*** 599,602 ****
--- 612,626 ----
CopyTo(guid, projectguid);
}
+ else if( i->first == "metaname")
+ {
+ // if host paradigm != imported project's paradigm
+ if( host_pn != CComBSTR( i->second.c_str()))
+ {
+ if( int_mode == VARIANT_TRUE) // if interactive
+ {
+ resolver->getUserOptions();
+ }
+ }
+ }
++i;
***************
*** 614,617 ****
--- 638,654 ----
GetCurrent().object = obj;
+ // get metaproject
+ CComObjPtr<IMgaMetaProject> metaproject;
+ if( project) COMTHROW( project->get_RootMeta(PutOut(metaproject)) );
+ ASSERT( metaproject != NULL );
+
+ // obtain the current paradigm name
+ CComBSTR host_pn;
+ if( metaproject) COMTHROW( metaproject->get_Name( &host_pn));
+
+ // is the resolver interactive?
+ VARIANT_BOOL int_mode = VARIANT_FALSE;
+ COMTHROW( resolver->get_IsInteractive( &int_mode));
+
CComObjPtr<IMgaModel> model;
CComObjPtr<IMgaFolder> folder;
***************
*** 623,626 ****
--- 660,673 ----
else
HR_THROW(E_INVALID_FILENAME);
+
+ const std::string *parname_hint = GetByNameX(attributes, "paradigmnamehint");
+ // importing from different paradigm
+ if( parname_hint != NULL && host_pn != CComBSTR( parname_hint->c_str()))
+ {
+ if( int_mode == VARIANT_TRUE)
+ {
+ resolver->getUserOptions();
+ }
+ }
}
Index: edf.dtd
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Parser/edf.dtd,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** edf.dtd 25 Apr 2001 15:10:00 -0000 1.8
--- edf.dtd 21 Jul 2006 16:50:51 -0000 1.9
***************
*** 27,30 ****
--- 27,31 ----
depth (0|1|any) "1"
type (eventbased|ondemand|function) "eventbased"
+ defdfornamesp CDATA #IMPLIED
>
Index: MgaParserBC.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Parser/MgaParserBC.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** MgaParserBC.cpp 13 Jan 2006 23:28:29 -0000 1.8
--- MgaParserBC.cpp 21 Jul 2006 16:50:51 -0000 1.9
***************
*** 42,45 ****
--- 42,46 ----
//by zolmol
+ m_maintainGuids = false; // do not preserve guids found in data pasted
m_target = target;
m_resolveDerFuncPtr = CMgaParser::ResolveClosure1Derivation;
Index: MgaParserSC.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Parser/MgaParserSC.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** MgaParserSC.cpp 13 Jan 2006 23:28:29 -0000 1.10
--- MgaParserSC.cpp 21 Jul 2006 16:50:51 -0000 1.11
***************
*** 43,46 ****
--- 43,47 ----
//by zolmol
+ m_maintainGuids = false; // do not preserve guids found in data pasted
m_mergeAllowed = (options & MERGE) != 0;
m_target = target;
Index: MetaParser.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Parser/MetaParser.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** MetaParser.cpp 13 Oct 2004 15:17:55 -0000 1.23
--- MetaParser.cpp 21 Jul 2006 16:50:51 -0000 1.24
***************
*** 936,939 ****
--- 936,940 ----
Attr(i, "eventmask", c, IMgaMetaConstraint::put_EventMask);
Attr(i, "priority", c, IMgaMetaConstraint::put_Priority);
+ Attr(i, "defdfornamesp", c, IMgaMetaConstraint::SetDefinedForNamespace);
if( i->first == "depth" )
Index: mgaclosure.dtd
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Parser/mgaclosure.dtd,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** mgaclosure.dtd 31 Aug 2005 20:48:04 -0000 1.4
--- mgaclosure.dtd 21 Jul 2006 16:50:51 -0000 1.5
***************
*** 42,45 ****
--- 42,47 ----
closurename CDATA #IMPLIED
closurepath CDATA #IMPLIED
+ perm CDATA #IMPLIED
+ guid CDATA #IMPLIED
>
***************
*** 60,63 ****
--- 62,67 ----
closurename CDATA #IMPLIED
closurepath CDATA #IMPLIED
+ perm CDATA #IMPLIED
+ guid CDATA #IMPLIED
>
***************
*** 77,80 ****
--- 81,86 ----
closurename CDATA #IMPLIED
closurepath CDATA #IMPLIED
+ perm CDATA #IMPLIED
+ guid CDATA #IMPLIED
>
***************
*** 99,102 ****
--- 105,110 ----
closurename CDATA #IMPLIED
closurepath CDATA #IMPLIED
+ perm CDATA #IMPLIED
+ guid CDATA #IMPLIED
>
***************
*** 120,123 ****
--- 128,133 ----
closurename CDATA #IMPLIED
closurepath CDATA #IMPLIED
+ perm CDATA #IMPLIED
+ guid CDATA #IMPLIED
>
***************
*** 150,153 ****
--- 160,165 ----
smart1RefChain CDATA #IMPLIED
smart1IsBound CDATA #IMPLIED
+ perm CDATA #IMPLIED
+ guid CDATA #IMPLIED
>
Index: MgaDumper.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Parser/MgaDumper.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** MgaDumper.cpp 7 Jun 2006 20:21:56 -0000 1.30
--- MgaDumper.cpp 21 Jul 2006 16:50:51 -0000 1.31
***************
*** 198,206 ****
ofs << "<!DOCTYPE clipboard SYSTEM \"mga.dtd\" [\n";
ofs << "\t<!ELEMENT clipboard (folder|model|atom|reference|set|connection|regnode)*>\n";
! ofs << "\t<!ATTLIST clipboard acceptingkind CDATA #IMPLIED>\n";
ofs << "]>\n\n";
StartElem("clipboard");
CComObjPtrVector<IMgaFolder>::iterator fi = m_selFolders.begin();
while( fi != m_selFolders.end() )
--- 198,219 ----
ofs << "<!DOCTYPE clipboard SYSTEM \"mga.dtd\" [\n";
ofs << "\t<!ELEMENT clipboard (folder|model|atom|reference|set|connection|regnode)*>\n";
! //ofs << "\t<!ATTLIST clipboard acceptingkind CDATA #IMPLIED>\n";
! //ofs << "]>\n\n";
! ofs << "\t<!ATTLIST clipboard\n";
! ofs << "\t\tacceptingkind CDATA #IMPLIED\n";
! ofs << "\t\tparadigmnamehint CDATA #IMPLIED\n";//TODO: could be extended with targetnamespacehint, srcnamespacehint
! ofs << "\t>\n";
ofs << "]>\n\n";
+
+
StartElem("clipboard");
+ // dumping originating paradigm name as a hint for the parser
+ CComObjPtr<IMgaMetaProject> metaproject;
+ COMTHROW( project->get_RootMeta(PutOut(metaproject)) );
+ ASSERT( metaproject != NULL );
+ if( metaproject) Attr("paradigmnamehint", metaproject, IMgaMetaProject::get_Name);
+
CComObjPtrVector<IMgaFolder>::iterator fi = m_selFolders.begin();
while( fi != m_selFolders.end() )
***************
*** 1685,1688 ****
--- 1698,1702 ----
m_dumpRelids = false; // dumpversion = 2; // no relids dumped
+ m_dumpGuids = true; // dump these, as they are needed by new features
m_dumpLibraryStubs = (dump_options & 0x1) == 0x1; // dump library stubs ( absolute path used as libreferred or libderivedfrom attribute)
***************
*** 1719,1722 ****
--- 1733,1737 ----
ofs << "\t\tclosureversion CDATA #IMPLIED\n";
ofs << "\t\tacceptingkind CDATA #IMPLIED\n";
+ ofs << "\t\tparadigmnamehint CDATA #IMPLIED\n"; // just for compatibility with raw copied data
ofs << "\t>\n";
ofs << "]>\n\n";
***************
*** 1748,1751 ****
--- 1763,1767 ----
m_strictDump = true; // strict dump meaning that all dumped objects must be strictly in the closure
m_dumpRelids = false; //dumpversion = 2; // no relids dumped
+ m_dumpGuids = true; // dump these, as they are needed by new features
m_dumpLibraryStubs = (dump_options & 0x1) == 0x1; // dump library stubs ( absolute path used as closurelibreferred, closurelibderivedfrom, closurelibtarget attribute)
***************
*** 1805,1808 ****
--- 1821,1825 ----
ofs << "\t\tclosureversion CDATA #IMPLIED\n";
ofs << "\t\tacceptingkind CDATA #IMPLIED\n";
+ ofs << "\t\tparadigmnamehint CDATA #IMPLIED\n"; // just for compatibility with raw copied data
ofs << "\t>\n";
ofs << "]>\n\n";
- Previous message: [GME-commit]
GMESRC/GME/Interfaces Meta.idl,1.21,1.22 Mga.idl,1.50,1.51
MgaUtil.idl,1.48,1.49
- Next message: [GME-commit] GMESRC/GME/Meta CoreMetaDefines.cpp,1.9,1.10
CoreMetaDefines.h,1.5,1.6 MetaUtilities.cpp,1.8,1.9
MetaUtilities.h,1.9,1.10 MgaMetaBase.h,1.9,1.10
MgaMetaConstraint.cpp,1.5,1.6 MgaMetaConstraint.h,1.7,1.8
MgaMetaFolder.cpp,1.1,1.2 MgaMetaModel.cpp,1.2,1.3
MgaMetaPointerItem.cpp,1.2,1.3 MgaMetaPointerItem.h,1.1,1.2
MgaMetaProject.cpp,1.5,1.6 MgaMetaProject.h,1.6,1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list