src/common/model/diagram_element.h
Copyright (c) 2021-2025 Bartek Kryza bkryz.nosp@m.a@gm.nosp@m.ail.c.nosp@m.om
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This namespace provides common interfaces for diagram model, including various diagram elements and diagram filters.
Namespaces | |
namespace | detail |
namespace | tvl |
Classes | |
struct | access_filter |
class | advanced_diagram_filter_initializer |
struct | allof_filter |
struct | anyof_filter |
class | basic_diagram_filter_initializer |
struct | callee_filter |
struct | class_member_filter |
struct | class_method_filter |
struct | context |
struct | context_filter |
class | decorated_element |
Base class for decorated diagram elements. More... | |
class | diagram |
Base class for all diagram models. More... | |
class | diagram_element |
Base class for standalone diagram elements. More... | |
class | diagram_filter |
Composite of all diagrams filters. More... | |
class | diagram_filter_factory |
class | diagram_filter_initializer |
struct | edge_traversal_filter |
Common template for filters involving traversing relationship graph. More... | |
class | element |
Base class for any element qualified by namespace. More... | |
struct | element_filter |
struct | element_type_filter |
class | element_view |
struct | element_views |
class | filter_visitor |
Base class for any diagram filter. More... | |
struct | fs_path_sep |
struct | full_name_tag_t |
struct | method_type_filter |
struct | module_access_filter |
struct | modules_filter |
struct | name_and_ns_tag |
struct | namespace_filter |
class | nested_trait |
Base class for elements nested in the diagram. More... | |
struct | ns_path_separator |
class | package |
Diagram element representing namespace or directory package. More... | |
struct | parents_filter |
class | path |
Diagram path. More... | |
struct | paths_filter |
class | relationship |
Class representing any relationship other than inheritance. More... | |
struct | relationship_filter |
class | source_file |
Diagram element representing some file or directory. More... | |
class | source_location |
Base class of all diagram elements that have source location. More... | |
class | stylable_element |
Diagram elements to which style can be applied. More... | |
struct | subclass_filter |
class | template_element |
Base class for any element qualified by namespace. More... | |
class | template_parameter |
Represents template parameter, template arguments or concept constraints. More... | |
class | template_trait |
Common interface for template diagram elements. More... | |
Functions | |
template<> | |
bool | check_diagram_type< clanguml::class_diagram::model::diagram > (diagram_t t) |
template<> | |
bool | check_diagram_type< clanguml::class_diagram::model::diagram > (diagram_t t) |
void | to_json (nlohmann::json &j, const source_location &sl) |
void | to_json (nlohmann::json &j, const element &c) |
void | to_json (nlohmann::json &j, const template_parameter &c) |
void | to_json (nlohmann::json &j, const relationship &c) |
void | to_json (json &j, const source_location &sl) |
void | to_json (json &j, const element &c) |
void | to_json (json &j, const template_parameter &c) |
void | to_json (json &j, const relationship &c) |
template<typename T > | |
bool | needs_root_prefix (const T &e) |
template<typename DiagramT > | |
bool | check_diagram_type (diagram_t t) |
bool | operator== (const diagram_element &l, const diagram_element &r) |
std::ostream & | operator<< (std::ostream &out, const diagram_element &rhs) |
bool | operator== (const element &l, const element &r) |
std::ostream & | operator<< (std::ostream &out, const element &rhs) |
std::string | to_string (relationship_t r) |
std::string | to_string (access_t a) |
std::string | to_string (module_access_t a) |
std::string | to_string (message_t r) |
std::string | to_string (const diagram_t t) |
std::string | to_string (const message_scope_t t) |
diagram_t | from_string (const std::string &s) |
template<> | |
bool | diagram_filter::should_include< std::string > (const std::string &name) const |
template<typename Collection > | |
void | apply_filter (Collection &col, const diagram_filter &filter) |
template<typename T > | |
void | apply_filter (std::vector< std::reference_wrapper< T > > &col, const diagram_filter &filter) |
template<> | |
bool | diagram_filter::should_include< std::string > (const std::string &name) const |
std::string | to_string (const path_type pt) |
bool | operator== (const relationship &l, const relationship &r) |
std::string | to_string (source_file_t sf) |
std::string | to_string (template_parameter_kind_t k) |
int | calculate_template_params_specialization_match (const std::vector< template_parameter > &specialization, const std::vector< template_parameter > &base_template) |
Calculate the match between 2 template parameter lists. | |
YAML::Emitter & | operator<< (YAML::Emitter &out, const namespace_ &n) |
YAML::Emitter & | operator<< (YAML::Emitter &out, const relationship_t &r) |
YAML::Emitter & | operator<< (YAML::Emitter &out, const access_t &r) |
YAML::Emitter & | operator<< (YAML::Emitter &out, const diagram_t &d) |
YAML::Emitter & | operator<< (YAML::Emitter &out, const module_access_t &a) |
template<> | |
bool | check_diagram_type< include_diagram::model::diagram > (diagram_t t) |
template<> | |
bool | check_diagram_type< clanguml::include_diagram::model::diagram > (diagram_t t) |
template<> | |
bool | check_diagram_type< clanguml::package_diagram::model::diagram > (diagram_t t) |
template<> | |
bool | check_diagram_type< clanguml::package_diagram::model::diagram > (diagram_t t) |
template<> | |
bool | check_diagram_type< clanguml::sequence_diagram::model::diagram > (diagram_t t) |
template<> | |
bool | check_diagram_type< clanguml::sequence_diagram::model::diagram > (diagram_t t) |
using clanguml::common::model::class_dependants_filter_t = typedef edge_traversal_filter<class_diagram::model::diagram, class_diagram::model::class_, common::string_or_regex> |
Definition at line 28 of file diagram_filter_factory.h.
using clanguml::common::model::class_dependencies_filter_t = typedef edge_traversal_filter<class_diagram::model::diagram, class_diagram::model::class_, common::string_or_regex> |
Definition at line 31 of file diagram_filter_factory.h.
using clanguml::common::model::comment_t = typedef inja::json |
Definition at line 35 of file decorated_element.h.
using clanguml::common::model::filesystem_path = typedef common::model::path |
Definition at line 56 of file source_file.h.
using clanguml::common::model::namespace_ = typedef path |
Definition at line 32 of file namespace.h.
using clanguml::common::model::package_dependants_filter_t = typedef edge_traversal_filter<package_diagram::model::diagram, common::model::package, common::string_or_regex> |
Definition at line 35 of file diagram_filter_factory.h.
using clanguml::common::model::package_dependencies_filter_t = typedef edge_traversal_filter<package_diagram::model::diagram, common::model::package, common::string_or_regex> |
Definition at line 38 of file diagram_filter_factory.h.
using clanguml::common::model::source_file_dependency_filter_t = typedef edge_traversal_filter<include_diagram::model::diagram, common::model::source_file, std::string, common::model::source_file> |
Definition at line 42 of file diagram_filter_factory.h.
using clanguml::common::model::specializations_filter_t = typedef edge_traversal_filter<class_diagram::model::diagram, class_diagram::model::class_, common::string_or_regex> |
Definition at line 24 of file diagram_filter_factory.h.
|
strong |
|
strong |
|
strong |
Diagram filters can be add in 2 modes:
Enumerator | |
---|---|
kInclusive | Filter is inclusive |
kExclusive | Filter is exclusve |
Definition at line 50 of file diagram_filter.h.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Enumerator | |
---|---|
kNone | |
kExtension | |
kComposition | |
kAggregation | |
kContainment | |
kOwnership | |
kAssociation | |
kInstantiation | |
kFriendship | |
kAlias | |
kDependency | |
kConstraint |
Definition at line 31 of file enums.h.
|
strong |
Enum representing type of reference or pointer type qualifier
Enumerator | |
---|---|
kLValueReference | l-value reference (e.g. &) |
kRValueReference | r-value reference (e.g. &&) |
kPointer | pointer (e.g *) |
kNone | No qualifier |
Definition at line 57 of file template_parameter.h.
|
strong |
This enum represents different kinds of files in the diagram.
Enumerator | |
---|---|
kDirectory | Diagram element is a directory |
kHeader | Diagram element is a header |
kImplementation | Diagram element is a source file (e.g. cpp) |
Definition at line 40 of file source_file.h.
|
strong |
Type of template parameter or argument.
Definition at line 43 of file template_parameter.h.
void clanguml::common::model::apply_filter | ( | Collection & | col, |
const diagram_filter & | filter | ||
) |
Definition at line 856 of file diagram_filter.h.
void clanguml::common::model::apply_filter | ( | std::vector< std::reference_wrapper< T > > & | col, |
const diagram_filter & | filter | ||
) |
Definition at line 866 of file diagram_filter.h.
int clanguml::common::model::calculate_template_params_specialization_match | ( | const std::vector< template_parameter > & | specialization, |
const std::vector< template_parameter > & | base_template | ||
) |
Calculate the match between 2 template parameter lists.
The higher the value, the more likely it is that *this is a specialization of base_template_parameter
.
base_template_parameter |
Definition at line 646 of file template_parameter.cc.
bool clanguml::common::model::check_diagram_type | ( | diagram_t | t | ) |
bool clanguml::common::model::check_diagram_type< clanguml::class_diagram::model::diagram > | ( | diagram_t | t | ) |
Definition at line 304 of file diagram.cc.
bool clanguml::common::model::check_diagram_type< clanguml::class_diagram::model::diagram > | ( | diagram_t | t | ) |
Definition at line 304 of file diagram.cc.
bool clanguml::common::model::check_diagram_type< clanguml::include_diagram::model::diagram > | ( | diagram_t | t | ) |
bool clanguml::common::model::check_diagram_type< clanguml::package_diagram::model::diagram > | ( | diagram_t | t | ) |
Definition at line 96 of file diagram.cc.
bool clanguml::common::model::check_diagram_type< clanguml::package_diagram::model::diagram > | ( | diagram_t | t | ) |
Definition at line 96 of file diagram.cc.
bool clanguml::common::model::check_diagram_type< clanguml::sequence_diagram::model::diagram > | ( | diagram_t | t | ) |
Definition at line 708 of file diagram.cc.
bool clanguml::common::model::check_diagram_type< clanguml::sequence_diagram::model::diagram > | ( | diagram_t | t | ) |
Definition at line 708 of file diagram.cc.
bool clanguml::common::model::check_diagram_type< include_diagram::model::diagram > | ( | diagram_t | t | ) |
Definition at line 143 of file diagram.cc.
bool clanguml::common::model::diagram_filter::should_include< std::string > | ( | const std::string & | name | ) | const |
Definition at line 1390 of file diagram_filter.cc.
bool clanguml::common::model::diagram_filter::should_include< std::string > | ( | const std::string & | name | ) | const |
Definition at line 1390 of file diagram_filter.cc.
diagram_t clanguml::common::model::from_string | ( | const std::string & | s | ) |
Definition at line 169 of file enums.cc.
bool clanguml::common::model::needs_root_prefix | ( | const T & | e | ) |
std::ostream & clanguml::common::model::operator<< | ( | std::ostream & | out, |
const diagram_element & | rhs | ||
) |
Definition at line 123 of file diagram_element.cc.
std::ostream & clanguml::common::model::operator<< | ( | std::ostream & | out, |
const element & | rhs | ||
) |
Definition at line 42 of file element.cc.
YAML::Emitter & clanguml::common::model::operator<< | ( | YAML::Emitter & | out, |
const module_access_t & | a | ||
) |
Definition at line 72 of file yaml_emitters.cc.
bool clanguml::common::model::operator== | ( | const diagram_element & | l, |
const diagram_element & | r | ||
) |
Definition at line 118 of file diagram_element.cc.
bool clanguml::common::model::operator== | ( | const relationship & | l, |
const relationship & | r | ||
) |
Definition at line 93 of file relationship.cc.
void clanguml::common::model::to_json | ( | json & | j, |
const element & | c | ||
) |
void clanguml::common::model::to_json | ( | json & | j, |
const relationship & | c | ||
) |
void clanguml::common::model::to_json | ( | json & | j, |
const source_location & | sl | ||
) |
void clanguml::common::model::to_json | ( | json & | j, |
const template_parameter & | c | ||
) |
void clanguml::common::model::to_json | ( | nlohmann::json & | j, |
const element & | c | ||
) |
Definition at line 34 of file generator.cc.
void clanguml::common::model::to_json | ( | nlohmann::json & | j, |
const relationship & | c | ||
) |
Definition at line 62 of file generator.cc.
void clanguml::common::model::to_json | ( | nlohmann::json & | j, |
const source_location & | sl | ||
) |
Definition at line 27 of file generator.cc.
void clanguml::common::model::to_json | ( | nlohmann::json & | j, |
const template_parameter & | c | ||
) |
Definition at line 49 of file generator.cc.
std::string clanguml::common::model::to_string | ( | access_t | a | ) |
Definition at line 58 of file enums.cc.
std::string clanguml::common::model::to_string | ( | const diagram_t | t | ) |
Definition at line 139 of file enums.cc.
std::string clanguml::common::model::to_string | ( | const message_scope_t | t | ) |
std::string clanguml::common::model::to_string | ( | const path_type | pt | ) |
std::string clanguml::common::model::to_string | ( | message_t | r | ) |
Definition at line 88 of file enums.cc.
std::string clanguml::common::model::to_string | ( | module_access_t | a | ) |
std::string clanguml::common::model::to_string | ( | relationship_t | r | ) |
Definition at line 25 of file enums.cc.
std::string clanguml::common::model::to_string | ( | source_file_t | sf | ) |
Definition at line 23 of file source_file.cc.
std::string clanguml::common::model::to_string | ( | template_parameter_kind_t | k | ) |
Definition at line 61 of file template_parameter.cc.