本文整理汇总了C++中ossimFilename::dirCat方法的典型用法代码示例。如果您正苦于以下问题:C++ ossimFilename::dirCat方法的具体用法?C++ ossimFilename::dirCat怎么用?C++ ossimFilename::dirCat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ossimFilename
的用法示例。
在下文中一共展示了ossimFilename::dirCat方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getDotRfpFilenameForEntry
void ossimRpfUtil::getDotRfpFilenameForEntry(const ossimFilename& outputDir,
ossim_uint32 entry,
ossimFilename& outFile) const
{
// Get the build date in the format of (yyyymmddhhmmss).
char s[15];
s[14] = '\0';
time_t t;
time(&t);
tm* lt = localtime(&t);
strftime(s, 15, "%Y%m%d%H%M%S", lt);
std::string date = s;
outFile = outputDir.dirCat(s);
outFile += "_e";
outFile += ossimString::toString(entry);
outFile += ".rpf";
}
示例2: createTocAndCopyFrames
//.........这里部分代码省略.........
throw ossimException(e);
}
// Get the frame file subheader from the source a.toc.
ossimRefPtr<ossimRpfFrameFileIndexSectionSubheader> frameFileSubHeader =
sourceRpfHdr->getNewFrameFileIndexSectionSubheader(sourceADotTocFile);
if ( !frameFileSubHeader.valid() )
{
delete dotRpfStr;
dotRpfStr = 0;
std::string e = MODULE;
e += " ERROR:\nCould not pull frame file sub header from source file: ";
e += sourceADotTocFile.c_str();
throw ossimException(e);
}
// Get the frame file subsection from the source a.toc.
ossimRefPtr<ossimRpfFrameFileIndexSubsection> frameFileSubSection =
sourceRpfHdr->getNewFileIndexSubsection(sourceADotTocFile);
if ( !frameFileSubSection.valid() )
{
delete dotRpfStr;
dotRpfStr = 0;
std::string e = MODULE;
e += " ERROR:\nCould not pull frame file sub section from source file: ";
e += sourceADotTocFile.c_str();
throw ossimException(e);
}
// Open the output file to write to.
const ossimFilename A_DOT_TOC_FILE = "a.toc";
ossimFilename dotTocFile = outputDir.dirCat(A_DOT_TOC_FILE);
std::ofstream* dotTocStr = new std::ofstream;
dotTocStr->open( dotTocFile.c_str(), ios::out|ios::binary );
if ( !dotTocStr->good() )
{
delete dotRpfStr;
dotRpfStr = 0;
delete dotTocStr;
dotTocStr =0;
std::string e = MODULE;
e += " ERROR:\nCould not open: ";
e += dotTocFile.c_str();
throw ossimException(e);
}
// Variables used throughout:
ossimRefPtr<ossimProperty> prop = new ossimStringProperty();
ossimString field;
ossimString s;
std::streampos fileHeaderLength = 0;
std::streampos fileLength = 0;
ossimRefPtr<ossimNitfFileHeaderV2_0> fileHdr = new ossimNitfFileHeaderV2_0();
// Set the CLEVEL:
s = "01";
fileHdr->setComplexityLevel(s);
// Set the OSTAID:
prop = sourceNitfFileHdr->getProperty(ossimNitfFileHeaderV2_X::OSTAID_KW);
fileHdr->setProperty(prop);