本文整理汇总了C++中FileType::getParamValueInt方法的典型用法代码示例。如果您正苦于以下问题:C++ FileType::getParamValueInt方法的具体用法?C++ FileType::getParamValueInt怎么用?C++ FileType::getParamValueInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileType
的用法示例。
在下文中一共展示了FileType::getParamValueInt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dsd
FileType *BaseEditor::chooseFileType(const String *fileName)
{
if (lineSource == null)
{
currentFileType = hrcParser->chooseFileType(fileName, null);
}
else
{
int chooseStr=CHOOSE_STR, chooseLen=CHOOSE_LEN;
DString dsd("default");
FileType *def = hrcParser->getFileType(&dsd);
if(def)
{
chooseStr = def->getParamValueInt(DString("firstlines"), chooseStr);
chooseLen = def->getParamValueInt(DString("firstlinebytes"), chooseLen);
}
currentFileType = chooseFileTypeCh(fileName, chooseStr, chooseLen);
}
setFileType(currentFileType);
return currentFileType;
}
示例2: reloadTypeSettings
void FarEditor::reloadTypeSettings()
{
FileType *ftype = baseEditor->getFileType();
HRCParser *hrcParser = parserFactory->getHRCParser();
DString ds("default") ;
FileType *def = hrcParser->getFileType(&ds);
if (def == nullptr){
throw Exception(DString("No 'default' file type found"));
}
int backparse = def->getParamValueInt(DBackparse, 2000);
maxLineLength = def->getParamValueInt(DMaxLen, 0);
newfore = def->getParamValueInt(DDefFore, -1);
newback = def->getParamValueInt(DDefBack, -1);
const String *value;
value = def->getParamValue(DFullback);
if (value != nullptr && value->equals(&DNo)){
fullBackground = false;
}
value = def->getParamValue(DShowCross);
if (drawCross==2 && value != nullptr){
if (value->equals(&DNone)){
showHorizontalCross = false;
showVerticalCross = false;
};
if (value->equals(&DVertical)){
showHorizontalCross = false;
showVerticalCross = true;
};
if (value->equals(&DHorizontal)){
showHorizontalCross = true;
showVerticalCross = false;
};
if (value->equals(&DBoth)){
showHorizontalCross = true;
showVerticalCross = true;
};
}
value = def->getParamValue(DCrossZorder);
if (value != nullptr && value->equals(&DTop)){
crossZOrder = 1;
}
// installs custom file properties
backparse = ftype->getParamValueInt(DBackparse, backparse);
maxLineLength = ftype->getParamValueInt(DMaxLen, maxLineLength);
newfore = ftype->getParamValueInt(DDefFore, newfore);
newback = ftype->getParamValueInt(DDefBack, newback);
value = ftype->getParamValue(DFullback);
if (value != nullptr && value->equals(&DNo)){
fullBackground = false;
}
value = ftype->getParamValue(DShowCross);
if (drawCross==2 && value != nullptr){
if (value->equals(&DNone)){
showHorizontalCross = false;
showVerticalCross = false;
};
if (value->equals(&DVertical)){
showHorizontalCross = false;
showVerticalCross = true;
};
if (value->equals(&DHorizontal)){
showHorizontalCross = true;
showVerticalCross = false;
};
if (value->equals(&DBoth)){
showHorizontalCross = true;
showVerticalCross = true;
};
}
value = ftype->getParamValue(DCrossZorder);
if (value != nullptr && value->equals(&DTop)){
crossZOrder = 1;
}
baseEditor->setBackParse(backparse);
}