本文整理匯總了C++中XString::isEmpty方法的典型用法代碼示例。如果您正苦於以下問題:C++ XString::isEmpty方法的具體用法?C++ XString::isEmpty怎麽用?C++ XString::isEmpty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XString
的用法示例。
在下文中一共展示了XString::isEmpty方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: kbc
//.........這裏部分代碼省略.........
// sprintf(ac, "");
//if (MAIN_argc > 1 && i <= MAIN_argc) sprintf(ac, "%s", MAIN_argv[i]);
//sprintf(ac, "C:/kbasic16/kbide/examples/kbasic/builtin/__class__.kbasic");
//if (utility::my_stricmp(ac, "") == 0) return 0;
//bUseCache = false;
{
sKBasicPath = MAIN_argv[0];
bool bDebug = false;
#ifdef WINDOWS // HIDE
bDebug = sKBasicPath.contains("Debug"); // HIDE
#endif // HIDE
sKBasicPath = sKBasicPath.replace("\\", "/");
#ifdef WINDOWS // HIDE
sKBasicPath = sKBasicPath.replace("/Debug", "", false); // HIDE
sKBasicPath = sKBasicPath.replace("/Release", "", false); // HIDE
sKBasicPath = sKBasicPath.replace(".exe", "", false); // HIDE
#endif // HIDE
if (bDebug){
int n = sKBasicPath.findRev("/");
if (n >= 0) sKBasicPath = sKBasicPath.left(n);
sKBasicPath = sKBasicPath.replace("kbc", "kbide/ide/cache");
} else {
sKBasicPath = sKBasicPath.replace("kbc", "ide/cache");
}
if (sKBasicPath.isEmpty()) return 0;
}
// if (checkLicense(acLicense) == false) return 0;
// checkSerialNo();
textbuffer *myTextbuffer = new textbuffer(); // needed to truncate big input strings or zero terminate them
cache *my_cache = new cache();
token *myToken = new token();
scanner *myScanner = new scanner(myToken, my_cache);
char *acText;
bool b = true;
if (utility::readSourceFile(&acText, cachePath("project.name").ascii(), myTextbuffer)){
acText = utility::eatUTF16DOM(acText);
sProjectName = acText;
}
// if (b && (b = utility::readSourceFile(&acText, "c:/kbasic16/kbide/ide/cache/C__kbasic16_kbide_examples_kbasic_builtin___class__.kbasic.scanner", myTextbuffer))){}
{ // delete runtime.parser file
XString m = cachePath("runtime.parser");
//CONSOLE printError(cachePath("runtime.parser").ascii());
XFile f(m.ascii());
if (!f.open(Truncate)){
CONSOLE printError("Could not create runtime parser file: ");
CONSOLE printError(m.ascii());
b = false;
示例2: atoi
//.........這裏部分代碼省略.........
do {
n = sText.find("Begin ", n);
if (n == -1) break;
int n2 = sText.find("\n", n);
n += 6;
XString sLine = sText.mid(n, n2 - n);
int n3 = sLine.find(" ");
XString sType = sLine.mid(0, n3);
XString sName = sLine.mid(n3 + 1);
sName = sName.stripWhiteSpace();
sDefinition += "Public ";
sDefinition += sName;
sDefinition += " As ";
sDefinition += sType;
sDefinition += "\n";
sConstructor += sName;
sConstructor += " = Control(\"";
sConstructor += sName;
sConstructor += "\")\n";
n = sText.find("End\n", n); // proceed to the end of that control defintion
} while (true);
int X = 0;
int nFocusOrder = 1000;
if (!sSQLName.isEmpty() && bForm)
{
if (sSQLControls.isEmpty()){
createSQLControl("Recordset", 90, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls);
createSQLControl("First", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls);
createSQLControl("Previous", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls);
createSQLControl("GoTo", 60, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls);
createSQLControl("Next", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls);
createSQLControl("Last", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls);
createSQLControl("AddNew", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls);
X += 5;
createSQLControl("Info", 110, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls);
X += 20;
createSQLControl("Update", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls);
X += 20;
createSQLControl("Delete", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls);
} else {
if (sSQLControls.contains("Recordset")){ createSQLControl("Recordset", 90, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls); }
if (sSQLControls.contains("First")){ createSQLControl("First", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls); }
if (sSQLControls.contains("Previous")){ createSQLControl("Previous", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls); }
if (sSQLControls.contains("GoTo")){ createSQLControl("GoTo", 50, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls); }
if (sSQLControls.contains("Next")){ createSQLControl("Next", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls); }
if (sSQLControls.contains("Last")){ createSQLControl("Last", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls); }
if (sSQLControls.contains("AddNew")){ createSQLControl("AddNew", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls); }
X += 5;
if (sSQLControls.contains("Info")){ createSQLControl("Info", 90, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls); }
X += 20;
if (sSQLControls.contains("Update")){ createSQLControl("Update", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls); }
X += 20;
if (sSQLControls.contains("Delete")){ createSQLControl("Delete", 20, &sDefinition, &sAdditonalCode, &sAdditional, &X, nBorderLeft, nBorderBottom, nHeight, nFocusOrder++, &sSQLControls); }
/*
X += 20;