本文整理汇总了C++中ObjectFactory::destroyObject方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectFactory::destroyObject方法的具体用法?C++ ObjectFactory::destroyObject怎么用?C++ ObjectFactory::destroyObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectFactory
的用法示例。
在下文中一共展示了ObjectFactory::destroyObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: freeWizard
void freeWizard(WizardObject* pWizard)
{
ObjectFactory* pFact = Service<ApplicationServices>()->getObjectFactory();
if (pFact != NULL)
{
pFact->destroyObject(pWizard, TypeConverter::toString<WizardObject>());
}
}
示例2: freePlugIn
void freePlugIn(ExecutableAgent* pPlugin)
{
ObjectFactory* pFact = Service<ApplicationServices>()->getObjectFactory();
if (pFact != NULL)
{
pFact->destroyObject(pPlugin, TypeConverter::toString<ExecutableAgent>());
}
}
示例3: execute
//.........这里部分代码省略.........
rowSkip = *mpRowSkipFactor;
}
// Start column
DimensionDescriptor startColumn;
if (mpStartColumn != NULL)
{
startColumn = pRasterDescriptor->getOriginalColumn(*mpStartColumn - 1);
}
// End column
DimensionDescriptor endColumn;
if (mpEndColumn != NULL)
{
endColumn = pRasterDescriptor->getOriginalColumn(*mpEndColumn - 1);
}
// Column skip
unsigned int columnSkip = 0;
if (mpColumnSkipFactor != NULL)
{
columnSkip = *mpColumnSkipFactor;
}
// Start band
DimensionDescriptor startBand;
if (mpStartBand != NULL)
{
startBand = pRasterDescriptor->getOriginalBand(*mpStartBand - 1);
}
// End band
DimensionDescriptor endBand;
if (mpEndBand != NULL)
{
endBand = pRasterDescriptor->getOriginalBand(*mpEndBand - 1);
}
// Band skip
unsigned int bandSkip = 0;
if (mpBandSkipFactor != NULL)
{
bandSkip = *mpBandSkipFactor;
}
pFileDescriptor = RasterUtilities::generateFileDescriptorForExport(pRasterDescriptor,
mpFilename->getFullPathAndName(), startRow, endRow, rowSkip, startColumn, endColumn, columnSkip,
startBand, endBand, bandSkip);
}
}
// Create a file descriptor with the input filename
if (pFileDescriptor == NULL)
{
FactoryResource<FileDescriptor> pFactoryFileDescriptor;
pFileDescriptor = pFactoryFileDescriptor.release();
if (pFileDescriptor != NULL)
{
pFileDescriptor->setFilename(mpFilename->getFullPathAndName());
}
}
if (pFileDescriptor == NULL)
{
reportError("Could not create the file descriptor!", "219F9340-1681-4BD8-90B4-2D9335E8B751");
return false;
}
// Set the output arg value
if (pOutArgList != NULL)
{
PlugInArg* pArg = NULL;
// File descriptor
if (pOutArgList->getArg("File Descriptor", pArg) && (pArg != NULL))
{
pArg->setActualValue(pFileDescriptor);
}
else
{
// Destroy the file descriptor
Service<ApplicationServices> pApp;
if (pApp.get() != NULL)
{
ObjectFactory* pObjFact = pApp->getObjectFactory();
if (pObjFact != NULL)
{
pObjFact->destroyObject(pFileDescriptor, "FileDescriptor");
}
}
reportError("Could not set the file descriptor output value!", "98FB7EB3-BC2A-4075-9DE2-FD28ABAECE5B");
return false;
}
}
reportComplete();
return true;
}