本文整理汇总了C++中Filename::isDirectory方法的典型用法代码示例。如果您正苦于以下问题:C++ Filename::isDirectory方法的具体用法?C++ Filename::isDirectory怎么用?C++ Filename::isDirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Filename
的用法示例。
在下文中一共展示了Filename::isDirectory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: extractInputArgs
bool ElmBatch::extractInputArgs(PlugInArgList* pInputArgList)
{
if (ElmCore::extractInputArgs(pInputArgList) == false)
{
return false;
}
StepResource pStep("Extract Batch Input Args", "app", "32A136BE-8531-42ca-8B22-086293B5A925");
VERIFY(pStep.get() != NULL);
// Get the Use Gains/Offsets Flag.
if (pInputArgList->getPlugInArgValue<bool>(UseGainsOffsetsArg(), mUseGainsOffsets) == false)
{
pStep->finalize(Message::Failure, "The \"" + UseGainsOffsetsArg() + "\" input arg is invalid.");
if (mpProgress != NULL)
{
mpProgress->updateProgress(pStep->getFailureMessage(), 100, ERRORS);
}
return false;
}
if (mUseGainsOffsets == true)
{
// If the Use Gains/Offsets Flag is set to true, get the Gains/Offsets Filename.
Filename* pFilename = pInputArgList->getPlugInArgValue<Filename>(GainsOffsetsFilenameArg());
if (pFilename == NULL || pFilename->getFullPathAndName().empty() == true)
{
// If the Gains/Offsets Filename is not set, use the default.
mGainsOffsetsFilename = getDefaultGainsOffsetsFilename();
}
else if (pFilename->isDirectory() == true)
{
pStep->finalize(Message::Failure, "The \"" + GainsOffsetsFilenameArg() + "\" cannot be a directory.");
if (mpProgress != NULL)
{
mpProgress->updateProgress(pStep->getFailureMessage(), 100, ERRORS);
}
return false;
}
else
{
mGainsOffsetsFilename = pFilename->getFullPathAndName();
}
}
else
{
// If the Use Gains/Offsets Flag is set to false, get the Signature Filenames and AOI Filenames.
vector<Filename*> pSignatureFilenames;
if (pInputArgList->getPlugInArgValue<vector<Filename*> >
(SignatureFilenamesArg(), pSignatureFilenames) == false)
{
pStep->finalize(Message::Failure, "The \"" + SignatureFilenamesArg() + "\" input arg is invalid.");
if (mpProgress != NULL)
{
mpProgress->updateProgress(pStep->getFailureMessage(), 100, ERRORS);
}
return false;
}
for (vector<Filename*>::iterator iter = pSignatureFilenames.begin(); iter != pSignatureFilenames.end(); ++iter)
{
bool previouslyLoaded;
Signature* pSignature = dynamic_cast<Signature*>
(getElement(*iter, "Signature", NULL, previouslyLoaded));
if (pSignature == NULL)
{
pStep->finalize(Message::Failure, "The \"" + SignatureFilenamesArg() +
"\" input arg contains an invalid value.");
if (mpProgress != NULL)
{
mpProgress->updateProgress(pStep->getFailureMessage(), 100, ERRORS);
}
return false;
}
mpSignatures.push_back(pSignature);
if (previouslyLoaded == false)
{
mpSignaturesToDestroy.push_back(pSignature);
}
}
// Get the AOI names.
vector<Filename*> pAoiFilenames;
if (pInputArgList->getPlugInArgValue<vector<Filename*> >(AoiFilenamesArg(), pAoiFilenames) == false)
{
pStep->finalize(Message::Failure, "The \"" + AoiFilenamesArg() + "\" input arg is invalid.");
if (mpProgress != NULL)
{
mpProgress->updateProgress(pStep->getFailureMessage(), 100, ERRORS);
}
return false;
}
for (vector<Filename*>::iterator iter = pAoiFilenames.begin(); iter != pAoiFilenames.end(); ++iter)
//.........这里部分代码省略.........