本文整理汇总了C++中FileType::getParamValue方法的典型用法代码示例。如果您正苦于以下问题:C++ FileType::getParamValue方法的具体用法?C++ FileType::getParamValue怎么用?C++ FileType::getParamValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileType
的用法示例。
在下文中一共展示了FileType::getParamValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}
示例2: reloadTypeSettings
void FarEditor::reloadTypeSettings()
{
FileType *ftype = baseEditor->getFileType();
HRCParser *hrcParser = parserFactory->getHRCParser();
FileType *def = hrcParser->getFileType(&DString("default"));
if (def == null){
throw Exception(DString("No 'default' file type found"));
}
int backparse = 2000;
UnicodeTools::getNumber(def->getParamValue(DString("backparse")), &backparse);
UnicodeTools::getNumber(def->getParamValue(DString("maxlinelength")), &maxLineLength);
UnicodeTools::getNumber(def->getParamValue(DString("default-fore")), &newfore);
UnicodeTools::getNumber(def->getParamValue(DString("default-back")), &newback);
const String *value;
value = def->getParamValue(DString("fullback"));
if (value != null && value->equals("no")) fullBackground = false;
value = def->getParamValue(DString("show-cross"));
if (value != null && value->equals("none")){
showHorizontalCross = false;
showVerticalCross = false;
};
if (value != null && value->equals("vertical")){
showHorizontalCross = false;
showVerticalCross = true;
};
if (value != null && value->equals("horizontal")){
showHorizontalCross = true;
showVerticalCross = false;
};
if (value != null && value->equals("both")){
showHorizontalCross = true;
showVerticalCross = true;
};
value = def->getParamValue(DString("cross-zorder"));
if (value != null && value->equals("top")) crossZOrder = 1;
// installs custom file properties
UnicodeTools::getNumber(ftype->getParamValue(DString("backparse")), &backparse);
UnicodeTools::getNumber(ftype->getParamValue(DString("maxlinelength")), &maxLineLength);
UnicodeTools::getNumber(ftype->getParamValue(DString("default-fore")), &newfore);
UnicodeTools::getNumber(ftype->getParamValue(DString("default-back")), &newback);
value = ftype->getParamValue(DString("fullback"));
if (value != null && value->equals("no")) fullBackground = false;
value = ftype->getParamValue(DString("show-cross"));
if (value != null && value->equals("none")){
showHorizontalCross = false;
showVerticalCross = false;
};
if (value != null && value->equals("vertical")){
showHorizontalCross = false;
showVerticalCross = true;
};
if (value != null && value->equals("horizontal")){
showHorizontalCross = true;
showVerticalCross = false;
};
if (value != null && value->equals("both")){
showHorizontalCross = true;
showVerticalCross = true;
};
value = ftype->getParamValue(DString("cross-zorder"));
if (value != null && value->equals("top")) crossZOrder = 1;
baseEditor->setBackParse(backparse);
}