Exemplo n.º 1
0
 void
 I18nContext::addChild(const ComponentPtr theChild) {
     Container::addChild(theChild);
     I18nItemPtr myChild = boost::dynamic_pointer_cast<I18nItem>(theChild);
     if (!myChild) {
         throw I18nItemNotFoundException("adding child " + theChild->getName() + " to I18nContext " + getName() + " does not work because theChild is not an I18nItem", PLUS_FILE_LINE);
     }
     if (language_ != NO_LANGUAGE) {
         myChild->switchLanguage(language_);
     }
 }
Exemplo n.º 2
0
 void ComponentHolder::addComponent(ComponentPtr comp) {
     mComponents.insert(std::make_pair(comp->getName(), comp));
 }