本文整理汇总了C++中OovStringVec类的典型用法代码示例。如果您正苦于以下问题:C++ OovStringVec类的具体用法?C++ OovStringVec怎么用?C++ OovStringVec使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了OovStringVec类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getComboId
void BuildVarSettingsDialog::addFilterList()
{
GuiTreeItem parent;
OovString filterTag;
int index = getComboId("FilterNameComboboxtext", mFilterNames);
if(index != BAD_INDEX)
{
switch(index)
{
case FT_BuildConfig:
filterTag = OptFilterNameBuildConfig;
break;
case FT_BuildMode:
filterTag = OptFilterNameBuildMode;
break;
case FT_Component:
filterTag = OptFilterNameComponent;
break;
case FT_Platform:
filterTag = OptFilterNamePlatform;
break;
}
}
OovStringVec filterVals = mFilterValuesTreeView.getSelected();
if(filterVals.size() > 0)
{
VariableFilter filter(filterTag, filterVals[0]);
mFiltersTreeView.appendText(parent, filter.getFilterAsString());
}
updateSettingText();
}
示例2: updateDebugDataValue
void Editor::updateDebugDataValue()
{
OovStringVec strs = mVarView.getSelected();
if(strs.size() > 0)
{
mEditFiles.getDebugger().startGetVariable(strs[0]);
}
}
示例3: getAllCrcLinkArgs
const OovStringVec ProjectBuildArgs::getAllCrcLinkArgs() const
{
OovStringVec vec;
for(auto item : mLinkArgs)
vec.push_back(item.mString);
std::copy(mPackageCrcLinkArgs.begin(), mPackageCrcLinkArgs.end(),
std::back_inserter(vec));
return vec;
}
示例4: removeVariableSetting
void BuildVariablesDialog::removeVariableSetting()
{
OovStringVec vars = mVarListTreeView.getSelected();
if(vars.size() > 0)
{
BuildVariable origBuildVar;
origBuildVar.initVarFromString(vars[0]);
mVarListTreeView.removeSelected();
mProject.removeName(origBuildVar.getVarFilterName());
}
}
示例5: getCompSources
OovStringVec CMaker::getCompSources(OovStringRef const compName)
{
OovStringVec sources = mCompTypes.getComponentSources(compName);
OovString compPath = mCompTypes.getComponentAbsolutePath(compName);
for(auto &src : sources)
{
src.erase(0, compPath.length());
}
std::sort(sources.begin(), sources.end(), compareNoCase);
return sources;
}
示例6: updateArgs
void ProjectBuildArgs::updateArgs()
{
OovStringVec args;
CompoundValue baseArgs;
baseArgs.parseString(mBuildEnv.getValue(OptCppArgs));
for(auto const &arg : baseArgs)
{
args.push_back(arg);
}
parseArgs(args);
}
示例7: getComponentNames
OovStringVec ComponentTypesFile::getComponentNames(bool definedComponentsOnly) const
{
OovStringVec compNames = CompoundValueRef::parseString(
mCompTypesFile.getValue("Components"));
if(definedComponentsOnly)
{
compNames.erase(std::remove_if(compNames.begin(), compNames.end(),
[this](OovString &name)
{ return(getComponentType(name) == CT_Unknown); }), compNames.end());
}
return compNames;
}
示例8: getMatchingNames
OovStringVec NameValueRecord::getMatchingNames(OovStringRef const baseName) const
{
OovStringVec names;
int len = baseName.numBytes();
for(auto const &nv : mNameValues)
{
if(nv.first.compare(0, len, baseName, len) == 0)
{
names.push_back(nv.first);
}
}
return names;
}
示例9: deleteSelected
void deleteSelected()
{
OovString selStr = mPathMapList.getSelected();
if(selStr.length() > 0)
{
OovStringVec vec = selStr.split(" > ");
if(vec.size() == 2)
{
mPathMapList.removeSelected();
mDiagramPathMap->remove(ZonePathReplaceItem(vec[0], vec[1]));
}
}
}
示例10: StringJoin
OovString StringJoin(OovStringVec const &tokens, char delimiter)
{
OovString str;
for(size_t i=0; i<tokens.size(); i++)
{
str += tokens[i];
if(i < tokens.size()-1)
{
str += delimiter;
}
}
return str;
}
示例11: getCompLibrariesAndIncs
void CMaker::addLibsAndIncs(OovStringRef const compName, OovString &str)
{
OovStringVec extraIncs;
OovStringVec libs = getCompLibrariesAndIncs(compName, extraIncs);
addCommandAndNames(CT_TargLinkLibs, compName, libs, str);
if(extraIncs.size())
{
str += "include_directories(";
appendNames(extraIncs, ',', str);
str += ")\n\n";
}
}
示例12: getComponentNamesByType
OovStringVec ComponentTypesFile::getComponentNamesByType(eCompTypes cft) const
{
OovStringVec allCompNames = CompoundValueRef::parseString(
mCompTypesFile.getValue("Components"));
OovStringVec filteredNames;
for(auto const &compName : allCompNames)
{
if(getComponentType(compName) == cft)
{
filteredNames.push_back(compName);
}
}
return filteredNames;
}
示例13: GTK_ENTRY
void OptionsDialog::addConfig()
{
GtkEntry *newNameEntry = GTK_ENTRY(Builder::getBuilder()->getWidget("NewConfigNameEntry"));
// Update the build config option
std::string compStr = mProjectOptions.getValue(OptBuildConfigs);
CompoundValue compVal;
compVal.parseString(compStr);
OovString newName = Gui::getText(newNameEntry);
OovStringVec cfgs = compVal;
cfgs.push_back(BuildConfigAnalysis);
cfgs.push_back(BuildConfigDebug);
cfgs.push_back(BuildConfigRelease);
bool found = std::find(cfgs.begin(), cfgs.end(), newName) != cfgs.end();
if(!found)
{
compVal.addArg(newName);
mProjectOptions.setNameValue(OptBuildConfigs, compVal.getAsString());
// Leave what is on the screen, and change the config name.Save the
// screen data to the new config.
mCurrentBuildConfig = newName;
// ScreenOptions options(mCurrentBuildConfig);
// options.screenToOptions();
updateBuildConfig();
}
else
Gui::messageBox("Configuration already exists", GTK_MESSAGE_INFO);
}
示例14: getErrorPosition
static int getErrorPosition(OovStringRef const line, int &charOffset)
{
int lineNum = -1;
OovStringVec tokens = StringSplit(line, ':');
auto iter = std::find_if(tokens.begin(), tokens.end(),
[](OovStringRef const tok)
{ return(isdigit(tok[0])); }
);
int starti = iter-tokens.begin();
if(tokens[starti].getInt(0, INT_MAX, lineNum))
{
if(static_cast<unsigned int>(starti+1) < tokens.size())
{
tokens[starti+1].getInt(0, INT_MAX, charOffset);
}
}
return lineNum;
}
示例15: split
// First arg at index 0 is the command.
OovString OovIpcMsg::getArg(size_t argNum) const
{
OovStringVec args = split(',');
OovString arg;
#if(DEBUG_IPC)
if(argNum == 0)
{
FILE *fp = fopen("IPC.txt", "a");
fprintf(fp, "RCV: %s\n", cmdStr.getStr());
fclose(fp);
}
#endif
if(argNum < args.size())
{
arg = args[argNum];
}
return arg;
}