[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
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Fri Jul 21 19:56:38 CDT 2006
- Previous message: [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
- Next message: [GME-commit]
GMESRC/GME/Mga MgaFCO.cpp,1.36,1.37 MgaFilter.cpp,1.10,1.11
MgaFolder.cpp,1.33,1.34 MgaProject.cpp,1.67,1.68
MgaProject.h,1.31,1.32 MgaTerritory.cpp,1.2,1.3
MgaTerritory.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /project/gme-repository/GMESRC/GME/Meta
In directory escher:/tmp/cvs-serv9392
Modified Files:
CoreMetaDefines.cpp CoreMetaDefines.h MetaUtilities.cpp
MetaUtilities.h MgaMetaBase.h MgaMetaConstraint.cpp
MgaMetaConstraint.h MgaMetaFolder.cpp MgaMetaModel.cpp
MgaMetaPointerItem.cpp MgaMetaPointerItem.h MgaMetaProject.cpp
MgaMetaProject.h
Log Message:
Namespace related changes.
Modified Files:
CoreMetaDefines.cpp CoreMetaDefines.h MetaUtilities.cpp
MetaUtilities.h MgaMetaBase.h MgaMetaConstraint.cpp
MgaMetaConstraint.h MgaMetaFolder.cpp MgaMetaModel.cpp
MgaMetaPointerItem.cpp MgaMetaPointerItem.h MgaMetaProject.cpp
MgaMetaProject.h
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: MgaMetaProject.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Meta/MgaMetaProject.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** MgaMetaProject.cpp 13 Oct 2004 15:17:55 -0000 1.5
--- MgaMetaProject.cpp 21 Jul 2006 18:56:36 -0000 1.6
***************
*** 356,359 ****
--- 356,373 ----
}
+ STDMETHODIMP CMgaMetaProject::SetNmspc(BSTR p)
+ {
+ m_namespace = p;
+ return S_OK;
+ }
+
+ STDMETHODIMP CMgaMetaProject::GetNmspc(BSTR *p)
+ {
+ CComBSTR nms = m_namespace;
+ *p = nms.Detach();
+
+ return S_OK;
+ }
+
// ------- metaobj_lookup
Index: MgaMetaProject.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Meta/MgaMetaProject.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** MgaMetaProject.h 28 Nov 2005 22:01:46 -0000 1.6
--- MgaMetaProject.h 21 Jul 2006 18:56:36 -0000 1.7
***************
*** 64,67 ****
--- 64,70 ----
STDMETHOD(DoFindObjectDisp)(metaref_type metaref, IMgaMetaBase **p) { return get_FindObject( metaref, p); }
+ STDMETHOD(SetNmspc)(BSTR p);
+ STDMETHOD(GetNmspc)(BSTR *p);
+
// ------- metaobj_lookup
***************
*** 89,92 ****
--- 92,97 ----
CComObjPtr<ICoreTerritory> coreterritory;
CCoreObjectPtr rootobject;
+
+ CComBSTR m_namespace;
// ------- Edit
Index: CoreMetaDefines.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Meta/CoreMetaDefines.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** CoreMetaDefines.cpp 25 Apr 2001 15:10:00 -0000 1.9
--- CoreMetaDefines.cpp 21 Jul 2006 18:56:36 -0000 1.10
***************
*** 245,248 ****
--- 245,249 ----
CREATE_ATTRIBUTE(ATTRID_CONSPRIORITY, "Priority", "Constraint Priority", VALTYPE_LONG);
CREATE_ATTRIBUTE(ATTRID_CONSTYPE, "Type", "Constraint Type", VALTYPE_LONG);
+ CREATE_ATTRIBUTE(ATTRID_CONSNAMESPC, "DesiredNamespace", "DesiredNamespace", VALTYPE_STRING);
CLSID_PUSH(CLSID_MgaMetaConstraint);
Index: CoreMetaDefines.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Meta/CoreMetaDefines.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CoreMetaDefines.h 25 Apr 2001 15:10:00 -0000 1.5
--- CoreMetaDefines.h 21 Jul 2006 18:56:36 -0000 1.6
***************
*** 100,103 ****
--- 100,104 ----
#define ATTRID_CONSPRIORITY 303
#define ATTRID_CONSTYPE 304
+ #define ATTRID_CONSNAMESPC 305
#endif//MGA_COREMETADEFINES_H
Index: MgaMetaPointerItem.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Meta/MgaMetaPointerItem.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MgaMetaPointerItem.cpp 13 Oct 2004 15:17:55 -0000 1.2
--- MgaMetaPointerItem.cpp 21 Jul 2006 18:56:36 -0000 1.3
***************
*** 2,7 ****
--- 2,17 ----
#include "stdafx.h"
#include "MgaMetaPointerItem.h"
+ #include "MgaMetaBase.h"
// --------------------------- CMgaMetaPointerItem
+ STDMETHODIMP CMgaMetaPointerItem::get_Desc(BSTR *p)
+ {
+ COMTRY {
+ CComBSTR pn;
+ COMTHROW( ComGetAttrValue(GetUnknown(), ATTRID_PTRITEMDESC, &pn));
+ CComBSTR tn = truncateName( GetUnknown(), pn);
+ *p = tn.Detach();
+ } COMCATCH(;)
+ }
bool CMgaMetaPointerItem::CheckToken(CComBstrObj &token, bstr_const_iterator i, bstr_const_iterator &e)
Index: MgaMetaModel.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Meta/MgaMetaModel.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MgaMetaModel.cpp 23 Jun 2001 02:58:00 -0000 1.2
--- MgaMetaModel.cpp 21 Jul 2006 18:56:36 -0000 1.3
***************
*** 15,18 ****
--- 15,19 ----
CCoreObjectPtr self(GetUnknown());
+ CComBstrObj_lightequal equal( GetUnknown());
coreobjects_type coreobjects;
self.GetCollectionValue(ATTRID_DEFFCO_PTR, coreobjects);
***************
*** 25,29 ****
(*i).GetStringValue(ATTRID_NAME, PutOut(n));
! if( n == name )
COMRETURN( ::QueryInterface(*i, p) );
--- 26,30 ----
(*i).GetStringValue(ATTRID_NAME, PutOut(n));
! if( equal(n, name))//if( n == name )
COMRETURN( ::QueryInterface(*i, p) );
***************
*** 57,60 ****
--- 58,62 ----
CCoreObjectPtr self(GetUnknown());
+ CComBstrObj_lightequal equal( GetUnknown());
coreobjects_type coreobjects;
self.GetCollectionValue(ATTRID_ROLES_COLL, coreobjects);
***************
*** 67,71 ****
(*i).GetStringValue(ATTRID_NAME, PutOut(n));
! if( n == name )
COMRETURN( ::QueryInterface(*i, p) );
--- 69,73 ----
(*i).GetStringValue(ATTRID_NAME, PutOut(n));
! if( equal(n, name))//if( n == name )
COMRETURN( ::QueryInterface(*i, p) );
Index: MgaMetaConstraint.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Meta/MgaMetaConstraint.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** MgaMetaConstraint.cpp 4 Aug 2000 15:51:00 -0000 1.5
--- MgaMetaConstraint.cpp 21 Jul 2006 18:56:36 -0000 1.6
***************
*** 36,37 ****
--- 36,47 ----
COMCATCH(;)
}
+
+ STDMETHODIMP CMgaMetaConstraint::SetDefinedForNamespace( BSTR pStr)
+ {
+ return ComPutAttrValue(GetUnknown(), ATTRID_CONSNAMESPC, pStr);
+ }
+
+ STDMETHODIMP CMgaMetaConstraint::GetDefinedForNamespace( BSTR * pStr)
+ {
+ return ComGetAttrValue(GetUnknown(), ATTRID_CONSNAMESPC, pStr);
+ }
Index: MetaUtilities.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Meta/MetaUtilities.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** MetaUtilities.h 13 Oct 2004 15:17:55 -0000 1.9
--- MetaUtilities.h 21 Jul 2006 18:56:36 -0000 1.10
***************
*** 251,254 ****
--- 251,255 ----
CCoreObjectPtr self(me);
+ CComBstrObj_lightequal equal( me);
coreobjects_type coreobjects;
self.GetCollectionValue(collid, coreobjects);
***************
*** 264,268 ****
obj.GetStringValue(ATTRID_NAME, PutOut(n));
! if( n == name )
{
COMTHROW( ::QueryInterface(obj, p) );
--- 265,269 ----
obj.GetStringValue(ATTRID_NAME, PutOut(n));
! if( equal( n, name))//if( n == name )
{
COMTHROW( ::QueryInterface(obj, p) );
***************
*** 500,503 ****
--- 501,549 ----
}
};
+
+ CComBSTR truncateName( IUnknown *p_bs, CComBSTR pIn);
+
+ struct CComBstrObj_lightequal
+ {
+ CComBSTR m_nmspc;
+ //CComBstrObj_lightequal() {} // we do not allow this
+
+ template<class TMETABASE>
+ CComBstrObj_lightequal( TMETABASE p_bs)
+ {
+ CComQIPtr<IMgaMetaBase> bs( p_bs);
+ if( bs)
+ {
+ CComPtr<IMgaMetaProject> pr;
+ COMTHROW( bs->get_MetaProject( &pr));
+ COMTHROW( pr->GetNmspc( &m_nmspc)); // fetch namespace into m_nmspc
+ }
+ }
+
+ CComBstrObj_lightequal( const CComBSTR pNmspc)
+ : m_nmspc( pNmspc)
+ {
+ }
+
+ //previously p1 was pUnknown, p2 was pFullName, and we thought that the user would give Fullnames
+ bool operator()( const CComBstrObj &pFullNmInParadigm, const CComBstrObj &pUnknownFormat) const
+ {
+ if( pFullNmInParadigm == pUnknownFormat)
+ return true;
+ else if( m_nmspc.Length() > 0)
+ {
+ CComBSTR longername;
+ longername.AppendBSTR( m_nmspc);
+ longername.Append( _T("::"));
+ longername.AppendBSTR( pUnknownFormat);
+ return pFullNmInParadigm == longername;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ };
+
// --------------------------- TRACE
Index: MgaMetaBase.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Meta/MgaMetaBase.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** MgaMetaBase.h 17 Dec 2001 22:22:00 -0000 1.9
--- MgaMetaBase.h 21 Jul 2006 18:56:36 -0000 1.10
***************
*** 57,61 ****
\
STDMETHOD(get_Name)(BSTR *p) \
! { return ComGetAttrValue(GetUnknown(), ATTRID_NAME, p); } \
\
STDMETHOD(put_Name)(BSTR p) \
--- 57,68 ----
\
STDMETHOD(get_Name)(BSTR *p) \
! { \
! COMTRY { \
! CComBSTR pn; \
! COMTHROW( ComGetAttrValue(GetUnknown(), ATTRID_NAME, &pn)); \
! CComBSTR tn = truncateName( GetUnknown(), pn); \
! *p = tn.Detach(); \
! } COMCATCH(;) \
! } \
\
STDMETHOD(put_Name)(BSTR p) \
Index: MgaMetaPointerItem.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Meta/MgaMetaPointerItem.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MgaMetaPointerItem.h 5 Jul 2000 19:17:00 -0000 1.1
--- MgaMetaPointerItem.h 21 Jul 2006 18:56:36 -0000 1.2
***************
*** 22,27 ****
public:
! STDMETHOD(get_Desc)(BSTR *p)
! { return ComGetAttrValue(GetUnknown(), ATTRID_PTRITEMDESC, p); }
STDMETHOD(get_Parent)(IMgaMetaPointerSpec **p)
--- 22,26 ----
public:
! STDMETHOD(get_Desc)(BSTR *p);
STDMETHOD(get_Parent)(IMgaMetaPointerSpec **p)
Index: MetaUtilities.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Meta/MetaUtilities.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** MetaUtilities.cpp 13 Oct 2004 15:17:55 -0000 1.8
--- MetaUtilities.cpp 21 Jul 2006 18:56:36 -0000 1.9
***************
*** 364,365 ****
--- 364,399 ----
COMCATCH(;)
}
+
+ CComBSTR truncateName( IUnknown *p_bs, CComBSTR pIn)
+ {
+ CComBSTR truncated_name;
+ CComBSTR nmspc;
+ CComQIPtr<IMgaMetaBase> bs( p_bs);
+ if( bs)
+ {
+ CComPtr<IMgaMetaProject> pr;
+ COMTHROW( bs->get_MetaProject( &pr));
+ COMTHROW( pr->GetNmspc( &nmspc)); // fetch namespace into m_nmspc
+ }
+ if( nmspc && nmspc.Length() > 0) // some namespace is set
+ {
+ bool nm_match = false;
+ nmspc.Append( L"::");
+ unsigned int nms_len = nmspc.Length();
+ unsigned int pin_len = pIn.Length();
+ if( nms_len < pin_len
+ && 0 == wcsncmp( pIn.m_str, nmspc.m_str, (size_t) nms_len))
+ {
+ unsigned int i = nms_len;
+ while( i < pin_len)
+ {
+ truncated_name.Append( pIn[i]);
+ ++i;
+ }
+
+ return truncated_name;
+ }
+ }
+
+ return pIn;
+ }
Index: MgaMetaFolder.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Meta/MgaMetaFolder.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MgaMetaFolder.cpp 5 Jul 2000 19:17:00 -0000 1.1
--- MgaMetaFolder.cpp 21 Jul 2006 18:56:36 -0000 1.2
***************
*** 16,19 ****
--- 16,20 ----
CCoreObjectPtr self(GetUnknown());
+ CComBstrObj_lightequal equal( GetUnknown());
coreobjects_type coreobjects;
self.GetCollectionValue(ATTRID_DEFFOLDER_PTR, coreobjects);
***************
*** 26,30 ****
(*i).GetStringValue(ATTRID_NAME, PutOut(n));
! if( n == name )
COMRETURN( ::QueryInterface(*i, p) );
--- 27,31 ----
(*i).GetStringValue(ATTRID_NAME, PutOut(n));
! if( equal( n, name))//if( n == name )
COMRETURN( ::QueryInterface(*i, p) );
***************
*** 54,57 ****
--- 55,59 ----
CCoreObjectPtr self(GetUnknown());
+ CComBstrObj_lightequal equal( GetUnknown());
coreobjects_type coreobjects;
self.GetCollectionValue(ATTRID_DEFFCO_PTR, coreobjects);
***************
*** 64,68 ****
(*i).GetStringValue(ATTRID_NAME, PutOut(n));
! if( n == name )
COMRETURN( ::QueryInterface(*i, p) );
--- 66,70 ----
(*i).GetStringValue(ATTRID_NAME, PutOut(n));
! if( equal( n, name))//if( n == name )
COMRETURN( ::QueryInterface(*i, p) );
Index: MgaMetaConstraint.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Meta/MgaMetaConstraint.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** MgaMetaConstraint.h 25 Apr 2001 15:10:00 -0000 1.7
--- MgaMetaConstraint.h 21 Jul 2006 18:56:36 -0000 1.8
***************
*** 62,65 ****
--- 62,68 ----
STDMETHOD(Remove)()
{ return ComDeleteObject(GetUnknown()); }
+
+ STDMETHOD(SetDefinedForNamespace)( BSTR pStr);
+ STDMETHOD(GetDefinedForNamespace)( BSTR *pStr);
};
- Previous message: [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
- Next message: [GME-commit]
GMESRC/GME/Mga MgaFCO.cpp,1.36,1.37 MgaFilter.cpp,1.10,1.11
MgaFolder.cpp,1.33,1.34 MgaProject.cpp,1.67,1.68
MgaProject.h,1.31,1.32 MgaTerritory.cpp,1.2,1.3
MgaTerritory.h,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list