|
Makeprojects
|
Validation objects for project data generators. More...
Classes | |
| class | VSBooleanProperty |
| Value can only be true or false. More... | |
| class | VSEnumProperty |
| Enumeration integer value. More... | |
| class | VSIntegerProperty |
| Value can only be integer or None. More... | |
| class | VSStringListProperty |
| List of strings or directories. More... | |
| class | VSStringProperty |
| Value can be any string. More... | |
Functions | |
| lookup_enum_value (enum_lookup, key, fallback) | |
| Find a value in a list of enums. | |
| lookup_enum_append_key (cmd, enum_lookup, value) | |
| Look up a command line option from an enumeration. | |
| lookup_enum_append_keys (cmd, enum_dicts, command_dict) | |
| Look up a set of enum command line options. | |
| lookup_strings (cmd, string_entries, command_dict) | |
| Lookup string items and add them to the command line. | |
| lookup_string_list (cmd, switches, entry_list, quotes=True) | |
| Create a command line with an entry list. | |
| lookup_string_lists (cmd, string_list, command_dict) | |
| Lookup string items and add them to the command line. | |
| lookup_booleans (cmd, boolean_list, command_dict) | |
| Look up a command line option from a list of booleans. | |
Validation objects for project data generators.
| makeprojects.validators.lookup_booleans | ( | cmd, | |
| boolean_list, | |||
| command_dict ) |
Look up a command line option from a list of booleans.
The command dict is a dict of Visual Studio XML entries where the value is None, or a value that will be converted into a boolean.
The boolean list is an iterable of tuples where the first entry is the Visual Studio XML entry and the second is a variable length tuple where the first entry is the default value followed by pairs of values of a string for the command line switch and then the boolean to match.
| cmd | list of command line options to append the new entry. |
| boolean_list | list of boolean entries. |
| command_dict | dict of command entries. |
| makeprojects.validators.lookup_enum_append_key | ( | cmd, | |
| enum_lookup, | |||
| value ) |
Look up a command line option from an enumeration.
Iterate over a list of tuples, with the first entry is a command line entry and the second entry is the integer enumeration value. If the value is a match to the enumeration value, append the command line entry to cmd.
| cmd | list of command line options to append the new entry |
| enum_lookup | iterable of enumeration entries (key, integer) |
| value | integer enumeration value to match in enum_lookup |
| ValueError |
| makeprojects.validators.lookup_enum_append_keys | ( | cmd, | |
| enum_dicts, | |||
| command_dict ) |
Look up a set of enum command line options.
A command_dict has keys in the form of Visual Studio XML entries with the data being the expected setting, or None for default. If the value starts with _NOT_USED, it's considered None and will use the default.
| cmd | list of command line options to append the new entry |
| enum_dicts | Iterable of enumeration entries |
| command_dict | dict of command entries |
| ValueError |
| makeprojects.validators.lookup_enum_value | ( | enum_lookup, | |
| key, | |||
| fallback ) |
Find a value in a list of enums.
Iterate over a list of two entry tuples, the first entry is the key and the second is the value. Essentually, it's a dict implemented as a list/tuple.
| enum_lookup | iterable of enumeration entries (key, integer) |
| key | Key value to match in enumeration keys |
| fallback | Value to return if there is no match |
| makeprojects.validators.lookup_string_list | ( | cmd, | |
| switches, | |||
| entry_list, | |||
| quotes = True ) |
Create a command line with an entry list.
Given a list of strings in entry_list, add to a command line a compiler switch followed by each string with or without quotes. If the switch has an ending space, the space is removed and entries are stored in separate lines.
| cmd | list of command line options to append the new entry. |
| switches | String, Command line switch string. |
| entry_list | List of parameter strings. |
| quotes | Boolean, True caused the entries to be quoted. |
| makeprojects.validators.lookup_string_lists | ( | cmd, | |
| string_list, | |||
| command_dict ) |
Lookup string items and add them to the command line.
The command_dict has the overrides where the value is either a single string or an array of strings or None.
The string_list is an iterable of tuples where the first entry is a string of the Visual Studio XML name and the second entry is a 2 entry tuple, where the first entry is the command line switch and the second entry is a boolean where if True will have the string in quotes.
| cmd | list of command line options to append the new entry. |
| string_list | dict of string list entries. |
| command_dict | dict of command entries. |
| makeprojects.validators.lookup_strings | ( | cmd, | |
| string_entries, | |||
| command_dict ) |
Lookup string items and add them to the command line.
The command dictionary has a key of the Visual Studio XML name and the data is a valid string, usually a filename. If the data is None, the default string is used.
String entries are a list of tuples where the first entry is the key and the second entry is a four entry tuple with the actions.
The function will return a list of strings of output files so the caller can properly create the make entries for output files for the dependency tree.
The four entry tuple is as follows:
| cmd | list of command line options to append the new entry |
| string_entries | dict of string entries |
| command_dict | dict of command entries |