aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2015-12-12 05:39:48 +0100
committerJohannes Schickel2015-12-12 06:54:43 +0100
commit5d1df1c2933b110e8edbe94f153c5d4c0ca022d3 (patch)
tree076cc6fe933d8e436634de0a9a9839b9ac205210
parentd4bbf4d2503f7d89094db64e85e6bd5c4c2b38e8 (diff)
downloadscummvm-rg350-5d1df1c2933b110e8edbe94f153c5d4c0ca022d3.tar.gz
scummvm-rg350-5d1df1c2933b110e8edbe94f153c5d4c0ca022d3.tar.bz2
scummvm-rg350-5d1df1c2933b110e8edbe94f153c5d4c0ca022d3.zip
DEVTOOLS: Prefix varibles in structs/classes with '_' in xcode.[h/cpp].
This silences some variables and increases consistency with our code formatting conventions.
-rw-r--r--devtools/create_project/xcode.cpp238
-rw-r--r--devtools/create_project/xcode.h128
2 files changed, 183 insertions, 183 deletions
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index babd530ad7..657adbc80f 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -42,42 +42,42 @@ namespace CreateProjectTool {
defines.push_back(name);
#define ADD_SETTING(config, key, value) \
- config.settings[key] = Setting(value, "", SettingsNoQuote);
+ config._settings[key] = Setting(value, "", SettingsNoQuote);
#define ADD_SETTING_ORDER(config, key, value, order) \
- config.settings[key] = Setting(value, "", SettingsNoQuote, 0, order);
+ config._settings[key] = Setting(value, "", SettingsNoQuote, 0, order);
#define ADD_SETTING_ORDER_NOVALUE(config, key, comment, order) \
- config.settings[key] = Setting("", comment, SettingsNoValue, 0, order);
+ config._settings[key] = Setting("", comment, SettingsNoValue, 0, order);
#define ADD_SETTING_QUOTE(config, key, value) \
- config.settings[key] = Setting(value);
+ config._settings[key] = Setting(value);
#define ADD_SETTING_QUOTE_VAR(config, key, value) \
- config.settings[key] = Setting(value, "", SettingsQuoteVariable);
+ config._settings[key] = Setting(value, "", SettingsQuoteVariable);
#define ADD_SETTING_LIST(config, key, values, flags, indent) \
- config.settings[key] = Setting(values, flags, indent);
+ config._settings[key] = Setting(values, flags, indent);
#define REMOVE_SETTING(config, key) \
- config.settings.erase(key);
+ config._settings.erase(key);
#define ADD_BUILD_FILE(id, name, fileRefId, comment) { \
Object *buildFile = new Object(this, id, name, "PBXBuildFile", "PBXBuildFile", comment); \
buildFile->addProperty("fileRef", fileRefId, name, SettingsNoValue); \
_buildFile.add(buildFile); \
- _buildFile.flags = SettingsSingleItem; \
+ _buildFile._flags = SettingsSingleItem; \
}
#define ADD_FILE_REFERENCE(id, name, properties) { \
Object *fileRef = new Object(this, id, name, "PBXFileReference", "PBXFileReference", name); \
- if (!properties.fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties.fileEncoding, "", SettingsNoValue); \
- if (!properties.lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties.lastKnownFileType, "", SettingsNoValue|SettingsQuoteVariable); \
- if (!properties.fileName.empty()) fileRef->addProperty("name", properties.fileName, "", SettingsNoValue|SettingsQuoteVariable); \
- if (!properties.filePath.empty()) fileRef->addProperty("path", properties.filePath, "", SettingsNoValue|SettingsQuoteVariable); \
- if (!properties.sourceTree.empty()) fileRef->addProperty("sourceTree", properties.sourceTree, "", SettingsNoValue); \
+ if (!properties._fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties._fileEncoding, "", SettingsNoValue); \
+ if (!properties._lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties._lastKnownFileType, "", SettingsNoValue|SettingsQuoteVariable); \
+ if (!properties._fileName.empty()) fileRef->addProperty("name", properties._fileName, "", SettingsNoValue|SettingsQuoteVariable); \
+ if (!properties._filePath.empty()) fileRef->addProperty("path", properties._filePath, "", SettingsNoValue|SettingsQuoteVariable); \
+ if (!properties._sourceTree.empty()) fileRef->addProperty("sourceTree", properties._sourceTree, "", SettingsNoValue); \
_fileReference.add(fileRef); \
- _fileReference.flags = SettingsSingleItem; \
+ _fileReference._flags = SettingsSingleItem; \
}
bool producesObjectFileOnOSX(const std::string &fileName) {
@@ -93,7 +93,7 @@ bool producesObjectFileOnOSX(const std::string &fileName) {
}
XcodeProvider::Group::Group(XcodeProvider *objectParent, const std::string &groupName, const std::string &uniqueName, const std::string &path) : Object(objectParent, uniqueName, groupName, "PBXGroup", "", groupName) {
- addProperty("name", name, "", SettingsNoValue|SettingsQuoteVariable);
+ addProperty("name", _name, "", SettingsNoValue|SettingsQuoteVariable);
addProperty("sourceTree", "<group>", "", SettingsNoValue|SettingsQuoteVariable);
if (path != "") {
@@ -106,43 +106,43 @@ XcodeProvider::Group::Group(XcodeProvider *objectParent, const std::string &grou
void XcodeProvider::Group::ensureChildExists(const std::string &name) {
std::map<std::string, Group*>::iterator it = _childGroups.find(name);
if (it == _childGroups.end()) {
- Group *child = new Group(parent, name, this->_treeName + '/' + name, name);
+ Group *child = new Group(_parent, name, this->_treeName + '/' + name, name);
_childGroups[name] = child;
addChildGroup(child);
- parent->_groups.add(child);
+ _parent->_groups.add(child);
}
}
void XcodeProvider::Group::addChildInternal(const std::string &id, const std::string &comment) {
- if (properties.find("children") == properties.end()) {
+ if (_properties.find("children") == _properties.end()) {
Property children;
- children.hasOrder = true;
- children.flags = SettingsAsList;
- properties["children"] = children;
+ children._hasOrder = true;
+ children._flags = SettingsAsList;
+ _properties["children"] = children;
}
- properties["children"].settings[id] = Setting("", comment + " in Sources", SettingsNoValue, 0, _childOrder++);
+ _properties["children"]._settings[id] = Setting("", comment + " in Sources", SettingsNoValue, 0, _childOrder++);
if (_childOrder == 1) {
// Force children to use () even when there is only 1 child.
// Also this enforces the use of "," after the single item, instead of ; (see writeProperty)
- properties["children"].flags |= SettingsSingleItem;
+ _properties["children"]._flags |= SettingsSingleItem;
} else {
- properties["children"].flags ^= SettingsSingleItem;
+ _properties["children"]._flags ^= SettingsSingleItem;
}
}
void XcodeProvider::Group::addChildGroup(const Group* group) {
- addChildInternal(parent->getHash(group->_treeName), group->_treeName);
+ addChildInternal(_parent->getHash(group->_treeName), group->_treeName);
}
void XcodeProvider::Group::addChildFile(const std::string &name) {
std::string id = "FileReference_" + _treeName + "/" + name;
- addChildInternal(parent->getHash(id), name);
+ addChildInternal(_parent->getHash(id), name);
FileProperty property = FileProperty(name, name, name, "\"<group>\"");
- parent->addFileReference(id, name, property);
+ _parent->addFileReference(id, name, property);
if (producesObjectFileOnOSX(name)) {
- parent->addBuildFile(_treeName + "/" + name, name, parent->getHash(id), name + " in Sources");
+ _parent->addBuildFile(_treeName + "/" + name, name, _parent->getHash(id), name + " in Sources");
}
}
@@ -180,13 +180,13 @@ XcodeProvider::Group *XcodeProvider::touchGroupsForPath(const std::string &path)
void XcodeProvider::addFileReference(const std::string &id, const std::string &name, FileProperty properties) {
Object *fileRef = new Object(this, id, name, "PBXFileReference", "PBXFileReference", name);
- if (!properties.fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties.fileEncoding, "", SettingsNoValue);
- if (!properties.lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties.lastKnownFileType, "", SettingsNoValue|SettingsQuoteVariable);
- if (!properties.fileName.empty()) fileRef->addProperty("name", properties.fileName, "", SettingsNoValue|SettingsQuoteVariable);
- if (!properties.filePath.empty()) fileRef->addProperty("path", properties.filePath, "", SettingsNoValue|SettingsQuoteVariable);
- if (!properties.sourceTree.empty()) fileRef->addProperty("sourceTree", properties.sourceTree, "", SettingsNoValue);
+ if (!properties._fileEncoding.empty()) fileRef->addProperty("fileEncoding", properties._fileEncoding, "", SettingsNoValue);
+ if (!properties._lastKnownFileType.empty()) fileRef->addProperty("lastKnownFileType", properties._lastKnownFileType, "", SettingsNoValue|SettingsQuoteVariable);
+ if (!properties._fileName.empty()) fileRef->addProperty("name", properties._fileName, "", SettingsNoValue|SettingsQuoteVariable);
+ if (!properties._filePath.empty()) fileRef->addProperty("path", properties._filePath, "", SettingsNoValue|SettingsQuoteVariable);
+ if (!properties._sourceTree.empty()) fileRef->addProperty("sourceTree", properties._sourceTree, "", SettingsNoValue);
_fileReference.add(fileRef);
- _fileReference.flags = SettingsSingleItem;
+ _fileReference._flags = SettingsSingleItem;
}
void XcodeProvider::addProductFileReference(const std::string &id, const std::string &name) {
@@ -196,7 +196,7 @@ void XcodeProvider::addProductFileReference(const std::string &id, const std::st
fileRef->addProperty("path", name, "", SettingsNoValue|SettingsQuoteVariable);
fileRef->addProperty("sourceTree", "BUILT_PRODUCTS_DIR", "", SettingsNoValue);
_fileReference.add(fileRef);
- _fileReference.flags = SettingsSingleItem;
+ _fileReference._flags = SettingsSingleItem;
}
void XcodeProvider::addBuildFile(const std::string &id, const std::string &name, const std::string &fileRefId, const std::string &comment) {
@@ -204,7 +204,7 @@ void XcodeProvider::addBuildFile(const std::string &id, const std::string &name,
Object *buildFile = new Object(this, id, name, "PBXBuildFile", "PBXBuildFile", comment);
buildFile->addProperty("fileRef", fileRefId, name, SettingsNoValue);
_buildFile.add(buildFile);
- _buildFile.flags = SettingsSingleItem;
+ _buildFile._flags = SettingsSingleItem;
}
XcodeProvider::XcodeProvider(StringList &global_warnings, std::map<std::string, StringList> &project_warnings, const int version)
@@ -343,14 +343,14 @@ void XcodeProvider::setupCopyFilesBuildPhase() {
* (each native target has different build rules)
*/
void XcodeProvider::setupFrameworksBuildPhase() {
- _frameworksBuildPhase.comment = "PBXFrameworksBuildPhase";
+ _frameworksBuildPhase._comment = "PBXFrameworksBuildPhase";
// Just use a hardcoded id for the Frameworks-group
Group *frameworksGroup = new Group(this, "Frameworks", "PBXGroup_CustomTemplate_Frameworks_", "");
Property children;
- children.hasOrder = true;
- children.flags = SettingsAsList;
+ children._hasOrder = true;
+ children._flags = SettingsAsList;
// Setup framework file properties
std::map<std::string, FileProperty> properties;
@@ -380,7 +380,7 @@ void XcodeProvider::setupFrameworksBuildPhase() {
DEF_LOCALLIB_STATIC("libfreetype");
// DEF_LOCALLIB_STATIC("libmpeg2");
- frameworksGroup->properties["children"] = children;
+ frameworksGroup->_properties["children"] = children;
_groups.add(frameworksGroup);
// Force this to be added as a sub-group in the root.
_rootSourceGroup->addChildGroup(frameworksGroup);
@@ -398,8 +398,8 @@ void XcodeProvider::setupFrameworksBuildPhase() {
// List of frameworks
Property iPhone_files;
- iPhone_files.hasOrder = true;
- iPhone_files.flags = SettingsAsList;
+ iPhone_files._hasOrder = true;
+ iPhone_files._flags = SettingsAsList;
ValueList frameworks_iPhone;
frameworks_iPhone.push_back("CoreAudio.framework");
@@ -423,7 +423,7 @@ void XcodeProvider::setupFrameworksBuildPhase() {
ADD_FILE_REFERENCE(*framework, *framework, properties[*framework]);
}
- framework_iPhone->properties["files"] = iPhone_files;
+ framework_iPhone->_properties["files"] = iPhone_files;
_frameworksBuildPhase.add(framework_iPhone);
#endif
@@ -436,8 +436,8 @@ void XcodeProvider::setupFrameworksBuildPhase() {
// List of frameworks
Property osx_files;
- osx_files.hasOrder = true;
- osx_files.flags = SettingsAsList;
+ osx_files._hasOrder = true;
+ osx_files._flags = SettingsAsList;
ValueList frameworks_osx;
frameworks_osx.push_back("CoreFoundation.framework");
@@ -465,7 +465,7 @@ void XcodeProvider::setupFrameworksBuildPhase() {
ADD_FILE_REFERENCE(*framework, *framework, properties[*framework]);
}
- framework_OSX->properties["files"] = osx_files;
+ framework_OSX->_properties["files"] = osx_files;
_frameworksBuildPhase.add(framework_OSX);
#ifdef ENABLE_IOS
@@ -478,8 +478,8 @@ void XcodeProvider::setupFrameworksBuildPhase() {
// List of frameworks
Property simulator_files;
- simulator_files.hasOrder = true;
- simulator_files.flags = SettingsAsList;
+ simulator_files._hasOrder = true;
+ simulator_files._flags = SettingsAsList;
ValueList frameworks_simulator;
frameworks_simulator.push_back("CoreAudio.framework");
@@ -500,14 +500,14 @@ void XcodeProvider::setupFrameworksBuildPhase() {
ADD_FILE_REFERENCE(*framework, *framework, properties[*framework]);
}
- framework_simulator->properties["files"] = simulator_files;
+ framework_simulator->_properties["files"] = simulator_files;
_frameworksBuildPhase.add(framework_simulator);
#endif
}
void XcodeProvider::setupNativeTarget() {
- _nativeTarget.comment = "PBXNativeTarget";
+ _nativeTarget._comment = "PBXNativeTarget";
// Just use a hardcoded id for the Products-group
Group *productsGroup = new Group(this, "Products", "PBXGroup_CustomTemplate_Products_" , "");
@@ -523,12 +523,12 @@ void XcodeProvider::setupNativeTarget() {
target->addProperty("buildConfigurationList", getHash("XCConfigurationList_" + _targets[i]), "Build configuration list for PBXNativeTarget \"" + _targets[i] + "\"", SettingsNoValue);
Property buildPhases;
- buildPhases.hasOrder = true;
- buildPhases.flags = SettingsAsList;
- buildPhases.settings[getHash("PBXResourcesBuildPhase_" + _targets[i])] = Setting("", "Resources", SettingsNoValue, 0, 0);
- buildPhases.settings[getHash("PBXSourcesBuildPhase_" + _targets[i])] = Setting("", "Sources", SettingsNoValue, 0, 1);
- buildPhases.settings[getHash("PBXFrameworksBuildPhase_" + _targets[i])] = Setting("", "Frameworks", SettingsNoValue, 0, 2);
- target->properties["buildPhases"] = buildPhases;
+ buildPhases._hasOrder = true;
+ buildPhases._flags = SettingsAsList;
+ buildPhases._settings[getHash("PBXResourcesBuildPhase_" + _targets[i])] = Setting("", "Resources", SettingsNoValue, 0, 0);
+ buildPhases._settings[getHash("PBXSourcesBuildPhase_" + _targets[i])] = Setting("", "Sources", SettingsNoValue, 0, 1);
+ buildPhases._settings[getHash("PBXFrameworksBuildPhase_" + _targets[i])] = Setting("", "Frameworks", SettingsNoValue, 0, 2);
+ target->_properties["buildPhases"] = buildPhases;
target->addProperty("buildRules", "", "", SettingsNoValue|SettingsAsList);
@@ -548,7 +548,7 @@ void XcodeProvider::setupNativeTarget() {
}
void XcodeProvider::setupProject() {
- _project.comment = "PBXProject";
+ _project._comment = "PBXProject";
Object *project = new Object(this, "PBXProject", "PBXProject", "PBXProject", "", "Project object");
@@ -559,12 +559,12 @@ void XcodeProvider::setupProject() {
// List of known regions
Property regions;
- regions.flags = SettingsAsList;
+ regions._flags = SettingsAsList;
ADD_SETTING_ORDER_NOVALUE(regions, "English", "", 0);
ADD_SETTING_ORDER_NOVALUE(regions, "Japanese", "", 1);
ADD_SETTING_ORDER_NOVALUE(regions, "French", "", 2);
ADD_SETTING_ORDER_NOVALUE(regions, "German", "", 3);
- project->properties["knownRegions"] = regions;
+ project->_properties["knownRegions"] = regions;
project->addProperty("mainGroup", _rootSourceGroup->getHashRef(), "CustomTemplate", SettingsNoValue);
project->addProperty("projectDirPath", _projectRoot, "", SettingsNoValue|SettingsQuoteVariable);
@@ -572,25 +572,25 @@ void XcodeProvider::setupProject() {
// List of targets
Property targets;
- targets.flags = SettingsAsList;
+ targets._flags = SettingsAsList;
#ifdef ENABLE_IOS
- targets.settings[getHash("PBXNativeTarget_" + _targets[IOS_TARGET])] = Setting("", _targets[IOS_TARGET], SettingsNoValue, 0, 0);
+ targets._settings[getHash("PBXNativeTarget_" + _targets[IOS_TARGET])] = Setting("", _targets[IOS_TARGET], SettingsNoValue, 0, 0);
#endif
- targets.settings[getHash("PBXNativeTarget_" + _targets[OSX_TARGET])] = Setting("", _targets[OSX_TARGET], SettingsNoValue, 0, 1);
+ targets._settings[getHash("PBXNativeTarget_" + _targets[OSX_TARGET])] = Setting("", _targets[OSX_TARGET], SettingsNoValue, 0, 1);
#ifdef ENABLE_IOS
- targets.settings[getHash("PBXNativeTarget_" + _targets[SIM_TARGET])] = Setting("", _targets[SIM_TARGET], SettingsNoValue, 0, 2);
+ targets._settings[getHash("PBXNativeTarget_" + _targets[SIM_TARGET])] = Setting("", _targets[SIM_TARGET], SettingsNoValue, 0, 2);
#endif
- project->properties["targets"] = targets;
+ project->_properties["targets"] = targets;
#ifndef ENABLE_IOS
// Force list even when there is only a single target
- project->properties["targets"].flags |= SettingsSingleItem;
+ project->_properties["targets"]._flags |= SettingsSingleItem;
#endif
_project.add(project);
}
void XcodeProvider::setupResourcesBuildPhase() {
- _resourcesBuildPhase.comment = "PBXResourcesBuildPhase";
+ _resourcesBuildPhase._comment = "PBXResourcesBuildPhase";
// Setup resource file properties
std::map<std::string, FileProperty> properties;
@@ -619,8 +619,8 @@ void XcodeProvider::setupResourcesBuildPhase() {
// Add default files
Property files;
- files.hasOrder = true;
- files.flags = SettingsAsList;
+ files._hasOrder = true;
+ files._flags = SettingsAsList;
ValueList files_list;
files_list.push_back("scummclassic.zip");
@@ -651,14 +651,14 @@ void XcodeProvider::setupResourcesBuildPhase() {
// Add custom files depending on the target
if (_targets[i] == PROJECT_DESCRIPTION "-OS X") {
- files.settings[getHash("PBXResources_" PROJECT_NAME ".icns")] = Setting("", PROJECT_NAME ".icns in Resources", SettingsNoValue, 0, 6);
+ files._settings[getHash("PBXResources_" PROJECT_NAME ".icns")] = Setting("", PROJECT_NAME ".icns in Resources", SettingsNoValue, 0, 6);
// Remove 2 iphone icon files
- files.settings.erase(getHash("PBXResources_Default.png"));
- files.settings.erase(getHash("PBXResources_icon.png"));
+ files._settings.erase(getHash("PBXResources_Default.png"));
+ files._settings.erase(getHash("PBXResources_icon.png"));
}
- resource->properties["files"] = files;
+ resource->_properties["files"] = files;
resource->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
@@ -667,7 +667,7 @@ void XcodeProvider::setupResourcesBuildPhase() {
}
void XcodeProvider::setupSourcesBuildPhase() {
- _sourcesBuildPhase.comment = "PBXSourcesBuildPhase";
+ _sourcesBuildPhase._comment = "PBXSourcesBuildPhase";
// Setup source file properties
std::map<std::string, FileProperty> properties;
@@ -679,19 +679,19 @@ void XcodeProvider::setupSourcesBuildPhase() {
source->addProperty("buildActionMask", "2147483647", "", SettingsNoValue);
Property files;
- files.hasOrder = true;
- files.flags = SettingsAsList;
+ files._hasOrder = true;
+ files._flags = SettingsAsList;
int order = 0;
- for (std::vector<Object*>::iterator file = _buildFile.objects.begin(); file !=_buildFile.objects.end(); ++file) {
- if (!producesObjectFileOnOSX((*file)->name)) {
+ for (std::vector<Object*>::iterator file = _buildFile._objects.begin(); file !=_buildFile._objects.end(); ++file) {
+ if (!producesObjectFileOnOSX((*file)->_name)) {
continue;
}
- std::string comment = (*file)->name + " in Sources";
- ADD_SETTING_ORDER_NOVALUE(files, getHash((*file)->id), comment, order++);
+ std::string comment = (*file)->_name + " in Sources";
+ ADD_SETTING_ORDER_NOVALUE(files, getHash((*file)->_id), comment, order++);
}
- source->properties["files"] = files;
+ source->_properties["files"] = files;
source->addProperty("runOnlyForDeploymentPostprocessing", "0", "", SettingsNoValue);
@@ -702,8 +702,8 @@ void XcodeProvider::setupSourcesBuildPhase() {
// Setup all build configurations
void XcodeProvider::setupBuildConfiguration() {
- _buildConfiguration.comment = "XCBuildConfiguration";
- _buildConfiguration.flags = SettingsAsList;
+ _buildConfiguration._comment = "XCBuildConfiguration";
+ _buildConfiguration._flags = SettingsAsList;
///****************************************
// * iPhone
@@ -749,7 +749,7 @@ void XcodeProvider::setupBuildConfiguration() {
ADD_SETTING_QUOTE(iPhone_Debug, "TARGETED_DEVICE_FAMILY", "1,2");
iPhone_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
- iPhone_Debug_Object->properties["buildSettings"] = iPhone_Debug;
+ iPhone_Debug_Object->_properties["buildSettings"] = iPhone_Debug;
// Release
Object *iPhone_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-iPhone_Release", _targets[IOS_TARGET] /* ScummVM-iPhone */, "XCBuildConfiguration", "PBXNativeTarget", "Release");
@@ -760,7 +760,7 @@ void XcodeProvider::setupBuildConfiguration() {
ADD_SETTING(iPhone_Release, "WRAPPER_EXTENSION", "app");
iPhone_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
- iPhone_Release_Object->properties["buildSettings"] = iPhone_Release;
+ iPhone_Release_Object->_properties["buildSettings"] = iPhone_Release;
_buildConfiguration.add(iPhone_Debug_Object);
_buildConfiguration.add(iPhone_Release_Object);
@@ -805,7 +805,7 @@ void XcodeProvider::setupBuildConfiguration() {
ADD_SETTING(scummvm_Debug, "SDKROOT", "macosx");
scummvm_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
- scummvm_Debug_Object->properties["buildSettings"] = scummvm_Debug;
+ scummvm_Debug_Object->_properties["buildSettings"] = scummvm_Debug;
// Release
Object *scummvm_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_NAME "_Release", PROJECT_NAME, "XCBuildConfiguration", "PBXProject", "Release");
@@ -816,7 +816,7 @@ void XcodeProvider::setupBuildConfiguration() {
REMOVE_SETTING(scummvm_Release, "ONLY_ACTIVE_ARCH");
scummvm_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
- scummvm_Release_Object->properties["buildSettings"] = scummvm_Release;
+ scummvm_Release_Object->_properties["buildSettings"] = scummvm_Release;
_buildConfiguration.add(scummvm_Debug_Object);
_buildConfiguration.add(scummvm_Release_Object);
@@ -880,7 +880,7 @@ void XcodeProvider::setupBuildConfiguration() {
ADD_SETTING(scummvmOSX_Debug, "PRODUCT_NAME", PROJECT_DESCRIPTION);
scummvmOSX_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
- scummvmOSX_Debug_Object->properties["buildSettings"] = scummvmOSX_Debug;
+ scummvmOSX_Debug_Object->_properties["buildSettings"] = scummvmOSX_Debug;
// Release
Object *scummvmOSX_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-OSX_Release", _targets[OSX_TARGET] /* ScummVM-OS X */, "XCBuildConfiguration", "PBXNativeTarget", "Release");
@@ -891,7 +891,7 @@ void XcodeProvider::setupBuildConfiguration() {
ADD_SETTING(scummvmOSX_Release, "WRAPPER_EXTENSION", "app");
scummvmOSX_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
- scummvmOSX_Release_Object->properties["buildSettings"] = scummvmOSX_Release;
+ scummvmOSX_Release_Object->_properties["buildSettings"] = scummvmOSX_Release;
_buildConfiguration.add(scummvmOSX_Debug_Object);
_buildConfiguration.add(scummvmOSX_Release_Object);
@@ -910,7 +910,7 @@ void XcodeProvider::setupBuildConfiguration() {
REMOVE_SETTING(scummvmSimulator_Debug, "TARGETED_DEVICE_FAMILY");
scummvmSimulator_Debug_Object->addProperty("name", "Debug", "", SettingsNoValue);
- scummvmSimulator_Debug_Object->properties["buildSettings"] = scummvmSimulator_Debug;
+ scummvmSimulator_Debug_Object->_properties["buildSettings"] = scummvmSimulator_Debug;
// Release
Object *scummvmSimulator_Release_Object = new Object(this, "XCBuildConfiguration_" PROJECT_DESCRIPTION "-Simulator_Release", _targets[SIM_TARGET] /* ScummVM-Simulator */, "XCBuildConfiguration", "PBXNativeTarget", "Release");
@@ -921,28 +921,28 @@ void XcodeProvider::setupBuildConfiguration() {
ADD_SETTING(scummvmSimulator_Release, "WRAPPER_EXTENSION", "app");
scummvmSimulator_Release_Object->addProperty("name", "Release", "", SettingsNoValue);
- scummvmSimulator_Release_Object->properties["buildSettings"] = scummvmSimulator_Release;
+ scummvmSimulator_Release_Object->_properties["buildSettings"] = scummvmSimulator_Release;
_buildConfiguration.add(scummvmSimulator_Debug_Object);
_buildConfiguration.add(scummvmSimulator_Release_Object);
//////////////////////////////////////////////////////////////////////////
// Configuration List
- _configurationList.comment = "XCConfigurationList";
- _configurationList.flags = SettingsAsList;
+ _configurationList._comment = "XCConfigurationList";
+ _configurationList._flags = SettingsAsList;
#endif
// Warning: This assumes we have all configurations with a Debug & Release pair
- for (std::vector<Object *>::iterator config = _buildConfiguration.objects.begin(); config != _buildConfiguration.objects.end(); config++) {
+ for (std::vector<Object *>::iterator config = _buildConfiguration._objects.begin(); config != _buildConfiguration._objects.end(); config++) {
- Object *configList = new Object(this, "XCConfigurationList_" + (*config)->name, (*config)->name, "XCConfigurationList", "", "Build configuration list for " + (*config)->refType + " \"" + (*config)->name + "\"");
+ Object *configList = new Object(this, "XCConfigurationList_" + (*config)->_name, (*config)->_name, "XCConfigurationList", "", "Build configuration list for " + (*config)->_refType + " \"" + (*config)->_name + "\"");
Property buildConfigs;
- buildConfigs.flags = SettingsAsList;
+ buildConfigs._flags = SettingsAsList;
- buildConfigs.settings[getHash((*config)->id)] = Setting("", "Debug", SettingsNoValue, 0, 0);
- buildConfigs.settings[getHash((*(++config))->id)] = Setting("", "Release", SettingsNoValue, 0, 1);
+ buildConfigs._settings[getHash((*config)->_id)] = Setting("", "Debug", SettingsNoValue, 0, 0);
+ buildConfigs._settings[getHash((*(++config))->_id)] = Setting("", "Release", SettingsNoValue, 0, 1);
- configList->properties["buildConfigurations"] = buildConfigs;
+ configList->_properties["buildConfigurations"] = buildConfigs;
configList->addProperty("defaultConfigurationIsVisible", "0", "", SettingsNoValue);
configList->addProperty("defaultConfigurationName", "Release", "", SettingsNoValue);
@@ -1034,28 +1034,28 @@ std::string XcodeProvider::writeProperty(const std::string &variable, Property &
output += (flags & SettingsSingleItem ? "" : "\t\t\t") + variable + " = ";
- if (prop.settings.size() > 1 || (prop.flags & SettingsSingleItem))
- output += (prop.flags & SettingsAsList) ? "(\n" : "{\n";
+ if (prop._settings.size() > 1 || (prop._flags & SettingsSingleItem))
+ output += (prop._flags & SettingsAsList) ? "(\n" : "{\n";
OrderedSettingList settings = prop.getOrderedSettingList();
for (OrderedSettingList::const_iterator setting = settings.begin(); setting != settings.end(); ++setting) {
- if (settings.size() > 1 || (prop.flags & SettingsSingleItem))
+ if (settings.size() > 1 || (prop._flags & SettingsSingleItem))
output += (flags & SettingsSingleItem ? " " : "\t\t\t\t");
output += writeSetting((*setting).first, (*setting).second);
// The combination of SettingsAsList, and SettingsSingleItem should use "," and not ";" (i.e children
// in PBXGroup, so we special case that case here.
- if ((prop.flags & SettingsAsList) && (prop.settings.size() > 1 || (prop.flags & SettingsSingleItem))) {
- output += (prop.settings.size() > 0) ? ",\n" : "\n";
+ if ((prop._flags & SettingsAsList) && (prop._settings.size() > 1 || (prop._flags & SettingsSingleItem))) {
+ output += (prop._settings.size() > 0) ? ",\n" : "\n";
} else {
output += ";";
output += (flags & SettingsSingleItem ? " " : "\n");
}
}
- if (prop.settings.size() > 1 || (prop.flags & SettingsSingleItem))
- output += (prop.flags & SettingsAsList) ? "\t\t\t);\n" : "\t\t\t};\n";
+ if (prop._settings.size() > 1 || (prop._flags & SettingsSingleItem))
+ output += (prop._flags & SettingsAsList) ? "\t\t\t);\n" : "\t\t\t};\n";
return output;
}
@@ -1068,32 +1068,32 @@ std::string XcodeProvider::writeSetting(const std::string &variable, std::string
// XCode project generator pbuilder_pbx.cpp, writeSettings() (under LGPL 2.1)
std::string XcodeProvider::writeSetting(const std::string &variable, const Setting &setting) const {
std::string output;
- const std::string quote = (setting.flags & SettingsNoQuote) ? "" : "\"";
+ const std::string quote = (setting._flags & SettingsNoQuote) ? "" : "\"";
const std::string escape_quote = quote.empty() ? "" : "\\" + quote;
std::string newline = "\n";
// Get indent level
- for (int i = 0; i < setting.indent; ++i)
+ for (int i = 0; i < setting._indent; ++i)
newline += "\t";
// Setup variable
- std::string var = (setting.flags & SettingsQuoteVariable) ? "\"" + variable + "\"" : variable;
+ std::string var = (setting._flags & SettingsQuoteVariable) ? "\"" + variable + "\"" : variable;
// Output a list
- if (setting.flags & SettingsAsList) {
+ if (setting._flags & SettingsAsList) {
- output += var + ((setting.flags & SettingsNoValue) ? "(" : " = (") + newline;
+ output += var + ((setting._flags & SettingsNoValue) ? "(" : " = (") + newline;
- for (unsigned int i = 0, count = 0; i < setting.entries.size(); ++i) {
+ for (unsigned int i = 0, count = 0; i < setting._entries.size(); ++i) {
- std::string value = setting.entries.at(i).value;
+ std::string value = setting._entries.at(i)._value;
if (!value.empty()) {
if (count++ > 0)
output += "," + newline;
output += quote + replace(value, quote, escape_quote) + quote;
- std::string comment = setting.entries.at(i).comment;
+ std::string comment = setting._entries.at(i)._comment;
if (!comment.empty())
output += " /* " + comment + " */";
}
@@ -1101,24 +1101,24 @@ std::string XcodeProvider::writeSetting(const std::string &variable, const Setti
}
// Add closing ")" on new line
newline.resize(newline.size() - 1);
- output += (setting.flags & SettingsNoValue) ? "\t\t\t)" : "," + newline + ")";
+ output += (setting._flags & SettingsNoValue) ? "\t\t\t)" : "," + newline + ")";
} else {
output += var;
- output += (setting.flags & SettingsNoValue) ? "" : " = " + quote;
+ output += (setting._flags & SettingsNoValue) ? "" : " = " + quote;
- for(unsigned int i = 0; i < setting.entries.size(); ++i) {
- std::string value = setting.entries.at(i).value;
+ for(unsigned int i = 0; i < setting._entries.size(); ++i) {
+ std::string value = setting._entries.at(i)._value;
if(i)
output += " ";
output += value;
- std::string comment = setting.entries.at(i).comment;
+ std::string comment = setting._entries.at(i)._comment;
if (!comment.empty())
output += " /* " + comment + " */";
}
- output += (setting.flags & SettingsNoValue) ? "" : quote;
+ output += (setting._flags & SettingsNoValue) ? "" : quote;
}
return output;
}
diff --git a/devtools/create_project/xcode.h b/devtools/create_project/xcode.h
index 2686d14986..00ed9ff573 100644
--- a/devtools/create_project/xcode.h
+++ b/devtools/create_project/xcode.h
@@ -56,14 +56,14 @@ private:
// File properties
struct FileProperty {
- std::string fileEncoding;
- std::string lastKnownFileType;
- std::string fileName;
- std::string filePath;
- std::string sourceTree;
+ std::string _fileEncoding;
+ std::string _lastKnownFileType;
+ std::string _fileName;
+ std::string _filePath;
+ std::string _sourceTree;
FileProperty(std::string fileType = "", std::string name = "", std::string path = "", std::string source = "") :
- fileEncoding(""), lastKnownFileType(fileType), fileName(name), filePath(path), sourceTree(source)
+ _fileEncoding(""), _lastKnownFileType(fileType), _fileName(name), _filePath(path), _sourceTree(source)
{
}
};
@@ -73,33 +73,33 @@ private:
typedef std::vector<std::string> ValueList;
struct Entry {
- std::string value;
- std::string comment;
+ std::string _value;
+ std::string _comment;
- Entry(std::string val, std::string cmt) : value(val), comment(cmt) {}
+ Entry(std::string val, std::string cmt) : _value(val), _comment(cmt) {}
};
typedef std::vector<Entry> EntryList;
struct Setting {
- EntryList entries;
- int flags;
- int indent;
- int order;
+ EntryList _entries;
+ int _flags;
+ int _indent;
+ int _order;
- explicit Setting(std::string value = "", std::string comment = "", int flgs = 0, int idt = 0, int ord = -1) : flags(flgs), indent(idt), order(ord) {
- entries.push_back(Entry(value, comment));
+ explicit Setting(std::string value = "", std::string comment = "", int flgs = 0, int idt = 0, int ord = -1) : _flags(flgs), _indent(idt), _order(ord) {
+ _entries.push_back(Entry(value, comment));
}
- explicit Setting(ValueList values, int flgs = 0, int idt = 0, int ord = -1) : flags(flgs), indent(idt), order(ord) {
+ explicit Setting(ValueList values, int flgs = 0, int idt = 0, int ord = -1) : _flags(flgs), _indent(idt), _order(ord) {
for (unsigned int i = 0; i < values.size(); i++)
- entries.push_back(Entry(values[i], ""));
+ _entries.push_back(Entry(values[i], ""));
}
- explicit Setting(EntryList ents, int flgs = 0, int idt = 0, int ord = -1) : entries(ents), flags(flgs), indent(idt), order(ord) {}
+ explicit Setting(EntryList ents, int flgs = 0, int idt = 0, int ord = -1) : _entries(ents), _flags(flgs), _indent(idt), _order(ord) {}
void addEntry(std::string value, std::string comment = "") {
- entries.push_back(Entry(value, comment));
+ _entries.push_back(Entry(value, comment));
}
};
@@ -108,45 +108,45 @@ private:
typedef std::vector<SettingPair> OrderedSettingList;
static bool OrderSortPredicate(const SettingPair& s1, const SettingPair& s2) {
- return s1.second.order < s2.second.order;
+ return s1.second._order < s2.second._order;
}
struct Property {
public:
- SettingList settings;
- int flags;
- bool hasOrder;
+ SettingList _settings;
+ int _flags;
+ bool _hasOrder;
- Property() : flags(0), hasOrder(false) {}
+ Property() : _flags(0), _hasOrder(false) {}
// Constructs a simple Property
- explicit Property(std::string name, std::string value = "", std::string comment = "", int flgs = 0, int indent = 0, bool order = false) : flags(flgs), hasOrder(order) {
- Setting setting(value, comment, flags, indent);
+ explicit Property(std::string name, std::string value = "", std::string comment = "", int flgs = 0, int indent = 0, bool order = false) : _flags(flgs), _hasOrder(order) {
+ Setting setting(value, comment, _flags, indent);
- settings[name] = setting;
+ _settings[name] = setting;
}
- Property(std::string name, ValueList values, int flgs = 0, int indent = 0, bool order = false) : flags(flgs), hasOrder(order) {
- Setting setting(values, flags, indent);
+ Property(std::string name, ValueList values, int flgs = 0, int indent = 0, bool order = false) : _flags(flgs), _hasOrder(order) {
+ Setting setting(values, _flags, indent);
- settings[name] = setting;
+ _settings[name] = setting;
}
// Copy constructor
Property(const Property &rhs) {
- settings = rhs.settings;
- flags = rhs.flags;
+ _settings = rhs._settings;
+ _flags = rhs._flags;
}
OrderedSettingList getOrderedSettingList() {
OrderedSettingList list;
// Prepare vector to sort
- for (SettingList::const_iterator setting = settings.begin(); setting != settings.end(); ++setting)
+ for (SettingList::const_iterator setting = _settings.begin(); setting != _settings.end(); ++setting)
list.push_back(SettingPair(setting->first, setting->second));
// Sort vector using setting order
- if (hasOrder)
+ if (_hasOrder)
std::sort(list.begin(), list.end(), OrderSortPredicate);
return list;
@@ -160,16 +160,16 @@ private:
// be overkill since we only have to generate a single project
struct Object {
public:
- std::string id; // Unique identifier for this object
- std::string name; // Name (may not be unique - for ex. configuration entries)
- std::string refType; // Type of object this references (if any)
- std::string comment; // Main comment (empty for no comment)
+ std::string _id; // Unique identifier for this object
+ std::string _name; // Name (may not be unique - for ex. configuration entries)
+ std::string _refType; // Type of object this references (if any)
+ std::string _comment; // Main comment (empty for no comment)
- PropertyList properties; // List of object properties, including output configuration
+ PropertyList _properties; // List of object properties, including output configuration
// Constructs an object and add a default type property
Object(XcodeProvider *objectParent, std::string objectId, std::string objectName, std::string objectType, std::string objectRefType = "", std::string objectComment = "")
- : id(objectId), name(objectName), refType(objectRefType), comment(objectComment), parent(objectParent) {
+ : _id(objectId), _name(objectName), _refType(objectRefType), _comment(objectComment), _parent(objectParent) {
assert(objectParent);
assert(!objectId.empty());
assert(!objectName.empty());
@@ -180,25 +180,25 @@ private:
// Add a simple Property with just a name and a value
void addProperty(std::string propName, std::string propValue, std::string propComment = "", int propFlags = 0, int propIndent = 0) {
- properties[propName] = Property(propValue, "", propComment, propFlags, propIndent);
+ _properties[propName] = Property(propValue, "", propComment, propFlags, propIndent);
}
std::string toString(int flags = 0) {
std::string output;
- output = "\t\t" + parent->getHash(id) + (comment.empty() ? "" : " /* " + comment + " */") + " = {";
+ output = "\t\t" + _parent->getHash(_id) + (_comment.empty() ? "" : " /* " + _comment + " */") + " = {";
if (flags & SettingsAsList)
output += "\n";
// Special case: always output the isa property first
- output += parent->writeProperty("isa", properties["isa"], flags);
+ output += _parent->writeProperty("isa", _properties["isa"], flags);
// Write each property
- for (PropertyList::iterator property = properties.begin(); property != properties.end(); ++property) {
+ for (PropertyList::iterator property = _properties.begin(); property != _properties.end(); ++property) {
if ((*property).first == "isa")
continue;
- output += parent->writeProperty((*property).first, (*property).second, flags);
+ output += _parent->writeProperty((*property).first, (*property).second, flags);
}
if (flags & SettingsAsList)
@@ -211,14 +211,14 @@ private:
// Slight hack, to allow Group access to parent.
protected:
- XcodeProvider *parent;
+ XcodeProvider *_parent;
private:
// Returns the type property (should always be the first in the properties map)
std::string getType() {
- assert(!properties.empty());
- assert(!properties["isa"].settings.empty());
+ assert(!_properties.empty());
+ assert(!_properties["isa"]._settings.empty());
- SettingList::iterator it = properties["isa"].settings.begin();
+ SettingList::iterator it = _properties["isa"]._settings.begin();
return (*it).first;
}
@@ -226,33 +226,33 @@ private:
struct ObjectList {
private:
- std::map<std::string, bool> objectMap;
+ std::map<std::string, bool> _objectMap;
public:
- std::vector<Object *> objects;
- std::string comment;
- int flags;
+ std::vector<Object *> _objects;
+ std::string _comment;
+ int _flags;
void add(Object *obj) {
- std::map<std::string, bool>::iterator it = objectMap.find(obj->id);
- if (it != objectMap.end() && it->second == true)
+ std::map<std::string, bool>::iterator it = _objectMap.find(obj->_id);
+ if (it != _objectMap.end() && it->second == true)
return;
- objects.push_back(obj);
- objectMap[obj->id] = true;
+ _objects.push_back(obj);
+ _objectMap[obj->_id] = true;
}
std::string toString() {
std::string output;
- if (!comment.empty())
- output = "\n/* Begin " + comment + " section */\n";
+ if (!_comment.empty())
+ output = "\n/* Begin " + _comment + " section */\n";
- for (std::vector<Object *>::iterator object = objects.begin(); object != objects.end(); ++object)
- output += (*object)->toString(flags);
+ for (std::vector<Object *>::iterator object = _objects.begin(); object != _objects.end(); ++object)
+ output += (*object)->toString(_flags);
- if (!comment.empty())
- output += "/* End " + comment + " section */\n";
+ if (!_comment.empty())
+ output += "/* End " + _comment + " section */\n";
return output;
}
@@ -274,7 +274,7 @@ private:
void addChildGroup(const Group* group);
void ensureChildExists(const std::string &name);
Group *getChildGroup(const std::string &name);
- std::string getHashRef() const { return parent->getHash(id); }
+ std::string getHashRef() const { return _parent->getHash(_id); }
};
// The path used by the root-source group