本文整理汇总了C++中OovStringVec::insert方法的典型用法代码示例。如果您正苦于以下问题:C++ OovStringVec::insert方法的具体用法?C++ OovStringVec::insert怎么用?C++ OovStringVec::insert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OovStringVec
的用法示例。
在下文中一共展示了OovStringVec::insert方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getComponentFiles
OovStringVec ComponentTypesFile::getComponentFiles(OovStringRef const compName,
OovStringRef const tagStr, bool getNested) const
{
OovStringVec files;
OovStringVec names = getComponentNames();
OovString parentName = compName;
for(auto const &name : names)
{
bool match = false;
if(getNested)
{
if(strcmp(compName, Project::getRootComponentName()) == 0)
{
match = true;
}
else
{
match = compareComponentNames(parentName, name);
}
}
else
{
match = (parentName == name);
}
if(match)
{
OovString tag = ComponentTypesFile::getCompTagName(name, tagStr);
OovString val = mCompSourceListFile.getValue(tag);
OovStringVec newFiles = CompoundValueRef::parseString(val);
files.insert(files.end(), newFiles.begin(), newFiles.end());
}
}
return files;
}
示例2: makeComponentFile
void CMaker::makeComponentFile(OovStringRef const compName,
ComponentTypesFile::eCompTypes compType,
OovStringVec const &sources, OovStringRef const destName)
{
OovString str;
if(mVerbose)
printf("Processing %s\n %s\n", compName.getStr(), destName.getStr());
if(compType == ComponentTypesFile::CT_Program)
{
if(mVerbose)
printf(" Executable\n");
addCommandAndNames(CT_Exec, compName, sources, str);
addLibsAndIncs(compName, str);
str += "install(TARGETS ";
str += compName;
str += "\n EXPORT ";
str += mProjectName;
str += "Targets";
str += "\n RUNTIME DESTINATION \"${INSTALL_BIN_DIR}\" COMPONENT lib)\n";
}
else if(compType == ComponentTypesFile::CT_SharedLib)
{
if(mVerbose)
printf(" SharedLib\n");
addCommandAndNames(CT_Shared, compName, sources, str);
addLibsAndIncs(compName, str);
str += "install(TARGETS ";
str += compName;
str += "\n LIBRARY DESTINATION \"${INSTALL_LIB_DIR}\" COMPONENT lib)\n";
}
else if(compType == ComponentTypesFile::CT_StaticLib)
{
if(mVerbose)
printf(" Library\n");
OovStringVec headers = mCompTypes.getComponentIncludes(compName);
discardDirs(headers);
OovStringVec allFiles = headers;
allFiles.insert(allFiles.end(), sources.begin(), sources.end() );
std::sort(allFiles.begin(), allFiles.end(), compareNoCase);
if(sources.size() == 0)
{
addCommandAndNames(CT_Interface, compName, allFiles, str);
str += "set_target_properties(";
str += compName;
str += " PROPERTIES LINKER_LANGUAGE CXX)\n";
}
else
addCommandAndNames(CT_Static, compName, allFiles, str);
addCommandAndNames(CT_TargHeaders, compName, headers, str);
str += "install(TARGETS ";
str += compName;
str += "\n EXPORT ";
str += mProjectName;
str += "Targets";
str += "\n ARCHIVE DESTINATION \"${INSTALL_LIB_DIR}\" COMPONENT lib";
str += "\n PUBLIC_HEADER DESTINATION \"${INSTALL_INCLUDE_DIR}/";
str += mProjectName;
str += "\" COMPONENT dev)\n";
}
writeFile(destName, str);
}