VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
periodicSnapshotSettings.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
12 
13 #pragma once
14 
15 #include "vrfutil/vrfutilDefines.h"
18 
19 #include <boost/serialization/nvp.hpp>
20 #include <boost/serialization/base_object.hpp>
21 #include <boost/serialization/export.hpp>
22 
23 #include <boost/archive/xml_iarchive.hpp>
24 #include <boost/archive/xml_oarchive.hpp>
25 #include <boost/archive/text_iarchive.hpp>
26 #include <boost/archive/text_oarchive.hpp>
27 
29 {
30 public:
33 
35  DtPeriodicSnapshotSettings(std::string name);
36 
38  DtPeriodicSnapshotSettings(std::string name, bool enabled,
39  double periodicSnapshotTime, int numberOfSnapshotsToKeep);
40 
43 
45  virtual bool operator==(const DtSettingsObject & other) const;
46 
48  virtual bool operator!=(const DtSettingsObject & other) const;
49 
51  virtual DtSettingsObject* clone() const;
52 
53  virtual bool setFrom(const DtSettingsObject* other);
54 
56  static DtSettingsObject* create(DtSettingsObjectCreationParams& params);
57 
59 
60  bool enabled() const;
61  void setEnabled(bool b);
63 
65 
66  double periodicSnapshotTime() const;
67  void setPeriodicSnapshotTime(double threshold);
69 
71 
72  void setNumberOfSnapshotsToKeep(int);
73  int numberOfSnapshotsToKeep() const;
75 
76 private:
77  friend class boost::serialization::access;
79  template<class Archive>
80  void serialize(Archive & ar, const unsigned int version)
81  {
83  ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(DtSettingsObject);
84 
86  ar & BOOST_SERIALIZATION_NVP(myEnabled);
87  ar & BOOST_SERIALIZATION_NVP(myPeriodicSnapshotTime);
88  ar & BOOST_SERIALIZATION_NVP(myNumberOfSnapshotsToKeep);
89  }
90 
91 protected:
92  bool myEnabled;
95 };

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)