Functions
Hashes
hashes.xcode_calcuuid
- ide_gen.hashes.xcode_calcuuid(input_str)
Given a string, create a 96 bit unique hash for XCode.
- Parameters:
input_str – string to hash
- Returns:
96 bit hash string in upper case.
hashes.vs_calcguid
- ide_gen.hashes.vs_calcguid(input_str)
Given a string, create a UUID hash for Visual Studio.
Given a project name string, create a 128 bit unique hash for Visual Studio.
- Parameters:
input_str – Unicode string of the filename to convert into a hash
- Returns:
A string in the format of CF994A05-58B3-3EF5-8539-E7753D89E84F
String Utilities
string_utils.xcode_quote_string_if_needed
- ide_gen.string_utils.xcode_quote_string_if_needed(input_path)
Quote a string for XCode.
XCode requires quotes for certain characters. If any illegal character exist in the string, the string will be reencoded to a quoted string using XCode JSON rules.
- Parameters:
input_path – string to encapsulate.
- Returns:
Original input string if XCode can accept it or properly quoted
string_utils.xcode_determine_source_type
- ide_gen.string_utils.xcode_determine_source_type(input_path)
Using a file extension, map to XCode file type.
- Parameters:
input_path – Pathname to test
- Returns:
Xcode filetype string or “sourcecode.c.h”