本文整理汇总了C++中OovString::c_str方法的典型用法代码示例。如果您正苦于以下问题:C++ OovString::c_str方法的具体用法?C++ OovString::c_str怎么用?C++ OovString::c_str使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OovString
的用法示例。
在下文中一共展示了OovString::c_str方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write
bool CppFileContents::write(OovStringRef const fn)
{
SimpleFile file;
eOpenStatus openStat = file.open(fn, M_WriteExclusiveTrunc, OE_Binary);
OovStatus status(openStat == OS_Opened, SC_File);
if(status.ok())
{
OovString includeCov = "#include \"OovCoverage.h\"";
appendLineEnding(includeCov);
updateMemory();
status = file.write(includeCov.c_str(), includeCov.length());
}
if(status.ok())
{
status = file.write(mFileContents.data(), mFileContents.size());
}
if(!status.ok())
{
OovString str = "Unable to write %s ";
str += fn;
str += "\n";
status.report(ET_Error, str.getStr());
}
return status.ok();
}
示例2: rootSourceDirButtonClicked
void ProjectSettingsDialog::rootSourceDirButtonClicked()
{
PathChooser ch;
OovString srcRootDir;
if(ch.ChoosePath(sProjectSettingsDialog->getParentWindow(),
"Open Root Source Directory",
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, srcRootDir))
{
GtkEntry *dirEntry = GTK_ENTRY(Builder::getBuilder()->getWidget(
"RootSourceDirEntry"));
gtk_entry_set_text(dirEntry, srcRootDir.c_str());
}
}
示例3: oovaideProjectDirButtonClicked
void ProjectSettingsDialog::oovaideProjectDirButtonClicked()
{
PathChooser ch;
OovString projectDir;
if(ch.ChoosePath(sProjectSettingsDialog->getParentWindow(),
"Create OOVAIDE Project Directory",
GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER,
projectDir))
{
GtkEntry *dirEntry = GTK_ENTRY(Builder::getBuilder()->getWidget(
"OovaideProjectDirEntry"));
gtk_entry_set_text(dirEntry, projectDir.c_str());
}
}
示例4: updateBuildMenu
void OptionsDialog::updateBuildMenu(OovStringVec &names)
{
for(auto const &item : mMenuItems)
{
gtk_widget_destroy(item);
}
mMenuItems.clear();
GtkMenu *buildMenu = GTK_MENU(Builder::getBuilder()->getWidget("BuildMenu"));
for(auto const &name : names)
{
OovString menuName = std::string("Build ") + name;
GtkWidget *newItem = gtk_menu_item_new_with_label(menuName.c_str());
mMenuItems.push_back(newItem);
gtk_menu_shell_append(GTK_MENU_SHELL(buildMenu), newItem);
g_signal_connect(newItem, "activate", G_CALLBACK(menuItemCallback), nullptr);
gtk_widget_show(newItem);
}
}