[GME-commit] GMESRC/GME/Mga MgaFolder.cpp,1.29,1.30
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Mon May 16 22:57:13 CDT 2005
- Previous message: [GME-commit] GMESRC/GME/ConstraintManager OCLTree.cpp,1.30,1.31
OCLTree.h,1.15,1.16 OclConstraint.cpp,1.8,1.9
OclConstraint.h,1.6,1.7 ocl.g,1.15,1.16
- Next message: [GME-commit] GMESRC/GME/Interfaces Mga.idl,1.44,1.45
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /project/gme-repository/GMESRC/GME/Mga
In directory escher:/tmp/cvs-serv30771
Modified Files:
MgaFolder.cpp
Log Message:
get_ObjectByPath, get_NthObjectByPath BSTR handling fixed.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: MgaFolder.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Mga/MgaFolder.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** MgaFolder.cpp 15 Apr 2005 18:24:10 -0000 1.29
--- MgaFolder.cpp 16 May 2005 21:57:10 -0000 1.30
***************
*** 454,458 ****
}
! void str_scan_name( OLECHAR ** p_ptr, CComBSTR& p_name, CComBSTR& p_kind, CComBSTR& p_relpos)
{
char str_to_find1[] = "|kind=";
--- 454,458 ----
}
! void str_scan_name( OLECHAR ** p_ptr, int len_of, CComBSTR& p_name, CComBSTR& p_kind, CComBSTR& p_relpos)
{
char str_to_find1[] = "|kind=";
***************
*** 462,469 ****
std::string id;
! while( *pi != 0 && *pi != '/') // goes to the next separator
{
id += *pi;
! ++pi;
}
--- 462,469 ----
std::string id;
! while( len_of > 0 && *pi != '/') // goes to the next separator
{
id += *pi;
! ++pi;--len_of;
}
***************
*** 514,517 ****
--- 514,519 ----
OLECHAR *p = path;
+ int lenOf = SysStringLen( path);
+
if(*p == '/') p++;
CComPtr<IMgaObject> pp;
***************
*** 523,527 ****
OLECHAR * p2 = p;
! str_scan_name( &p2, name_b, kind_b, relpos_b);
ASSERT( name_b != 0);
--- 525,529 ----
OLECHAR * p2 = p;
! str_scan_name( &p2, lenOf + path - p2, name_b, kind_b, relpos_b); // 2nd parameter = the # of characters left
ASSERT( name_b != 0);
***************
*** 541,545 ****
if ( *p2 != 0)
{
! ObjForCore(ITER)->get_ObjectByPath( p2, pVal);
}
else
--- 543,547 ----
if ( *p2 != 0)
{
! ObjForCore(ITER)->get_ObjectByPath( CComBSTR(p2), pVal);
}
else
***************
*** 556,560 ****
{
CComObjPtr<IMgaObject> pdummyVal;
! ObjForCore(ITER)->get_ObjectByPath( p2, PutOut(pdummyVal));
if( pdummyVal)
{
--- 558,562 ----
{
CComObjPtr<IMgaObject> pdummyVal;
! ObjForCore(ITER)->get_ObjectByPath( CComBSTR(p2), PutOut(pdummyVal));
if( pdummyVal)
{
***************
*** 582,586 ****
if(pp) {
! if(*p != 0) COMTHROW(pp->get_ObjectByPath(CComBSTR(p), pVal)); // corr by ZolMol
else *pVal = pp.Detach();
}
--- 584,588 ----
if(pp) {
! if(*p != 0) COMTHROW(pp->get_ObjectByPath( CComBSTR(p), pVal)); // corr by ZolMol
else *pVal = pp.Detach();
}
***************
*** 592,596 ****
OLECHAR * p2 = p;
! str_scan_name( &p2, name_b, CComBSTR(), CComBSTR()); // disregard kind and relpos
ASSERT( name_b != 0);
--- 594,598 ----
OLECHAR * p2 = p;
! str_scan_name( &p2, lenOf + path - p2, name_b, CComBSTR(), CComBSTR()); // disregard kind and relpos
ASSERT( name_b != 0);
***************
*** 606,610 ****
if ( *p2 != 0)
{
! ObjForCore(ITER)->get_ObjectByPath( p2, pVal);
}
else
--- 608,612 ----
if ( *p2 != 0)
{
! ObjForCore(ITER)->get_ObjectByPath( CComBSTR(p2), pVal);
}
else
***************
*** 621,625 ****
{
CComObjPtr<IMgaObject> pdummyVal;
! ObjForCore(ITER)->get_ObjectByPath( p2, PutOut(pdummyVal));
if( pdummyVal)
{
--- 623,627 ----
{
CComObjPtr<IMgaObject> pdummyVal;
! ObjForCore(ITER)->get_ObjectByPath( CComBSTR(p2), PutOut(pdummyVal));
if( pdummyVal)
{
***************
*** 653,656 ****
--- 655,660 ----
OLECHAR *p = path;
+ int lenOf = SysStringLen( path);
+
if(*p == '/') p++;
CComPtr<IMgaObject> pp;
***************
*** 662,666 ****
OLECHAR * p2 = p;
! str_scan_name( &p2, name_b, kind_b, relpos_b);
ASSERT( name_b != 0);
--- 666,670 ----
OLECHAR * p2 = p;
! str_scan_name( &p2, lenOf + path - p2, name_b, kind_b, relpos_b);
ASSERT( name_b != 0);
***************
*** 721,725 ****
if ( *p2 != 0)
{
! ObjForCore(the_right_one)->get_NthObjectByPath(n_th, p2, pVal);
}
else
--- 725,729 ----
if ( *p2 != 0)
{
! ObjForCore(the_right_one)->get_NthObjectByPath(n_th, CComBSTR(p2), pVal);
}
else
- Previous message: [GME-commit] GMESRC/GME/ConstraintManager OCLTree.cpp,1.30,1.31
OCLTree.h,1.15,1.16 OclConstraint.cpp,1.8,1.9
OclConstraint.h,1.6,1.7 ocl.g,1.15,1.16
- Next message: [GME-commit] GMESRC/GME/Interfaces Mga.idl,1.44,1.45
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list