I forgot a commented line (just in case....). :-)
El 06/03/2008 05:13 AM, Natanael Olaiz escribió:
El 06/02/2008 07:51 AM, Pau Arumí Albó escribió:
El dv 30 de 05 de 2008 a les 18:40 -0300, en/na Natanael Olaiz va
escriure:
Here is an example of an implementation of
CLAM::Factory::AttributeExists(key,attribute), and its correspondent
use getting the icons in NetworkCanvas.
I've commited the Factory patch. Nice! Revision 11427.
BTW, you can take the KeyExists renaming refactoring if you whish.
Actually, I didn't found any use of ExistsKey, so the changes are
limited to the Factory.
NE changes are still not commited because my local sandbox now reflects
your latest patches and will need some time to revise.
Pau
Index: src/Base/Factory.hxx
===================================================================
--- src/Base/Factory.hxx (revision 11428)
+++ src/Base/Factory.hxx (working copy)
@@ -153,9 +153,9 @@
_registry.GetRegisteredNames( namesList );
}
- bool ExistsKey( const RegistryKey& key) //TODO pau: rename to KeyExists
+ bool KeyExists( const RegistryKey& key)
{
- return _registry.ExistsKey(key);
+ return _registry.KeyExists(key);
}
bool AttributeExists (const std::string& key, const std::string& attribute)
@@ -310,7 +310,7 @@
}
- bool ExistsKey(const RegistryKey& key)
+ bool KeyExists(const RegistryKey& key)
{
typename FactoryEntries::const_iterator it = _factoryEntries.find(key);
if(it == _factoryEntries.end())
@@ -429,7 +429,7 @@
{
typename FactoryEntries::const_iterator it;
it = _factoryEntries.find(key);
- /*if(!ExistsKey(key)) // NOT NEEDED AFETER UNIFYING
+ /*if(!KeyExists(key)) // NOT NEEDED AFETER UNIFYING
{
std::cout << "[Factory] tryind to add metadata to a non-existing key \"" << key << "\"" << std::endl;
// return; //pau: debugging: add metadata anyway. maybe factory registrator is about to be instantiated.
_______________________________________________
Clam-devel mailing list
[email protected]
https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel