Forráskód Böngészése

Improve namespace layout for "time" module

Patrick-Christopher Mattulat 1 éve
szülő
commit
3a56d34e54
1 módosított fájl, 30 hozzáadás és 36 törlés
  1. 30 36
      include/ls_std/time/Date.hpp

+ 30 - 36
include/ls_std/time/Date.hpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-14
- * Changed:         2022-06-29
+ * Changed:         2022-07-02
  *
  * */
 
@@ -14,51 +14,45 @@
 #include <ls_std/os/dynamic_goal.hpp>
 #include <ctime>
 
-namespace ls
+namespace ls::std::time
 {
-  namespace std
+  class DYNAMIC_GOAL Date : public ls::std::core::Class
   {
-    namespace time
-    {
-      class DYNAMIC_GOAL Date : public ls::std::core::Class
-      {
-        public:
+    public:
 
-          Date();
-          ~Date() override = default;
+      Date();
+      ~Date() override = default;
 
-          // arithmetic operators
+      // arithmetic operators
 
-          ls::std::time::Date &operator+(int _value);
-          ls::std::time::Date &operator-(int _value);
-          ls::std::time::Date &operator+=(int _value);
-          ls::std::time::Date &operator-=(int _value);
+      ls::std::time::Date &operator+(int _value);
+      ls::std::time::Date &operator-(int _value);
+      ls::std::time::Date &operator+=(int _value);
+      ls::std::time::Date &operator-=(int _value);
 
-          // additional functionality
+      // additional functionality
 
-          bool after(const ls::std::time::Date &_foreignDate) const;
-          bool before(const ls::std::time::Date &_foreignDate) const;
-          int getDay();
-          int getHour();
-          int getMinute();
-          int getMonth();
-          int getSecond();
-          time_t getTime() const;
-          int getYear();
-          void setTime(time_t _timestamp);
-          ::std::string toString();
+      bool after(const ls::std::time::Date &_foreignDate) const;
+      bool before(const ls::std::time::Date &_foreignDate) const;
+      int getDay();
+      int getHour();
+      int getMinute();
+      int getMonth();
+      int getSecond();
+      time_t getTime() const;
+      int getYear();
+      void setTime(time_t _timestamp);
+      ::std::string toString();
 
-        private:
+    private:
 
-          time_t timestamp{};
-          tm *localTime{};
+      time_t timestamp{};
+      tm *localTime{};
 
-          void _decrementByDays(int _value);
-          void _incrementByDays(int _value);
-          void _init();
-      };
-    }
-  }
+      void _decrementByDays(int _value);
+      void _incrementByDays(int _value);
+      void _init();
+  };
 }
 
 #endif