本文整理汇总了C++中ossimFilename::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimFilename::empty方法的具体用法?C++ ossimFilename::empty怎么用?C++ ossimFilename::empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimFilename
的用法示例。
在下文中一共展示了ossimFilename::empty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parseKwl
bool ossimEquationUtil::parseKwl(const ossimFilename& kwl_file,
vector<ossimFilename>& inputs,
ossimString& equationSpec,
ossimFilename& output,
ossimString& writerType)
{
ossimKeywordlist kwl;
if (!kwl.addFile(kwl_file))
return false;
ossim_int32 index = 0;
ossim_int32 result = kwl.getNumberOfSubstringKeys("file[0-9]+\\.filename");
const char* lookup = NULL;
ossim_int32 numberOfMatches = 0;
while(numberOfMatches < result)
{
ossimString searchValue = "file" + ossimString::toString(index);
ossimString filename = searchValue + ".filename";
lookup = kwl.find(filename.c_str());
if(lookup)
{
inputs.push_back(ossimFilename(lookup));
++numberOfMatches;
}
++index;
}
equationSpec = kwl.find("equation");
if (equationSpec.empty())
{
ossimNotify(ossimNotifyLevel_FATAL)<<"No equation specified in KWL"<<endl;
return false;
}
output = kwl.find("writer.filename");
if (output.empty())
{
ossimNotify(ossimNotifyLevel_FATAL)<<"No output filename specified in KWL"<<endl;
return false;
}
writerType = kwl.find("writer.type");
if (writerType.empty())
writerType = "tiff_strip";
return true;
}
示例2: in
//**************************************************************************
// CONSTRUCTOR
//**************************************************************************
ossimDtedUhl::ossimDtedUhl(const ossimFilename& dted_file, ossim_int32 offset)
:
theRecSen(),
theField2(),
theLonOrigin(),
theLatOrigin(),
theLonInterval(),
theLatInterval(),
theAbsoluteLE(),
theSecurityCode(),
theNumLonLines(),
theNumLatPoints(),
theMultipleAccuracy(),
theStartOffset(0),
theStopOffset(0)
{
if(!dted_file.empty())
{
// Check to see that dted file exists.
if(!dted_file.exists())
{
theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedUhl::ossimDtedUhl: The DTED file does not exist: " << dted_file << std::endl;
return;
}
// Check to see that the dted file is readable.
if(!dted_file.isReadable())
{
theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedUhl::ossimDtedUhl: The DTED file is not readable --> " << dted_file << std::endl;
return;
}
std::ifstream in(dted_file.c_str());
if(!in)
{
theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
ossimNotify(ossimNotifyLevel_FATAL) << "FATAL ossimDtedUhl::ossimDtedUhl: Error opening the DTED file: " << dted_file << std::endl;
return;
}
in.seekg(offset);
parse(in);
in.close();
}
}
示例3: in
//**************************************************************************
// CONSTRUCTOR
//**************************************************************************
ossimDtedVol::ossimDtedVol(const ossimFilename& dted_file,
ossim_int32 offset)
:
theStartOffset(0),
theStopOffset(0)
{
if(!dted_file.empty())
{
// Check to see that dted file exists.
if(!dted_file.exists())
{
theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
ossimNotify(ossimNotifyLevel_FATAL)
<< "FATAL ossimDtedVol::ossimDtedVol"
<< "\nThe DTED file does not exist: " << dted_file << std::endl;
return;
}
// Check to see that the dted file is readable.
if(!dted_file.isReadable())
{
theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
ossimNotify(ossimNotifyLevel_FATAL)
<< "FATAL ossimDtedVol::ossimDtedVol"
<< "\nThe DTED file is not readable: " << dted_file << std::endl;
return;
}
// Open the dted file for reading.
std::ifstream in(dted_file.c_str());
if(!in)
{
theErrorStatus = ossimErrorCodes::OSSIM_ERROR;
ossimNotify(ossimNotifyLevel_FATAL)
<< "FATAL ossimDtedVol::ossimDtedVol"
<< "\nUnable to open the DTED file: " << dted_file << std::endl;
return;
}
in.seekg(offset);
parse(in);
in.close();
}
}