Base class for any element qualified by namespace. More...
#include <element.h>
Public Member Functions | |
element (namespace_ using_namespace, path_type pt=path_type::kNamespace) | |
~element () override=default | |
std::string | name_and_ns () const |
void | set_namespace (const namespace_ &ns) |
namespace_ | get_namespace () const |
namespace_ | get_relative_namespace () const |
const namespace_ & | path () const |
void | set_module (const std::string &module) |
std::optional< std::string > | module () const |
void | set_module_private (const bool module_private) |
bool | module_private () const |
virtual std::string | full_name_no_ns () const |
const namespace_ & | using_namespace () const |
Public Member Functions inherited from clanguml::common::model::diagram_element | |
diagram_element () | |
~diagram_element () override=default | |
const eid_t & | id () const |
Returns diagram element id. | |
void | set_id (eid_t id) |
std::optional< eid_t > | parent_element_id () const |
void | set_parent_element_id (eid_t id) |
virtual std::string | alias () const |
Return elements' diagram alias. | |
void | set_name (const std::string &name) |
void | set_name (const std::string &parent, const std::string &name) |
std::string | name () const |
virtual std::string | type_name () const |
std::string | full_name (bool relative) const |
Return the elements fully qualified name. | |
std::vector< relationship > & | relationships () |
const std::vector< relationship > & | relationships () const |
void | add_relationship (relationship &&cr) |
void | append (const decorated_element &e) |
bool | is_nested () const |
void | nested (bool nested) |
bool | complete () const |
void | complete (bool completed) |
void | remove_duplicate_relationships () |
virtual void | apply_filter (const diagram_filter &filter, const std::set< eid_t > &removed) |
Public Member Functions inherited from clanguml::common::model::decorated_element | |
virtual | ~decorated_element ()=default |
bool | skip () const |
bool | skip_relationship () const |
std::pair< relationship_t, std::string > | get_relationship () const |
std::string | style_spec () const |
const std::vector< std::shared_ptr< decorators::decorator > > & | decorators () const |
void | add_decorators (const std::vector< std::shared_ptr< decorators::decorator > > &decorators) |
void | append (const decorated_element &de) |
std::optional< comment_t > | comment () const |
void | set_comment (const comment_t &c) |
virtual std::optional< std::string > | doxygen_link () const |
Public Member Functions inherited from clanguml::common::model::source_location | |
source_location ()=default | |
source_location (std::string f, unsigned int l) | |
const std::string & | file () const |
void | set_file (const std::string &file) |
const std::string & | file_relative () const |
void | set_file_relative (const std::string &file) |
const std::string & | translation_unit () const |
void | set_translation_unit (const std::string &translation_unit) |
unsigned int | line () const |
void | set_line (const unsigned line) |
unsigned int | column () const |
void | set_column (const unsigned column) |
unsigned int | location_id () const |
void | set_location_id (unsigned int h) |
Public Member Functions inherited from clanguml::util::memoized< full_name_tag_t, std::string, bool > | |
auto | memoize (bool is_complete, F &&f, Args... args) const |
void | invalidate (Args... args) const |
Public Member Functions inherited from clanguml::util::memoized< name_and_ns_tag, std::string > | |
auto | memoize (bool is_complete, F &&f, Args... args) const |
void | invalidate (Args... args) const |
Protected Member Functions | |
std::string | full_name_impl (bool relative) const override |
virtual std::string | name_and_ns_impl () const |
virtual std::string | full_name_impl (bool) const |
Private Attributes | |
namespace_ | ns_ |
namespace_ | using_namespace_ |
std::optional< std::string > | module_ |
bool | module_private_ {false} |
Friends | |
bool | operator== (const element &l, const element &r) |
std::ostream & | operator<< (std::ostream &out, const element &rhs) |
Additional Inherited Members | |
Public Types inherited from clanguml::util::memoized< full_name_tag_t, std::string, bool > | |
using | key_t = std::tuple< Args... > |
using | value_t = std::string |
Public Types inherited from clanguml::util::memoized< name_and_ns_tag, std::string > | |
using | key_t = std::tuple< Args... > |
using | value_t = std::string |
clanguml::common::model::element::element | ( | namespace_ | using_namespace, |
path_type | pt = path_type::kNamespace |
||
) |
Definition at line 28 of file element.cc.
|
overridedefault |
|
inlineoverrideprotectedvirtual |
Return elements full name.
Reimplemented from clanguml::common::model::diagram_element.
Reimplemented in clanguml::common::model::package, clanguml::sequence_diagram::model::method, clanguml::sequence_diagram::model::objc_method, clanguml::class_diagram::model::enum_, clanguml::class_diagram::model::objc_interface, clanguml::sequence_diagram::model::function, and clanguml::sequence_diagram::model::function_template.
|
inlinevirtual |
Return elements full name but without namespace.
Reimplemented in clanguml::class_diagram::model::class_, clanguml::class_diagram::model::concept_, clanguml::sequence_diagram::model::class_, clanguml::sequence_diagram::model::function, and clanguml::sequence_diagram::model::function_template.
Definition at line 130 of file element.h.
|
inline |
|
inline |
Return elements relative namespace.
|
inline |
|
inline |
|
inline |
|
inlineprotectedvirtual |
|
inline |
|
inline |
|
inline |
Set whether the element is in a private module
module | C++20 module. |
|
inline |
Set elements namespace.
ns | Namespace. |
const namespace_ & clanguml::common::model::element::using_namespace | ( | ) | const |
Return the relative namespace from config.
Definition at line 34 of file element.cc.
|
friend |
Definition at line 42 of file element.cc.
Definition at line 36 of file element.cc.
|
private |
|
private |
|
private |
|
private |