CFx SDK Documentation  2020SP3
FxSettings.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2020 by Graebert GmbH.
3 //
4 // Permission to use, copy, modify, and distribute this software in
5 // object code form for any purpose and without fee is hereby granted,
6 // provided that the above copyright notice appears in all copies and
7 // that both that copyright notice and the limited warranty and
8 // restricted rights notice below appear in all supporting
9 // documentation.
10 //
11 // GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12 // GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14 // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15 // UNINTERRUPTED OR ERROR FREE.
16 
17 #pragma once
18 
19 #include "DDKERNEL.h"
20 #include "FxString.h"
21 
22 #include <OdString.h>
23 #include <ResBuf.h>
24 
25 #include "FxPragmaPush.h"
26 
27 class QByteArray;
28 
35 {
36 public:
37  /* {secret} */
38  virtual ~CFxSettings() {};
39 
43  virtual bool HasGroup( const CFxString& group ) = 0;
44 
47  virtual bool HasKey( const CFxString& group, const CFxString& key ) = 0;
48 
52  virtual CFxStringArray GetGroups( const CFxString& group ) = 0;
53 
57  virtual CFxStringArray GetKeys( const CFxString& group ) = 0;
58 
61  typedef enum
62  {
68  kRegBinaryData
69  } ValueType;
70 
74  virtual ValueType GetType( const CFxString& group, const CFxString& key ) = 0;
75 
80  virtual OdResBufPtr Read( const CFxString& group, const CFxString& key, ValueType defaultType ) = 0;
81 
86  virtual void Write( const CFxString& group, const CFxString& key, OdResBufPtr value ) = 0;
87 
91  virtual void RemoveKey( const CFxString& group, const CFxString& key ) = 0;
92 
96  virtual void RemoveGroup( const CFxString& group ) = 0;
97 };
98 
99 #include "FxPragmaPop.h"
CFxSettings::kRegInt64
@ kRegInt64
Definition: FxSettings.h:65
FxPragmaPop.h
CFxSettings::ValueType
ValueType
Definition: FxSettings.h:62
CFxSettings
Definition: FxSettings.h:35
CFxSettings::Read
virtual OdResBufPtr Read(const CFxString &group, const CFxString &key, ValueType defaultType)=0
CFxSettings::GetKeys
virtual CFxStringArray GetKeys(const CFxString &group)=0
DDKERNEL.h
CFxStringArray
std::vector< CFxString > CFxStringArray
Definition: FxString.h:34
CFxSettings::kRegNone
@ kRegNone
Definition: FxSettings.h:63
FxString.h
CFxSettings::kRegInt32
@ kRegInt32
Definition: FxSettings.h:64
CFxSettings::~CFxSettings
virtual ~CFxSettings()
Definition: FxSettings.h:38
OdString.h
CFxSettings::kRegDouble
@ kRegDouble
Definition: FxSettings.h:66
OdSmartPtr< OdResBuf >
CFxString
Definition: FxString.h:48
CFxSettings::HasGroup
virtual bool HasGroup(const CFxString &group)=0
CFxSettings::HasKey
virtual bool HasKey(const CFxString &group, const CFxString &key)=0
CFxSettings::RemoveGroup
virtual void RemoveGroup(const CFxString &group)=0
CFxSettings::GetGroups
virtual CFxStringArray GetGroups(const CFxString &group)=0
CFxSettings::kRegString
@ kRegString
Definition: FxSettings.h:67
DDKERNEL_API
#define DDKERNEL_API
Definition: DDKERNEL.h:32
value
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
FxPragmaPush.h
ResBuf.h
CFxSettings::Write
virtual void Write(const CFxString &group, const CFxString &key, OdResBufPtr value)=0
CFxSettings::RemoveKey
virtual void RemoveKey(const CFxString &group, const CFxString &key)=0
CFxSettings::GetType
virtual ValueType GetType(const CFxString &group, const CFxString &key)=0