void VsRegistry::registerComponent(const std::string& varName, int componentNumber, const std::string& userSuppliedName) { //If the user supplied a name, try to use it if (!userSuppliedName.empty()) { registerComponentInfo(userSuppliedName, varName, componentNumber); } //for backwards compatibility, register the "old-style" name too std::string oldStyleName = getOldComponentName(varName, componentNumber); if (oldStyleName != userSuppliedName) { registerComponentInfo(oldStyleName, varName, componentNumber); } }
CommandClassInfo::CommandClassInfo(std::string className, CommandConstructorFun ctor) :ComponentBase(className, className) , _objectConstructor(ctor){ registerComponentInfo(this); }