本文整理汇总了C++中ossimFilename::isReadable方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimFilename::isReadable方法的具体用法?C++ ossimFilename::isReadable怎么用?C++ ossimFilename::isReadable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimFilename
的用法示例。
在下文中一共展示了ossimFilename::isReadable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
}
示例2: 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();
}
}