/[svn]/libgig/trunk/src/Serialization.h
ViewVC logotype

Diff of /libgig/trunk/src/Serialization.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3153 by schoenebeck, Sat May 6 13:43:43 2017 UTC revision 3163 by schoenebeck, Tue May 9 14:52:02 2017 UTC
# Line 34  Line 34 
34  #include <string>  #include <string>
35  #include <vector>  #include <vector>
36  #include <map>  #include <map>
37    #include <time.h>
38    #if __cplusplus < 201103L
39    # include <tr1/type_traits>
40    #endif
41    
42  /** @brief Serialization / deserialization framework.  /** @brief Serialization / deserialization framework.
43   *   *
# Line 102  namespace Serialization { Line 106  namespace Serialization {
106          OPERATION_DESERIALIZE          OPERATION_DESERIALIZE
107      };      };
108    
109        enum time_base_t {
110            LOCAL_TIME,
111            UTC_TIME
112        };
113    
114      template<typename T>      template<typename T>
115      bool IsEnum(const T& data) {      bool IsEnum(const T& data) {
116          return __is_enum(T);          return __is_enum(T);
# Line 587  namespace Serialization { Line 596  namespace Serialization {
596          void setBoolValue(Object& object, bool value);          void setBoolValue(Object& object, bool value);
597          void setEnumValue(Object& object, uint64_t value);          void setEnumValue(Object& object, uint64_t value);
598          String valueAsString(const Object& object);          String valueAsString(const Object& object);
599            String name() const;
600            void setName(String name);
601            String comment() const;
602            void setComment(String comment);
603            time_t timeStampCreated() const;
604            time_t timeStampModified() const;
605            tm dateTimeCreated(time_base_t base = LOCAL_TIME) const;
606            tm dateTimeModified(time_base_t base = LOCAL_TIME) const;
607    
608      protected:      protected:
609          // UID resolver for non-pointer types          // UID resolver for non-pointer types
# Line 694  namespace Serialization { Line 711  namespace Serialization {
711          UID m_root;          UID m_root;
712          RawData m_rawData;          RawData m_rawData;
713          bool m_isModified;          bool m_isModified;
714            String m_name;
715            String m_comment;
716            time_t m_timeCreated;
717            time_t m_timeModified;
718      };      };
719    
720      /**      /**

Legend:
Removed from v.3153  
changed lines
  Added in v.3163

  ViewVC Help
Powered by ViewVC