Added context filter relationships option (#274)
This commit is contained in:
@@ -167,6 +167,7 @@ struct context_config {
|
||||
common::string_or_regex pattern;
|
||||
unsigned radius{0};
|
||||
context_direction_t direction{context_direction_t::any};
|
||||
std::vector<common::model::relationship_t> relationships;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -87,6 +87,18 @@ types:
|
||||
- dependency
|
||||
- constraint
|
||||
- none
|
||||
relationship_context_t: !variant
|
||||
- extension
|
||||
- inheritance
|
||||
- composition
|
||||
- aggregation
|
||||
- containment
|
||||
- ownership
|
||||
- association
|
||||
- instantiation
|
||||
- friendship
|
||||
- dependency
|
||||
- constraint
|
||||
access_filter_t: !variant
|
||||
- public
|
||||
- protected
|
||||
@@ -123,6 +135,7 @@ types:
|
||||
radius: int
|
||||
pattern: regex_or_string_t
|
||||
direction: !optional direction_t
|
||||
relationships: !optional [relationship_context_t]
|
||||
context_filter_t:
|
||||
- regex_or_string_t
|
||||
- context_filter_match_t
|
||||
|
||||
@@ -485,6 +485,9 @@ template <> struct convert<context_config> {
|
||||
rhs.pattern = match["pattern"].as<string_or_regex>();
|
||||
if (has_key(match, "direction"))
|
||||
rhs.direction = match["direction"].as<context_direction_t>();
|
||||
if (has_key(match, "relationships"))
|
||||
rhs.relationships =
|
||||
match["relationships"].as<std::vector<relationship_t>>();
|
||||
}
|
||||
else {
|
||||
rhs.radius = 1;
|
||||
|
||||
Reference in New Issue
Block a user