Changed scope_t to access_t and fixed friend access specifier handling

This commit is contained in:
Bartek Kryza
2022-03-30 23:27:46 +02:00
parent a216a81e19
commit a8b57e4eb1
30 changed files with 134 additions and 137 deletions

View File

@@ -20,15 +20,15 @@
namespace clanguml::class_diagram::model {
class_element::class_element(common::model::scope_t scope,
class_element::class_element(common::model::access_t access,
const std::string &name, const std::string &type)
: scope_{scope}
: access_{access}
, name_{name}
, type_{type}
{
}
common::model::scope_t class_element::scope() const { return scope_; }
common::model::access_t class_element::access() const { return access_; }
std::string class_element::name() const { return name_; }
@@ -39,7 +39,7 @@ inja::json class_element::context() const
inja::json ctx;
ctx["name"] = name();
ctx["type"] = type();
ctx["scope"] = to_string(scope());
ctx["access"] = to_string(access());
return ctx;
}
}

View File

@@ -29,17 +29,17 @@ namespace clanguml::class_diagram::model {
class class_element : public common::model::decorated_element,
public common::model::source_location {
public:
class_element(common::model::scope_t scope, const std::string &name,
class_element(common::model::access_t scope, const std::string &name,
const std::string &type);
common::model::scope_t scope() const;
common::model::access_t access() const;
std::string name() const;
std::string type() const;
virtual inja::json context() const;
private:
common::model::scope_t scope_;
common::model::access_t access_;
std::string name_;
std::string type_;
};

View File

@@ -20,9 +20,9 @@
namespace clanguml::class_diagram::model {
class_member::class_member(common::model::scope_t scope,
class_member::class_member(common::model::access_t access,
const std::string &name, const std::string &type)
: class_element{scope, name, type}
: class_element{access, name, type}
{
}

View File

@@ -25,7 +25,7 @@ namespace clanguml::class_diagram::model {
class class_member : public class_element {
public:
class_member(common::model::scope_t scope, const std::string &name,
class_member(common::model::access_t access, const std::string &name,
const std::string &type);
bool is_relationship() const;

View File

@@ -20,9 +20,9 @@
namespace clanguml::class_diagram::model {
class_method::class_method(common::model::scope_t scope,
class_method::class_method(common::model::access_t access,
const std::string &name, const std::string &type)
: class_element{scope, name, type}
: class_element{access, name, type}
{
}

View File

@@ -27,7 +27,7 @@ namespace clanguml::class_diagram::model {
class class_method : public class_element {
public:
class_method(common::model::scope_t scope, const std::string &name,
class_method(common::model::access_t access, const std::string &name,
const std::string &type);
bool is_pure_virtual() const;