本文整理汇总了C++中project::ExporterIterator类的典型用法代码示例。如果您正苦于以下问题:C++ ExporterIterator类的具体用法?C++ ExporterIterator怎么用?C++ ExporterIterator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ExporterIterator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateExporters
//======================================================================
void HeaderComponent::updateExporters() noexcept
{
auto selectedName = getSelectedExporterName();
exporterBox.clear();
auto preferredExporterIndex = -1;
int i = 0;
for (Project::ExporterIterator exporter (*project); exporter.next(); ++i)
{
exporterBox.addItem (exporter->getName(), i + 1);
if (selectedName == exporter->getName())
exporterBox.setSelectedId (i + 1);
if (exporter->canLaunchProject() && preferredExporterIndex == -1)
preferredExporterIndex = i;
}
if (exporterBox.getSelectedItemIndex() == -1)
exporterBox.setSelectedItemIndex (preferredExporterIndex != -1 ? preferredExporterIndex
: 0);
updateExporterButton();
}
示例2: createLocalHeaderWrapper
void LibraryModule::createLocalHeaderWrapper (ProjectSaver& projectSaver, const File& originalHeader, const File& localHeader) const
{
Project& project = projectSaver.project;
MemoryOutputStream out;
out << "// This is an auto-generated file to redirect any included" << newLine
<< "// module headers to the correct external folder." << newLine
<< newLine;
StringArray paths, guards;
for (Project::ExporterIterator exporter (project); exporter.next();)
{
const RelativePath headerFromProject (exporter->getModuleFolderRelativeToProject (getID(), projectSaver)
.getChildFile (originalHeader.getFileName()));
const RelativePath fileFromHere (headerFromProject.rebased (project.getProjectFolder(),
localHeader.getParentDirectory(), RelativePath::unknown));
paths.add (fileFromHere.toUnixStyle().quoted());
guards.add ("defined (" + exporter->getExporterIdentifierMacro() + ")");
}
writeGuardedInclude (out, paths, guards);
out << newLine;
projectSaver.replaceFileIfDifferent (localHeader, out);
}
示例3: updateDeprecatedProjectSettingsInteractively
void Project::updateDeprecatedProjectSettingsInteractively()
{
jassert (! ProjucerApplication::getApp().isRunningCommandLine);
for (Project::ExporterIterator exporter (*this); exporter.next();)
exporter->updateDeprecatedProjectSettingsInteractively();
}
示例4: addModule
void EnabledModuleList::addModule (const File& moduleManifestFile, bool copyLocally)
{
ModuleDescription info (moduleManifestFile);
if (info.isValid())
{
const String moduleID (info.getID());
if (! isModuleEnabled (moduleID))
{
ValueTree module (Ids::MODULES);
module.setProperty (Ids::ID, moduleID, nullptr);
state.addChild (module, -1, getUndoManager());
sortAlphabetically();
shouldShowAllModuleFilesInProject (moduleID) = true;
shouldCopyModuleFilesLocally (moduleID) = copyLocally;
RelativePath path (moduleManifestFile.getParentDirectory().getParentDirectory(),
project.getProjectFolder(), RelativePath::projectFolder);
for (Project::ExporterIterator exporter (project); exporter.next();)
exporter->getPathForModuleValue (moduleID) = path.toUnixStyle();
}
}
}
示例5: updateOldStyleConfigList
void Project::updateOldStyleConfigList()
{
ValueTree deprecatedConfigsList (projectRoot.getChildWithName (ProjectExporter::configurations));
if (deprecatedConfigsList.isValid())
{
projectRoot.removeChild (deprecatedConfigsList, nullptr);
for (Project::ExporterIterator exporter (*this); exporter.next();)
{
if (exporter->getNumConfigurations() == 0)
{
ValueTree newConfigs (deprecatedConfigsList.createCopy());
if (! exporter->isXcode())
{
for (int j = newConfigs.getNumChildren(); --j >= 0;)
{
ValueTree config (newConfigs.getChild(j));
config.removeProperty (Ids::osxSDK, nullptr);
config.removeProperty (Ids::osxCompatibility, nullptr);
config.removeProperty (Ids::osxArchitecture, nullptr);
}
}
exporter->settings.addChild (newConfigs, 0, nullptr);
}
}
}
}
示例6: findLocalModuleFolder
File EnabledModuleList::findLocalModuleFolder (const String& moduleID, bool useExportersForOtherOSes)
{
for (Project::ExporterIterator exporter (project); exporter.next();)
{
if (useExportersForOtherOSes || exporter->mayCompileOnCurrentOS())
{
const String path (exporter->getPathForModuleString (moduleID));
if (path.isNotEmpty())
{
const File moduleFolder (project.resolveFilename (path));
if (moduleFolder.exists())
{
if (ModuleDescription (moduleFolder).isValid())
return moduleFolder;
File f = moduleFolder.getChildFile (moduleID);
if (ModuleDescription (f).isValid())
return f;
f = moduleFolder.getChildFile ("modules")
.getChildFile (moduleID);
if (ModuleDescription (f).isValid())
return f;
}
}
}
}
return File();
}
示例7: canCurrentExporterLaunchProject
bool HeaderComponent::canCurrentExporterLaunchProject() const noexcept
{
for (Project::ExporterIterator exporter (*project); exporter.next();)
if (exporter->getName() == getSelectedExporterName() && exporter->canLaunchProject())
return true;
return false;
}
示例8: removeModule
void EnabledModuleList::removeModule (String moduleID) // must be pass-by-value, and not a const ref!
{
for (int i = state.getNumChildren(); --i >= 0;)
if (state.getChild(i) [Ids::ID] == moduleID)
state.removeChild (i, getUndoManager());
for (Project::ExporterIterator exporter (project); exporter.next();)
exporter->removePathForModule (moduleID);
}
示例9: removeModule
void EnabledModuleList::removeModule (const String& moduleID)
{
for (int i = state.getNumChildren(); --i >= 0;)
if (state.getChild(i) [Ids::ID] == moduleID)
state.removeChild (i, getUndoManager());
for (Project::ExporterIterator exporter (project); exporter.next();)
exporter->removePathForModule (moduleID);
}
示例10: moveOldPropertyFromProjectToAllExporters
void Project::moveOldPropertyFromProjectToAllExporters (Identifier name)
{
if (projectRoot.hasProperty (name))
{
for (Project::ExporterIterator exporter (*this); exporter.next();)
exporter->settings.setProperty (name, projectRoot [name], nullptr);
projectRoot.removeProperty (name, nullptr);
}
}
示例11: getExportersWhichCanLaunch
StringArray ProjectContentComponent::getExportersWhichCanLaunch() const
{
StringArray s;
if (project != nullptr)
for (Project::ExporterIterator exporter (*project); exporter.next();)
if (exporter->canLaunchProject())
s.add (exporter->getName());
return s;
}
示例12: openInIDE
void ProjectContentComponent::openInIDE (int exporterIndex, bool saveFirst)
{
if (saveFirst)
saveProject();
int i = 0;
if (project != nullptr)
for (Project::ExporterIterator exporter (*project); exporter.next();)
if (exporter->canLaunchProject())
if (i++ == exporterIndex && exporter->launchProject())
break;
}
示例13: createDefaultModulePaths
void ProjectExporter::createDefaultModulePaths()
{
for (Project::ExporterIterator exporter (project); exporter.next();)
{
if (areCompatibleExporters (*this, *exporter))
{
for (int i = project.getModules().getNumModules(); --i >= 0;)
{
String modID (project.getModules().getModuleID(i));
getPathForModuleValue (modID) = exporter->getPathForModuleValue (modID).getValue();
}
break;
}
}
}
示例14: oldPath
static Array<File> getAllPossibleModulePathsFromExporters (Project& project)
{
StringArray paths;
for (Project::ExporterIterator exporter (project); exporter.next();)
{
auto& modules = project.getModules();
auto n = modules.getNumModules();
for (int i = 0; i < n; ++i)
{
auto id = modules.getModuleID (i);
if (modules.shouldUseGlobalPath (id))
continue;
const auto path = exporter->getPathForModuleString (id);
if (path.isNotEmpty())
paths.addIfNotAlreadyThere (path);
}
String oldPath (exporter->getLegacyModulePath());
if (oldPath.isNotEmpty())
paths.addIfNotAlreadyThere (oldPath);
}
Array<File> files;
for (auto& path : paths)
{
auto f = project.resolveFilename (path);
if (f.isDirectory())
{
files.addIfNotAlreadyThere (f);
if (f.getChildFile ("modules").isDirectory())
files.addIfNotAlreadyThere (f.getChildFile ("modules"));
}
}
return files;
}
示例15: setMissingDefaultValues
void Project::setMissingDefaultValues()
{
if (! projectRoot.hasProperty (ComponentBuilder::idProperty))
projectRoot.setProperty (ComponentBuilder::idProperty, createAlphaNumericUID(), nullptr);
// Create main file group if missing
if (! projectRoot.getChildWithName (Tags::projectMainGroup).isValid())
{
Item mainGroup (*this, ValueTree (Tags::projectMainGroup));
projectRoot.addChild (mainGroup.state, 0, 0);
}
getMainGroup().initialiseMissingProperties();
if (getDocumentTitle().isEmpty())
setTitle ("Juce Project");
if (! projectRoot.hasProperty (Ids::projectType))
getProjectTypeValue() = ProjectType::getGUIAppTypeName();
if (! projectRoot.hasProperty (Ids::version))
getVersionValue() = "1.0.0";
updateOldStyleConfigList();
moveOldPropertyFromProjectToAllExporters (Ids::bigIcon);
moveOldPropertyFromProjectToAllExporters (Ids::smallIcon);
for (Project::ExporterIterator exporter (*this); exporter.next();)
if (exporter->getNumConfigurations() == 0)
exporter->createDefaultConfigs();
if (! projectRoot.getChildWithName (Tags::exporters).isValid())
createDefaultExporters();
getProjectType().setMissingProjectProperties (*this);
if (! projectRoot.hasProperty (Ids::bundleIdentifier))
setBundleIdentifierToDefault();
if (! projectRoot.getChildWithName (Tags::modulesGroup).isValid())
addDefaultModules (false);
}