[commit] r2013 - in trunk/GME: Interfaces Mga

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Tue Aug 14 14:27:55 CDT 2012


Author: ksmyth
Date: Tue Aug 14 14:27:52 2012
New Revision: 2013

Log:
GetObjectByPath documentation

Modified:
   trunk/GME/Interfaces/Mga.idl
   trunk/GME/Mga/MgaFolder.cpp

Modified: trunk/GME/Interfaces/Mga.idl
==============================================================================
--- trunk/GME/Interfaces/Mga.idl	Tue Aug 14 14:27:39 2012	(r2012)
+++ trunk/GME/Interfaces/Mga.idl	Tue Aug 14 14:27:52 2012	(r2013)
@@ -486,6 +486,15 @@
 	[ helpstring("method GetFolderByPath")] HRESULT GetFolderByPath([in] BSTR path, [out, retval] IMgaFolder **pVal);
 	[ helpstring("method EnumExtReferences: Get all ref objects referring from outside to this tree")] 
 											HRESULT EnumExtReferences([in] IMgaFCOs *fcos, [out, retval] IMgaFCOs **pVal);
+// Delimiter in the path is the slash character: '/'
+// searches based on name and kind: "/@MyFolder|kind=OneFolder/@MySubFolder|kind=AnotherFolder" (the project or root folder name must not be included)
+//       or based on plain name:    "/MyFolder/MySubFolder"
+//       or based on relid:         "/#1/#3"
+// these may be mixed like:         "/@MyFolder|kind=OneFolder|relpos=1/#2" which means that look for MyFolder, then select its child with Relid = 2
+// incoming path may contain 'misleading' relpos tokens as well: /@MyFolder|kind=OneFolder|relpos=1/@MySubFolder|kind=AnotherFolder|relpos=2" these are disregarded
+// If several objects are found, NULL is returned
+//
+// FCO::get_ObjectByPath ignores the leading '/'
 	[ propget, helpstring("property ObjectByPath: path may contain /@names or /RelID-s")] 
 			HRESULT ObjectByPath([in] BSTR path, [out, retval] IMgaObject **pVal);
 	[ propget, helpstring("property nthObjectByPath, returns the nth samename object if path not unique")] 

Modified: trunk/GME/Mga/MgaFolder.cpp
==============================================================================
--- trunk/GME/Mga/MgaFolder.cpp	Tue Aug 14 14:27:39 2012	(r2012)
+++ trunk/GME/Mga/MgaFolder.cpp	Tue Aug 14 14:27:52 2012	(r2013)
@@ -585,15 +585,15 @@
 }
 
 
-// The FCO::get_ObjectByPath ignores all the time the leading '/'
-//
-// main delimiter in the path is the slash character: '/'
-// searches based on name and kind: "/@MyFolder|kind=OneFolder/@MySubFolder|kind=AnotherFolder" (the project name must not be included)
+// Delimiter in the path is the slash character: '/'
+// searches based on name and kind: "/@MyFolder|kind=OneFolder/@MySubFolder|kind=AnotherFolder" (the project or root folder name must not be included)
 //       or based on plain name:    "/MyFolder/MySubFolder"
 //       or based on relid:         "/#1/#3"
 // these may be mixed like:         "/@MyFolder|kind=OneFolder|relpos=1/#2" which means that look for MyFolder, then select its child with Relid = 2
 // incoming path may contain 'misleading' relpos tokens as well: /@MyFolder|kind=OneFolder|relpos=1/@MySubFolder|kind=AnotherFolder|relpos=2" these are disregarded
-// if several objects are found 0 is returned !
+// If several objects are found, NULL is returned
+//
+// FCO::get_ObjectByPath ignores the leading '/'
 HRESULT FCO::get_ObjectByPath(BSTR path, IMgaObject ** pVal) {
 	COMTRY {
 		CHECK_OUTPTRPAR(pVal);
@@ -641,7 +641,7 @@
 					if ( *pVal)
 						found = true;
 				}
-				else if( similar && found) // found at least two objects with similar names at this level (samename syblings) and the first sibling contains the needed object already
+				else if( similar && found) // found at least two objects with similar names at this level (samename siblings) and the first sibling contains the needed object already
 				{
 					if ( *p2 != 0)
 					{


More information about the gme-commit mailing list