MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #29492 All Revisions ] Back to Issue ]
Summary 0029492: Coding Rules. NCollection_IndexedDataMap - add missing documentation to method ::Add()
Revision 2018-02-11 13:41 by kgv
Description Various DataMap collections within NCollection package have similar methods with different undocumented behavior:
- NCollection_IndexedDataMap::Add() adds new key if it does not exist and does not modify existing value if it was already bound.
- NCollection_DataMap::Bind() adds new key if it does not exist and overrides existing value if it was already bound.

It is proposed to document current behavior.
Revision 2018-02-08 11:10 by kgv
Description Map collections within NCollection package lacks straight-forward interface unconditionally reserving requested key.

Moreover, various collections have similar methods with different undocumented behavior:
- NCollection_IndexedDataMap::Add() adds new key if it does not exist and does not modify existing value if it was already bound.
- NCollection_DataMap::Bind() adds new key if it does not exist and overrides existing value if it was already bound.

It is proposed to document current behavior and to add new method Get().
The behavior of new method Get() will match operator[] of std::map collection.
It will return a reference to value of already bound key, or will bind new key with default value.


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker