Skip to content

Commit

Permalink
App/Toponaming: Clarify return value of addStringHasher
Browse files Browse the repository at this point in the history
  • Loading branch information
chennes committed Sep 17, 2023
1 parent ef91d82 commit 6704cc6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/App/Document.h
Original file line number Diff line number Diff line change
Expand Up @@ -473,22 +473,22 @@ class AppExport Document : public App::PropertyContainer
(const App::DocumentObject* from, const App::DocumentObject* to) const;
//@}

/** Called by property during properly save its containing StringHasher
/** Called by a property during save to store its StringHasher
*
* @param hasher: the input hasher
* @return Returns a pair<bool,int>. The boolean indicates if the
* StringHasher has been saved before. The integer is the hasher index.
* StringHasher has been added before. The integer is the hasher index.
*
* The StringHasher object is designed to be shared among multiple objects.
* We must not save duplicate copies of the same hasher, and must be
* able to restore with the same sharing relationship. This function returns
* whether the hasher has been saved before by other objects, and the index
* of the hasher. If the hasher has not been saved before, the object must
* whether the hasher has been added before by other objects, and the index
* of the hasher. If the hasher has not been added before, the object must
* save the hasher by calling StringHasher::Save
*/
std::pair<bool,int> addStringHasher(const StringHasherRef & hasher) const;

/** Called by property to restore its containing StringHasher
/** Called by property to restore its StringHasher
*
* @param index: the index previously returned by calling addStringHasher()
* during save. Or if is negative, then return document's own string hasher.
Expand Down

0 comments on commit 6704cc6

Please sign in to comment.