/[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 3156 by schoenebeck, Mon May 8 17:18:07 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    
39  /** @brief Serialization / deserialization framework.  /** @brief Serialization / deserialization framework.
40   *   *
# Line 102  namespace Serialization { Line 103  namespace Serialization {
103          OPERATION_DESERIALIZE          OPERATION_DESERIALIZE
104      };      };
105    
106        enum time_base_t {
107            LOCAL_TIME,
108            UTC_TIME
109        };
110    
111      template<typename T>      template<typename T>
112      bool IsEnum(const T& data) {      bool IsEnum(const T& data) {
113          return __is_enum(T);          return __is_enum(T);
# Line 587  namespace Serialization { Line 593  namespace Serialization {
593          void setBoolValue(Object& object, bool value);          void setBoolValue(Object& object, bool value);
594          void setEnumValue(Object& object, uint64_t value);          void setEnumValue(Object& object, uint64_t value);
595          String valueAsString(const Object& object);          String valueAsString(const Object& object);
596            String name() const;
597            void setName(String name);
598            String comment() const;
599            void setComment(String comment);
600            time_t timeStampCreated() const;
601            time_t timeStampModified() const;
602            tm dateTimeCreated(time_base_t base = LOCAL_TIME) const;
603            tm dateTimeModified(time_base_t base = LOCAL_TIME) const;
604    
605      protected:      protected:
606          // UID resolver for non-pointer types          // UID resolver for non-pointer types
# Line 694  namespace Serialization { Line 708  namespace Serialization {
708          UID m_root;          UID m_root;
709          RawData m_rawData;          RawData m_rawData;
710          bool m_isModified;          bool m_isModified;
711            String m_name;
712            String m_comment;
713            time_t m_timeCreated;
714            time_t m_timeModified;
715      };      };
716    
717      /**      /**

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

  ViewVC Help
Powered by ViewVC