<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - remove inheritance to std::map and std::vector"
href="https://bugs.freedesktop.org/show_bug.cgi?id=75757#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - remove inheritance to std::map and std::vector"
href="https://bugs.freedesktop.org/show_bug.cgi?id=75757">bug 75757</a>
from <span class="vcard"><a class="email" href="mailto:kendy@collabora.com" title="Jan Holesovsky <kendy@collabora.com>"> <span class="fn">Jan Holesovsky</span></a>
</span></b>
<pre>As I have just talked to other guy that was a bit confused here; let me
describe the task more thoroughly :-)
First - what is bad about inheriting from the container. It is that that way,
you are exposing much more functionality that would be necessary in this case;
like all the container functionality that might be misused to overcome the API
that is intended here.
So for the PropertyMap, as an example:
You want to remove the inheriting from _PropertyMap, and instead provide a
_PropertyMap m_aPropMap;
private member variable.
Then change all the find(), begin(), end() etc. to m_aPropMap->find(),
m_aPropMap->begin(), m_aPropMap->end() so that the container methods are not
exposed in any way, and the GetPropertyValues() and Insert() methods are the
only way how to access the internal structure(s).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>