X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9ba3bfdef0f13d77474c16059ca813b75ade43ab..9099ad12e13978786a7ebf503546d275b70c87df:/include/xbt/Extendable.hpp diff --git a/include/xbt/Extendable.hpp b/include/xbt/Extendable.hpp index 81e7150625..99c981d947 100644 --- a/include/xbt/Extendable.hpp +++ b/include/xbt/Extendable.hpp @@ -41,7 +41,7 @@ public: * with a notion of Host extended with another concept (such as mobility). * You could completely externalize these data with an associative map Host->EnergyHost. * It would work, provided that you implement this classical feature correctly (and it would induce a little performance penalty). - * Instead, you should add a new facet to the Host class, that happens to be Facetable. + * Instead, you should add a new extension to the Host class, that happens to be Extendable. * */ template @@ -111,6 +111,7 @@ public: extension_set(rank.id(), value, use_dtor); } +public: // Convenience extension access when the type has a associated EXTENSION ID: template U* extension() { return extension(U::EXTENSION_ID); } template void extension_set(U* p) { extension_set(U::EXTENSION_ID, p); }