diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-03 15:15:05 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-03 15:16:02 +0300 |
commit | d64803f63b4311b0abb93542a907e97b47493e9f (patch) | |
tree | c9c43b768859393d1b4b1d8c0bca84081606b19a /source/blender/blenlib/BLI_dot_export.hh | |
parent | e797c4f28f50f2be9d6d28d4b8e5c080d53ef74f (diff) |
Cleanup: Use trailing underscore for non-public data members
This makes the code conform better with our style guide.
Diffstat (limited to 'source/blender/blenlib/BLI_dot_export.hh')
-rw-r--r-- | source/blender/blenlib/BLI_dot_export.hh | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/source/blender/blenlib/BLI_dot_export.hh b/source/blender/blenlib/BLI_dot_export.hh index b496c00a75d..bad7e4c57a8 100644 --- a/source/blender/blenlib/BLI_dot_export.hh +++ b/source/blender/blenlib/BLI_dot_export.hh @@ -49,25 +49,25 @@ class AttributeList; class AttributeList { private: - Map<std::string, std::string> m_attributes; + Map<std::string, std::string> attributes_; public: void export__as_bracket_list(std::stringstream &ss) const; void set(StringRef key, StringRef value) { - m_attributes.add_overwrite(key, value); + attributes_.add_overwrite(key, value); } }; class Graph { private: - AttributeList m_attributes; - Vector<std::unique_ptr<Node>> m_nodes; - Vector<std::unique_ptr<Cluster>> m_clusters; + AttributeList attributes_; + Vector<std::unique_ptr<Node>> nodes_; + Vector<std::unique_ptr<Cluster>> clusters_; - Set<Node *> m_top_level_nodes; - Set<Cluster *> m_top_level_clusters; + Set<Node *> top_level_nodes_; + Set<Cluster *> top_level_clusters_; friend Cluster; friend Node; @@ -80,7 +80,7 @@ class Graph { void set_attribute(StringRef key, StringRef value) { - m_attributes.set(key, value); + attributes_.set(key, value); } void set_rankdir(Attr_rankdir rankdir) @@ -93,16 +93,16 @@ class Graph { class Cluster { private: - AttributeList m_attributes; - Graph &m_graph; - Cluster *m_parent = nullptr; - Set<Cluster *> m_children; - Set<Node *> m_nodes; + AttributeList attributes_; + Graph &graph_; + Cluster *parent_ = nullptr; + Set<Cluster *> children_; + Set<Node *> nodes_; friend Graph; friend Node; - Cluster(Graph &graph) : m_graph(graph) + Cluster(Graph &graph) : graph_(graph) { } @@ -111,7 +111,7 @@ class Cluster { void set_attribute(StringRef key, StringRef value) { - m_attributes.set(key, value); + attributes_.set(key, value); } void set_parent_cluster(Cluster *cluster); @@ -125,25 +125,25 @@ class Cluster { class Node { private: - AttributeList m_attributes; - Graph &m_graph; - Cluster *m_cluster = nullptr; + AttributeList attributes_; + Graph &graph_; + Cluster *cluster_ = nullptr; friend Graph; - Node(Graph &graph) : m_graph(graph) + Node(Graph &graph) : graph_(graph) { } public: const AttributeList &attributes() const { - return m_attributes; + return attributes_; } AttributeList &attributes() { - return m_attributes; + return attributes_; } void set_parent_cluster(Cluster *cluster); @@ -154,7 +154,7 @@ class Node { void set_attribute(StringRef key, StringRef value) { - m_attributes.set(key, value); + attributes_.set(key, value); } void set_shape(Attr_shape shape) @@ -176,7 +176,7 @@ class Node { class UndirectedGraph final : public Graph { private: - Vector<std::unique_ptr<UndirectedEdge>> m_edges; + Vector<std::unique_ptr<UndirectedEdge>> edges_; public: std::string to_dot_string() const; @@ -186,7 +186,7 @@ class UndirectedGraph final : public Graph { class DirectedGraph final : public Graph { private: - Vector<std::unique_ptr<DirectedEdge>> m_edges; + Vector<std::unique_ptr<DirectedEdge>> edges_; public: std::string to_dot_string() const; @@ -196,12 +196,12 @@ class DirectedGraph final : public Graph { class NodePort { private: - Node *m_node; - std::optional<std::string> m_port_name; + Node *node_; + std::optional<std::string> port_name_; public: NodePort(Node &node, std::optional<std::string> port_name = {}) - : m_node(&node), m_port_name(std::move(port_name)) + : node_(&node), port_name_(std::move(port_name)) { } @@ -210,18 +210,18 @@ class NodePort { class Edge : blender::NonCopyable, blender::NonMovable { protected: - AttributeList m_attributes; - NodePort m_a; - NodePort m_b; + AttributeList attributes_; + NodePort a_; + NodePort b_; public: - Edge(NodePort a, NodePort b) : m_a(std::move(a)), m_b(std::move(b)) + Edge(NodePort a, NodePort b) : a_(std::move(a)), b_(std::move(b)) { } void set_attribute(StringRef key, StringRef value) { - m_attributes.set(key, value); + attributes_.set(key, value); } void set_arrowhead(Attr_arrowType type) @@ -262,7 +262,7 @@ std::string color_attr_from_hsv(float h, float s, float v); class NodeWithSocketsRef { private: - Node *m_node; + Node *node_; public: NodeWithSocketsRef(Node &node, @@ -273,13 +273,13 @@ class NodeWithSocketsRef { NodePort input(uint index) const { std::string port = "\"in" + std::to_string(index) + "\""; - return NodePort(*m_node, port); + return NodePort(*node_, port); } NodePort output(uint index) const { std::string port = "\"out" + std::to_string(index) + "\""; - return NodePort(*m_node, port); + return NodePort(*node_, port); } }; |