本文整理汇总了C++中CTFileStream::ReadDictionary_intenal_t方法的典型用法代码示例。如果您正苦于以下问题:C++ CTFileStream::ReadDictionary_intenal_t方法的具体用法?C++ CTFileStream::ReadDictionary_intenal_t怎么用?C++ CTFileStream::ReadDictionary_intenal_t使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTFileStream
的用法示例。
在下文中一共展示了CTFileStream::ReadDictionary_intenal_t方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DictionaryWriteBegin_t
// enable dictionary in writable file from this point
void CTStream::DictionaryWriteBegin_t(const CTFileName &fnmImportFrom, SLONG slImportOffset)
{
ASSERT(strm_slDictionaryPos==0);
ASSERT(strm_dmDictionaryMode == DM_NONE);
strm_ntDictionary.SetAllocationParameters(100, 5, 5);
strm_ctDictionaryImported = 0;
// if importing an existing dictionary to start with
if (fnmImportFrom!="") {
// open that file
CTFileStream strmOther;
strmOther.Open_t(fnmImportFrom);
// read the dictionary in that stream
strmOther.ReadDictionary_intenal_t(slImportOffset);
// copy the dictionary here
CopyDictionary(strmOther);
// write dictionary importing data
WriteID_t("DIMP"); // dictionary import
*this<<fnmImportFrom<<slImportOffset;
// remember how many filenames were imported
strm_ctDictionaryImported = strm_afnmDictionary.Count();
}
// write dictionary position chunk id
WriteID_t("DPOS"); // dictionary position
// remember where position will be placed
strm_slDictionaryPos = GetPos_t();
// leave space for position
*this<<SLONG(0);
// start dictionary
strm_dmDictionaryMode = DM_ENABLED;
}