当前位置: 首页>>代码示例>>C++>>正文


C++ Pointer::GetName方法代码示例

本文整理汇总了C++中iconfigurationelement::Pointer::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::GetName方法的具体用法?C++ Pointer::GetName怎么用?C++ Pointer::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在iconfigurationelement::Pointer的用法示例。


在下文中一共展示了Pointer::GetName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ReadElement

bool PerspectiveRegistryReader::ReadElement(const IConfigurationElement::Pointer &element)
{
  if (element->GetName() == WorkbenchRegistryConstants::TAG_PERSPECTIVE)
  {
    try
    {
      QString id = element->GetAttribute(WorkbenchRegistryConstants::ATT_ID);
      PerspectiveDescriptor::Pointer desc(
          new PerspectiveDescriptor(id, element));
      QList<berry::IConfigurationElement::Pointer> childs = element->GetChildren("description");
      if (!childs.isEmpty())
      {
        desc->SetDescription(childs[0]->GetValue());
      }
      registry->AddPerspective(desc);
    }
    catch (const CoreException& e)
    {
      // log an error since its not safe to open a dialog here
      WorkbenchPlugin::Log("Unable to create layout descriptor.", e);//$NON-NLS-1$
    }
    return true;
  }

  return false;
}
开发者ID:151706061,项目名称:MITK,代码行数:26,代码来源:berryPerspectiveRegistryReader.cpp

示例2: result

Expression::Pointer
StandardElementHandler::Create(ExpressionConverter* converter, IConfigurationElement::Pointer element)
{
    std::string name = element->GetName();
    if (ExpressionTagNames::INSTANCEOF == name) {
        Expression::Pointer result(new InstanceofExpression(element));
        return result;
    } else if (ExpressionTagNames::TEST == name) {
        Expression::Pointer result(new TestExpression(element));
        return result;
    } else if (ExpressionTagNames::OR == name) {
        CompositeExpression::Pointer result(new OrExpression());
        this->ProcessChildren(converter, element, result);
        return result;
    } else if (ExpressionTagNames::AND == name) {
        CompositeExpression::Pointer result(new AndExpression());
        this->ProcessChildren(converter, element, result);
        return result;
    } else if (ExpressionTagNames::NOT == name) {
        IConfigurationElement::vector children(element->GetChildren());
        Expression::Pointer result(new NotExpression(converter->Perform(children[0])));
        return result;
    } else if (ExpressionTagNames::WITH == name) {
        CompositeExpression::Pointer result(new WithExpression(element));
        this->ProcessChildren(converter, element, result);
        return result;
    } else if (ExpressionTagNames::ADAPT == name) {
        CompositeExpression::Pointer result(new AdaptExpression(element));
        this->ProcessChildren(converter, element, result);
        return result;
    } else if (ExpressionTagNames::ITERATE == name) {
        CompositeExpression::Pointer result(new IterateExpression(element));
        this->ProcessChildren(converter, element, result);
        return result;
    } else if (ExpressionTagNames::COUNT == name) {
        Expression::Pointer result(new CountExpression(element));
        return result;
    } else if (ExpressionTagNames::SYSTEM_TEST == name) {
        Expression::Pointer result(new SystemTestExpression(element));
        return result;
    } else if (ExpressionTagNames::RESOLVE == name) {
        CompositeExpression::Pointer result(new ResolveExpression(element));
        this->ProcessChildren(converter, element, result);
        return result;
    } else if (ExpressionTagNames::ENABLEMENT == name) {
        CompositeExpression::Pointer result(new EnablementExpression(element));
        this->ProcessChildren(converter, element, result);
        return result;
    } else if (ExpressionTagNames::EQUALS == name) {
        Expression::Pointer result(new EqualsExpression(element));
        return result;
    } else if (ExpressionTagNames::REFERENCE == name) {
        Expression::Pointer result(new ReferenceExpression(element));
        return result;
    }
    return Expression::Pointer();
}
开发者ID:robotdm,项目名称:MITK,代码行数:57,代码来源:berryStandardElementHandler.cpp

示例3: ProcessExtension

bool PerspectiveExtensionReader::ProcessExtension(
    IConfigurationElement::Pointer element)
{
  IConfigurationElement::vector children = element->GetChildren();
  for (unsigned int nX = 0; nX < children.size(); nX++)
  {
    IConfigurationElement::Pointer child = children[nX];
    std::string type = child->GetName();
    if (this->IncludeTag(type))
    {
      bool result = false;
      if (type == WorkbenchRegistryConstants::TAG_ACTION_SET)
      {
        result = this->ProcessActionSet(child);
      }
      else if (type == WorkbenchRegistryConstants::TAG_VIEW)
      {
        result = this->ProcessView(child);
      }
      else if (type == WorkbenchRegistryConstants::TAG_VIEW_SHORTCUT)
      {
        result = this->ProcessViewShortcut(child);
      }
//      else if (type == IorkbenchRegistryConstants::TAG_NEW_WIZARD_SHORTCUT)
//      {
//        result = processWizardShortcut(child);
//      }
      else if (type == WorkbenchRegistryConstants::TAG_PERSP_SHORTCUT)
      {
        result = this->ProcessPerspectiveShortcut(child);
      }
      else if (type == WorkbenchRegistryConstants::TAG_SHOW_IN_PART)
      {
        result = this->ProcessShowInPart(child);
      }
      if (!result)
      {
        WorkbenchPlugin::Log("Unable to process element: " + //$NON-NLS-1$
            type + " in perspective extension: " + //$NON-NLS-1$
            element->GetDeclaringExtension()->GetUniqueIdentifier());
      }
    }
  }
  return true;
}
开发者ID:AGrafmint,项目名称:MITK,代码行数:45,代码来源:berryPerspectiveExtensionReader.cpp

示例4: ReadElement

bool PerspectiveExtensionReader::ReadElement(
    IConfigurationElement::Pointer element)
{
  std::string type = element->GetName();
  if (type == WorkbenchRegistryConstants::TAG_PERSPECTIVE_EXTENSION)
  {
    std::string id;
    element->GetAttribute(WorkbenchRegistryConstants::ATT_TARGET_ID, id);
    if (targetID == id || "*" == id)
    { //$NON-NLS-1$
//      if (tracker != null)
//      {
//        tracker.registerObject(element.getDeclaringExtension(),
//            new DirtyPerspectiveMarker(id), IExtensionTracker.REF_STRONG);
//      }
      return this->ProcessExtension(element);
    }
    return true;
  }
  return false;
}
开发者ID:AGrafmint,项目名称:MITK,代码行数:21,代码来源:berryPerspectiveExtensionReader.cpp

示例5: ReadElement

bool PerspectiveRegistryReader::ReadElement(IConfigurationElement::Pointer element)
{
  if (element->GetName() == WorkbenchRegistryConstants::TAG_PERSPECTIVE)
  {
    try
    {
      std::string id;
      element->GetAttribute(WorkbenchRegistryConstants::ATT_ID, id);
      PerspectiveDescriptor::Pointer desc(
          new PerspectiveDescriptor(id, element));
      registry->AddPerspective(desc);
    }
    catch (CoreException e)
    {
      // log an error since its not safe to open a dialog here
      WorkbenchPlugin::Log("Unable to create layout descriptor.", e);//$NON-NLS-1$
    }
    return true;
  }

  return false;
}
开发者ID:AGrafmint,项目名称:MITK,代码行数:22,代码来源:berryPerspectiveRegistryReader.cpp

示例6: LogUnknownElement

void RegistryReader::LogUnknownElement(
    IConfigurationElement::Pointer element)
{
  RegistryReader::LogError(element, "Unknown extension tag found: " + element->GetName());//$NON-NLS-1$
}
开发者ID:AGrafmint,项目名称:MITK,代码行数:5,代码来源:berryRegistryReader.cpp


注:本文中的iconfigurationelement::Pointer::GetName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。