< prev index next >

src/jdk.jpackage/share/native/libapplauncher/PropertyFile.h

Print this page




  25 
  26 #ifndef PROPERTYFILE_H
  27 #define PROPERTYFILE_H
  28 
  29 #include "Platform.h"
  30 #include "Helpers.h"
  31 
  32 
  33 class PropertyFile : public IPropertyContainer {
  34 private:
  35     bool FReadOnly;
  36     bool FModified;
  37     OrderedMap<TString, TString> FData;
  38 
  39     void SetModified(bool Value);
  40 
  41 public:
  42     PropertyFile(void);
  43     PropertyFile(const TString FileName);
  44     PropertyFile(OrderedMap<TString, TString> Value);
  45     PropertyFile(const PropertyFile &Value);
  46     virtual ~PropertyFile(void);
  47 
  48     bool IsModified();
  49     bool GetReadOnly();
  50     void SetReadOnly(bool Value);
  51 
  52     //void Assign(std::map<TString, TString> Value);
  53 
  54     bool LoadFromFile(const TString FileName);
  55     bool SaveToFile(const TString FileName, bool ownerOnly = true);
  56 
  57     bool SetValue(const TString Key, TString Value);
  58     bool RemoveKey(const TString Key);
  59 
  60     OrderedMap<TString, TString> GetData();
  61 
  62     // IPropertyContainer
  63     virtual bool GetValue(const TString Key, TString& Value);
  64     virtual size_t GetCount();
  65     // virtual std::vector<TString> GetKeys();
  66 };
  67 
  68 #endif // PROPERTYFILE_H


  25 
  26 #ifndef PROPERTYFILE_H
  27 #define PROPERTYFILE_H
  28 
  29 #include "Platform.h"
  30 #include "Helpers.h"
  31 
  32 
  33 class PropertyFile : public IPropertyContainer {
  34 private:
  35     bool FReadOnly;
  36     bool FModified;
  37     OrderedMap<TString, TString> FData;
  38 
  39     void SetModified(bool Value);
  40 
  41 public:
  42     PropertyFile(void);
  43     PropertyFile(const TString FileName);
  44     PropertyFile(OrderedMap<TString, TString> Value);
  45     PropertyFile(PropertyFile &Value);
  46     virtual ~PropertyFile(void);
  47 
  48     bool IsModified();
  49     bool GetReadOnly();
  50     void SetReadOnly(bool Value);
  51 


  52     bool LoadFromFile(const TString FileName);
  53     bool SaveToFile(const TString FileName, bool ownerOnly = true);
  54 
  55     bool SetValue(const TString Key, TString Value);
  56     bool RemoveKey(const TString Key);
  57 
  58     OrderedMap<TString, TString> GetData();
  59 
  60     // IPropertyContainer
  61     virtual bool GetValue(const TString Key, TString& Value);
  62     virtual size_t GetCount();

  63 };
  64 
  65 #endif // PROPERTYFILE_H
< prev index next >