Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Static Public Member Functions | List of all members
OfSceneAssemblyRules Class Reference

Helpers to use by scene assembly nodes to resolve rules on item that has not been yet created. A rule is a project path or a world path, with "*" characters, targetting one or multiples items. More...

Static Public Member Functions

static bool is_class_filters_valid (OfClass *object_class, const CoreSet< CoreString > &filters)
 tells whether the given filters match a given OF class
 
static bool get_item_match_rule (OfApp &app, const CoreString &base_context, const CoreString &item, const CoreString &rule, const bool &is_recursive=true)
 tells whether a given item match a given rule
 
static bool get_item_match_rules (OfApp &app, const CoreString &base_context, const CoreString &item, OfClass *object_class, const CoreBasicArray< FilterRules > &rule_set, const bool &is_recursive=true)
 tells whether a given item match a given rule set
 
static void resolve_items (OfApp &app, const OfSceneDescription &scene, const CoreString &base_context, const CoreBasicArray< FilterRules > &rule_set, bool is_recursive, bool is_world_path, CoreVector< OfSceneDescription::ItemId > &targets, CoreVector< OfSceneDescription::ItemId > &non_targets)
 evaluate rules on a scene and output all targetted and non targetted items
 
static void resolve_items (OfApp &app, const OfSceneDescription &scene, const CoreString &base_context, FilterRules &rule_set, bool is_recursive, bool is_world_path, CoreVector< OfSceneDescription::ItemId > &targets, CoreVector< OfSceneDescription::ItemId > &non_targets)
 evaluate rules on a scene and output all targetted and non targetted items
 
static bool has_world_rule (const CoreBasicArray< CoreString > &rules)
 return true if there is at least one kinematic rule in the given list of rules
 
static bool has_path_rule (const CoreBasicArray< CoreString > &rules)
 return true if there is at least one project rule in the given list of rules
 

Detailed Description

Helpers to use by scene assembly nodes to resolve rules on item that has not been yet created. A rule is a project path or a world path, with "*" characters, targetting one or multiples items.

Member Function Documentation

bool OfSceneAssemblyRules::get_item_match_rule ( OfApp app,
const CoreString base_context,
const CoreString item,
const CoreString rule,
const bool &  is_recursive = true 
)
static

tells whether a given item match a given rule

Parameters
appthe current application
base_contextthe build path of the root context
itemthe local path of the item in the root context
rulethe rule
Returns
true if the item path match the rule
bool OfSceneAssemblyRules::get_item_match_rules ( OfApp app,
const CoreString base_context,
const CoreString item,
OfClass object_class,
const CoreBasicArray< FilterRules > &  rule_set,
const bool &  is_recursive = true 
)
static

tells whether a given item match a given rule set

Parameters
appthe current application
base_contextthe build path of the root context
itemthe local path of the item in the root context
theOF class of the item
rule_setthe filter rules
Returns
true if the item path match one of the rules in the filter rules
bool OfSceneAssemblyRules::is_class_filters_valid ( OfClass object_class,
const CoreSet< CoreString > &  filters 
)
static

tells whether the given filters match a given OF class

Parameters
object_classthe OF class filters have to match
filtersthe rule filters (list of names of OF class)
Returns
true if all the filters inherits from object class
void OfSceneAssemblyRules::resolve_items ( OfApp app,
const OfSceneDescription scene,
const CoreString base_context,
const CoreBasicArray< FilterRules > &  rule_set,
bool  is_recursive,
bool  is_world_path,
CoreVector< OfSceneDescription::ItemId > &  targets,
CoreVector< OfSceneDescription::ItemId > &  non_targets 
)
static

evaluate rules on a scene and output all targetted and non targetted items

Parameters
appthe current application
scenethe scene description
base_contextthe build path of the root context
rule_setthe list of filter rules to evaluate
is_worldif true it is a kinematic rule beginning with "world:/", otherwise it is a project rule beginning with "build:/"
targetsthe list of items targetted by at list one rule
non_targetsthe list of items targetted by no rule
void OfSceneAssemblyRules::resolve_items ( OfApp app,
const OfSceneDescription scene,
const CoreString base_context,
FilterRules rule_set,
bool  is_recursive,
bool  is_world_path,
CoreVector< OfSceneDescription::ItemId > &  targets,
CoreVector< OfSceneDescription::ItemId > &  non_targets 
)
static

evaluate rules on a scene and output all targetted and non targetted items

Parameters
appthe current application
scenethe scene description
base_contextthe build path of the root context
rule_setthe filter rules to evaluate
is_worldif true it is a kinematic rule beginning with "world:/", otherwise it is a project rule beginning with "build:/"
targetsthe list of items targetted by at list one rule
non_targetsthe list of items targetted by no rule