本文整理汇总了C++中SmartPointer::IsNotNull方法的典型用法代码示例。如果您正苦于以下问题:C++ SmartPointer::IsNotNull方法的具体用法?C++ SmartPointer::IsNotNull怎么用?C++ SmartPointer::IsNotNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SmartPointer
的用法示例。
在下文中一共展示了SmartPointer::IsNotNull方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
SmartPointer<IHandlerActivation> SlaveHandlerService::ActivateHandler(const QString& commandId,
const SmartPointer<IHandler>& handler,
const SmartPointer<Expression>& expression,
bool global)
{
if (global)
{
const IHandlerActivation::Pointer activation = parent->ActivateHandler(
commandId, handler, expression, global);
parentActivations.insert(activation);
return activation;
}
Expression::Pointer aExpression = defaultExpression;
if (expression.IsNotNull() && defaultExpression.IsNotNull())
{
const AndExpression::Pointer andExpression(new AndExpression());
andExpression->Add(expression);
andExpression->Add(defaultExpression);
aExpression = andExpression;
}
else if (expression.IsNotNull())
{
aExpression = expression;
}
const IHandlerActivation::Pointer localActivation(
new HandlerActivation(commandId, handler, aExpression, IHandlerActivation::ROOT_DEPTH, this));
return DoActivation(localActivation);
}
示例2: Add
void EditorHistory::Add(const SmartPointer<IEditorInput>& input, const SmartPointer<IEditorDescriptor>& desc)
{
if (input.IsNotNull() && input->Exists())
{
EditorHistoryItem::Pointer item(new EditorHistoryItem(input, desc));
Add(item, 0);
}
}
示例3: AddWarning
void RegistryPersistence::AddWarning(QList<SmartPointer<IStatus> >& warningsToLog,
const QString& message,
const SmartPointer<IConfigurationElement>& element,
const QString& id,
const QString& extraAttributeName,
const QString& extraAttributeValue)
{
QString statusMessage = message;
if (element.IsNotNull())
{
statusMessage += ": plug-in='" + element->GetContributor()->GetName() + '\'';
}
if (!id.isNull())
{
if (element.IsNotNull())
{
statusMessage += ',';
}
else
{
statusMessage += ':';
}
statusMessage += " id='" + id + '\'';
}
if (!extraAttributeName.isNull())
{
if ((element.IsNotNull()) || (!id.isNull()))
{
statusMessage += ',';
}
else
{
statusMessage += ':';
}
statusMessage += ' ' + extraAttributeName + "='" + extraAttributeValue + '\'';
}
IStatus::Pointer status(new Status(IStatus::WARNING_TYPE, PlatformUI::PLUGIN_ID(), 0,
statusMessage, BERRY_STATUS_LOC));
warningsToLog.push_back(status);
}