本文整理汇总了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;
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例6: LogUnknownElement
void RegistryReader::LogUnknownElement(
IConfigurationElement::Pointer element)
{
RegistryReader::LogError(element, "Unknown extension tag found: " + element->GetName());//$NON-NLS-1$
}