diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2020-06-06 11:37:00 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2020-06-06 11:37:00 -0300 |
commit | c5636d2031b20e673441e095d90ba94942698e7c (patch) | |
tree | 30b9f15cd5d91fe11a07960154d03afc2328bf8a /Project/ConnectionLine.h | |
parent | 0586ac0d34e4d8d5dd9845f2fdd212716b3004f9 (diff) | |
download | PSP.git-c5636d2031b20e673441e095d90ba94942698e7c.tar.gz PSP.git-c5636d2031b20e673441e095d90ba94942698e7c.tar.xz PSP.git-c5636d2031b20e673441e095d90ba94942698e7c.zip |
Some class enum implementation
Just for better code design: https://docs.microsoft.com/pt-br/dotnet/architecture/microservices/microservice-ddd-cqrs-patterns/enumeration-classes-over-enum-types
Diffstat (limited to 'Project/ConnectionLine.h')
-rw-r--r-- | Project/ConnectionLine.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Project/ConnectionLine.h b/Project/ConnectionLine.h index 92154d2..cd52801 100644 --- a/Project/ConnectionLine.h +++ b/Project/ConnectionLine.h @@ -30,7 +30,7 @@ class ConnectionLine : public ControlElement { public: - enum ConnectionLineType { ELEMENT_ELEMENT = 0, ELEMENT_LINE }; + enum class ConnectionLineType : int { ELEMENT_ELEMENT = 0, ELEMENT_LINE }; ConnectionLine(); ConnectionLine(Node* firstNode, int id); ~ConnectionLine(); @@ -48,7 +48,7 @@ class ConnectionLine : public ControlElement virtual wxPoint2DDouble GetMidPoint() const; virtual double GetOffset() const { return m_lineOffset; } virtual void SetOffset(double offset) { m_lineOffset = offset; } - virtual ConnectionLineType GetType() const { return m_type; } + virtual ConnectionLine::ConnectionLineType GetType() const { return m_type; } virtual void SetType(ConnectionLineType newType) { m_type = newType; } virtual ConnectionLine* GetParentLine() const { return m_parentLine; } virtual bool SetParentLine(ConnectionLine* parent); @@ -65,7 +65,7 @@ class ConnectionLine : public ControlElement double m_moveStartOffset = 0.0; wxPoint2DDouble m_tmpSndPt; - ConnectionLineType m_type = ELEMENT_ELEMENT; + ConnectionLineType m_type = ConnectionLineType::ELEMENT_ELEMENT; ConnectionLine* m_parentLine = NULL; double m_value; |