Jelajahi Sumber

Make ls_std::Class polymorphic

Patrick 3 tahun lalu
induk
melakukan
af7daf7331
31 mengubah file dengan 62 tambahan dan 62 penghapusan
  1. 2 2
      include/ls_std/base/Class.hpp
  2. 2 2
      include/ls_std/boxing/Boolean.hpp
  3. 2 2
      include/ls_std/boxing/Double.hpp
  4. 2 2
      include/ls_std/boxing/Float.hpp
  5. 2 2
      include/ls_std/boxing/Integer.hpp
  6. 2 2
      include/ls_std/boxing/Long.hpp
  7. 2 2
      include/ls_std/boxing/String.hpp
  8. 2 2
      include/ls_std/io/File.hpp
  9. 2 2
      include/ls_std/io/FileReader.hpp
  10. 2 2
      include/ls_std/io/FileWriter.hpp
  11. 2 2
      include/ls_std/io/logging/LogLevel.hpp
  12. 2 2
      include/ls_std/io/logging/Logger.hpp
  13. 2 2
      include/ls_std/io/xml/XMLAttribute.hpp
  14. 2 2
      include/ls_std/io/xml/XMLDeclaration.hpp
  15. 2 2
      include/ls_std/io/xml/XMLDocument.hpp
  16. 2 2
      include/ls_std/io/xml/XMLNode.hpp
  17. 2 2
      include/ls_std/io/xml/XMLReader.hpp
  18. 2 2
      include/ls_std/io/xml/XMLReaderMock.hpp
  19. 2 2
      include/ls_std/logic/State.hpp
  20. 2 2
      include/ls_std/logic/StateConnection.hpp
  21. 2 2
      include/ls_std/logic/StateMachine.hpp
  22. 2 2
      include/ls_std/serialization/boxing/SerializableJSONBoolean.hpp
  23. 2 2
      include/ls_std/serialization/boxing/SerializableJSONDouble.hpp
  24. 2 2
      include/ls_std/serialization/boxing/SerializableJSONFloat.hpp
  25. 2 2
      include/ls_std/serialization/boxing/SerializableJSONInteger.hpp
  26. 2 2
      include/ls_std/serialization/boxing/SerializableJSONLong.hpp
  27. 2 2
      include/ls_std/serialization/boxing/SerializableJSONString.hpp
  28. 2 2
      include/ls_std/serialization/logic/SerializableJSONState.hpp
  29. 2 2
      include/ls_std/serialization/logic/SerializableJSONStateConnection.hpp
  30. 2 2
      include/ls_std/serialization/logic/SerializableJSONStateMachine.hpp
  31. 2 2
      include/ls_std/time/Date.hpp

+ 2 - 2
include/ls_std/base/Class.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -17,7 +17,7 @@ namespace ls_std {
     public:
 
       explicit Class(std::string _name);
-      ~Class() = default;
+      virtual ~Class() = default;
 
       std::string getClassName();
 

+ 2 - 2
include/ls_std/boxing/Boolean.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls_std {
 
       explicit Boolean(bool _value);
       Boolean();
-      ~Boolean() = default;
+      ~Boolean() override = default;
 
       // conversion operator
 

+ 2 - 2
include/ls_std/boxing/Double.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls_std {
 
       Double();
       explicit Double(double _value);
-      ~Double() = default;
+      ~Double() override = default;
 
       // conversion operator
 

+ 2 - 2
include/ls_std/boxing/Float.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls_std {
 
       Float();
       explicit Float(float _value);
-      ~Float() = default;
+      ~Float() override = default;
 
       // conversion operator
 

+ 2 - 2
include/ls_std/boxing/Integer.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-07
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls_std {
 
       explicit Integer(int _value);
       Integer();
-      ~Integer() = default;
+      ~Integer() override = default;
 
       // conversion operator
 

+ 2 - 2
include/ls_std/boxing/Long.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -23,7 +23,7 @@ namespace ls_std {
 
       explicit Long(ls_std::long_type _value);
       Long();
-      ~Long() = default;
+      ~Long() override = default;
 
       // conversion operator
 

+ 2 - 2
include/ls_std/boxing/String.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -24,7 +24,7 @@ namespace ls_std {
 
       String();
       explicit String(std::string _value);
-      ~String() = default;
+      ~String() override = default;
 
       // conversion operator
 

+ 2 - 2
include/ls_std/io/File.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -30,7 +30,7 @@ namespace ls_std {
     public:
 
       explicit File(std::string _absoluteFilePath);
-      ~File() = default;
+      ~File() override = default;
 
       // comparison operators
 

+ 2 - 2
include/ls_std/io/FileReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -19,7 +19,7 @@ namespace ls_std {
     public:
 
       explicit FileReader(File& _file);
-      ~FileReader() = default;
+      ~FileReader() override = default;
 
       ls_std::byte_field read() override;
       void reset(File& _file);

+ 2 - 2
include/ls_std/io/FileWriter.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -19,7 +19,7 @@ namespace ls_std {
     public:
 
       explicit FileWriter(File& _file);
-      ~FileWriter() = default;
+      ~FileWriter() override = default;
 
       void reset(File& _file);
       bool write(const ls_std::byte_field& _data) override;

+ 2 - 2
include/ls_std/io/logging/LogLevel.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls_std {
 
       explicit LogLevel(const ls_std::LogLevelValue& _value);
       LogLevel();
-      ~LogLevel() = default;
+      ~LogLevel() override = default;
 
       operator unsigned char() const;
       LogLevel& operator=(const ls_std::LogLevelValue& _value);

+ 2 - 2
include/ls_std/io/logging/Logger.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -22,7 +22,7 @@ namespace ls_std {
     public:
 
       explicit Logger(const std::shared_ptr<ls_std::IWriter>& _writer);
-      ~Logger() = default;
+      ~Logger() override = default;
 
       void debug(const ls_std::byte* _data);
       void error(const ls_std::byte* _data);

+ 2 - 2
include/ls_std/io/xml/XMLAttribute.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-23
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -18,7 +18,7 @@ namespace ls_std {
     public:
 
       explicit XMLAttribute(std::string _name);
-      ~XMLAttribute() = default;
+      ~XMLAttribute() override = default;
 
       std::string getName();
       std::string getValue();

+ 2 - 2
include/ls_std/io/xml/XMLDeclaration.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -18,7 +18,7 @@ namespace ls_std {
     public:
 
       explicit XMLDeclaration(std::string _version);
-      ~XMLDeclaration() = default;
+      ~XMLDeclaration() override = default;
 
       std::string getEncoding();
       std::string getStandalone();

+ 2 - 2
include/ls_std/io/xml/XMLDocument.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-27
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls_std {
     public:
 
       XMLDocument();
-      ~XMLDocument() = default;
+      ~XMLDocument() override = default;
 
       std::shared_ptr<ls_std::XMLDeclaration> getDeclaration();
       std::shared_ptr<ls_std::XMLNode> getRootElement();

+ 2 - 2
include/ls_std/io/xml/XMLNode.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-24
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls_std {
     public:
 
       explicit XMLNode(std::string _name);
-      ~XMLNode() = default;
+      ~XMLNode() override = default;
 
       bool addAttributeAfter(const std::shared_ptr<ls_std::XMLAttribute>& _attribute, const std::string& _name);
       bool addAttributeBefore(const std::shared_ptr<ls_std::XMLAttribute>& _attribute, const std::string& _name);

+ 2 - 2
include/ls_std/io/xml/XMLReader.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-08
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -23,7 +23,7 @@ namespace ls_std {
     public:
 
       explicit XMLReader(const std::shared_ptr<ls_std::XMLDocument>& _document, const std::string& _absolutePath);
-      ~XMLReader() = default;
+      ~XMLReader() override = default;
 
       // implementation
 

+ 2 - 2
include/ls_std/io/xml/XMLReaderMock.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-10-18
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -17,7 +17,7 @@ namespace ls_std {
     public:
 
       XMLReaderMock();
-      ~XMLReaderMock() = default;
+      ~XMLReaderMock() override = default;
 
       static std::pair<std::string, std::string> readAttribute(const ls_std::byte_field &_data);
       static std::list<std::pair<std::string, std::string>> readAttributes(ls_std::byte_field _data);

+ 2 - 2
include/ls_std/logic/State.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-05
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls_std {
     public:
 
       explicit State(StateId _id);
-      ~State() = default;
+      ~State() override = default;
 
       bool addStateConnection(const StateConnectionId& _connectionId, const std::shared_ptr<State>& _connectedState);
       bool addStateConnection(const std::shared_ptr<StateConnection>& _connection);

+ 2 - 2
include/ls_std/logic/StateConnection.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-10
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -19,7 +19,7 @@ namespace ls_std {
     public:
 
       explicit StateConnection(StateConnectionId _connectionId, StateId _stateId);
-      ~StateConnection() = default;
+      ~StateConnection() override = default;
 
       StateConnectionId getConnectionId();
       StateId getStateId();

+ 2 - 2
include/ls_std/logic/StateMachine.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-05
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -23,7 +23,7 @@ namespace ls_std {
     public:
 
       explicit StateMachine(std::string _name);
-      ~StateMachine() = default;
+      ~StateMachine() override = default;
 
       bool addState(const std::shared_ptr<State>& _state);
       std::shared_ptr<State> getCurrentState();

+ 2 - 2
include/ls_std/serialization/boxing/SerializableJSONBoolean.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls_std {
     public:
 
       explicit SerializableJSONBoolean(std::shared_ptr<ls_std::Boolean> _value);
-      ~SerializableJSONBoolean() = default;
+      ~SerializableJSONBoolean() override = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;

+ 2 - 2
include/ls_std/serialization/boxing/SerializableJSONDouble.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls_std {
     public:
 
       explicit SerializableJSONDouble(std::shared_ptr<ls_std::Double> _value);
-      ~SerializableJSONDouble() = default;
+      ~SerializableJSONDouble() override = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;

+ 2 - 2
include/ls_std/serialization/boxing/SerializableJSONFloat.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-04
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls_std {
     public:
 
       explicit SerializableJSONFloat(std::shared_ptr<ls_std::Float> _value);
-      ~SerializableJSONFloat() = default;
+      ~SerializableJSONFloat() override = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;

+ 2 - 2
include/ls_std/serialization/boxing/SerializableJSONInteger.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-21
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls_std {
     public:
 
       explicit SerializableJSONInteger(std::shared_ptr<ls_std::Integer> _value);
-      ~SerializableJSONInteger() = default;
+      ~SerializableJSONInteger() override = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;

+ 2 - 2
include/ls_std/serialization/boxing/SerializableJSONLong.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-25
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls_std {
     public:
 
       explicit SerializableJSONLong(std::shared_ptr<ls_std::Long> _value);
-      ~SerializableJSONLong() = default;
+      ~SerializableJSONLong() override = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;

+ 2 - 2
include/ls_std/serialization/boxing/SerializableJSONString.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-30
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -20,7 +20,7 @@ namespace ls_std {
     public:
 
       explicit SerializableJSONString(std::shared_ptr<ls_std::String> _value);
-      ~SerializableJSONString() = default;
+      ~SerializableJSONString() override = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;

+ 2 - 2
include/ls_std/serialization/logic/SerializableJSONState.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-15
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls_std {
     public:
 
       explicit SerializableJSONState(std::shared_ptr<State> _value);
-      ~SerializableJSONState() = default;
+      ~SerializableJSONState() override = default;
 
       // implementation
 

+ 2 - 2
include/ls_std/serialization/logic/SerializableJSONStateConnection.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-14
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls_std {
     public:
 
       explicit SerializableJSONStateConnection(std::shared_ptr<ls_std::StateConnection> _value);
-      ~SerializableJSONStateConnection() = default;
+      ~SerializableJSONStateConnection() override = default;
 
       // implementation
 

+ 2 - 2
include/ls_std/serialization/logic/SerializableJSONStateMachine.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-09-17
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -21,7 +21,7 @@ namespace ls_std {
     public:
 
       explicit SerializableJSONStateMachine(std::shared_ptr<StateMachine> _value);
-      ~SerializableJSONStateMachine() = default;
+      ~SerializableJSONStateMachine() override = default;
 
       ls_std::byte_field marshal() override;
       void unmarshal(const ls_std::byte_field& _data) override;

+ 2 - 2
include/ls_std/time/Date.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2020-11-06
+ * Changed:         2020-11-14
  *
  * */
 
@@ -18,7 +18,7 @@ namespace ls_std {
     public:
 
       Date();
-      ~Date() = default;
+      ~Date() override = default;
 
       // arithmetic operators