more docs + added input data to return...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-06-26 19:08:34 +03:00
parent 9fd4d389df
commit 795eb69f8c

View File

@ -585,23 +585,33 @@ var FeatureSetProto = {
// Build a list of features for a specific set of root features and object... // Build a list of features for a specific set of root features and object...
// .buildFeatureList(object, [feature, ..]) // .buildFeatureList(object, [feature, ..])
// -> data // -> data
// NOTE: to disable a feature and all of it's dependants prefix
// it's tag with '-' in the list.
// e.g. including 'some-feature' will include the feature
// and its dependants while '-some-feature' will remove
// it and it's dependants.
// //
// //
// This will: // This will build from user input a loadable list of features taking
// - include all dependencies for all given features (recursively) // into account feature dependencies, priorities and suggestions.
// - include all suggested features by all the given features (recursively) //
// Roughly this is done in this order starting with the given features:
// - include all dependencies (recursively)
// - include all suggested features (recursively)
// - sort features by priority // - sort features by priority
// - sort features by dependency // - sort features by dependency
// - check for feature applicability and remove non-applicable features // - check for feature applicability
// - remove features depending on non applicable features (recursively) // - remove non-applicable features and all dependants (recursively)
// - remove disabled features // - remove disabled features and all dependants (recursively)
// - remove features depending on disabled features (recursively)
// - check for missing features and dependencies // - check for missing features and dependencies
// XXX exclusivity check... // XXX exclusivity check...
// //
// //
// Return format: // Return format:
// { // {
// // list of input features...
// input: [ .. ],
//
// // features in correct load order... // // features in correct load order...
// features: [ .. ], // features: [ .. ],
// //
@ -610,6 +620,7 @@ var FeatureSetProto = {
// // unapplicable features and their dependants... // // unapplicable features and their dependants...
// unapplicable: [ .. ], // unapplicable: [ .. ],
// //
// // XXX
// excluded: [ .. ], // excluded: [ .. ],
// //
// missing: { // missing: {
@ -624,12 +635,16 @@ var FeatureSetProto = {
// }, // },
// } // }
// //
//
// NOTE: obj (action set) here is used only for applicability testing...
// NOTE: some feature applicability checks (.isApplicable(..)) may
// require a real action set, thus for correct operation one
// should be provided.
// NOTE: all feature sorting is done maintaining relative feature order // NOTE: all feature sorting is done maintaining relative feature order
// when possible... // when possible...
// NOTE: meta-features are not included in the list as they do not // NOTE: meta-features are not included in the list as they do not
// need to be setup. // need to be setup.
// ...this is because they are not Feature objects. // ...this is because they are not Feature objects.
// NOTE: obj here is used only for applicability testing...
// //
// XXX should meta-features be MetaFeature objects??? // XXX should meta-features be MetaFeature objects???
// XXX might be a good idea to check if any of the explicitly listed // XXX might be a good idea to check if any of the explicitly listed