CFx SDK Documentation  2020SP3
FxHostAppServices.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 "FxPragmaPush.h"
20 
21 #include "DDKERNEL.h"
22 #include <RxObject.h>
23 #include <DbHostAppServices.h>
24 
25 
26 class CFxString;
27 class CFxSettings;
34 {
35  friend class CFxDatabaseImpl;
36 
37 public:
40 
42  ~CFxHostAppServices() override;
43 
47  bool doFullCRCCheck() override
48  {
49  // default app returns true. Setting to false loads some files with open. (could also recover but gives
50  // a better user experience).
51  return false;
52  }
53 
54  virtual bool getMappedFont(const CFxString& sOriginalFont, CFxString& sMappedFont, bool searchInFontMap = false) = 0;
55 
56 #define FX_REGVAR_DEF( type, name, def_val, filerType, rbType, validation ) \
57  virtual type get##name() const = 0; \
58  virtual void set##name( type value ) = 0;
59 
60 #define FX_REGVAR_DEF_RO( type, name, def_val, filerType, rbType, validation ) \
61  FX_REGVAR_DEF( type, name, def_val, filerType, rbType, validation )
62 
63 #include "FxSysVarDefs.h"
64 
65 #undef FX_REGVAR_DEF
66 #undef FX_REGVAR_DEF_RO
67 
72  enum InputMode { eAvailableSysVar, eCommandLine };
73 
83  virtual bool isSysVarAllowed(const CFxString& sysVarName, InputMode mode) = 0;
84 
93  virtual CFxString getRawName(const CFxString& dsName) = 0;
94 
102  virtual CFxString getDsName(const CFxString& rawName) = 0;
103 
112  virtual CFxString translateAlias(const CFxString& aliasName) = 0;
119  virtual void LoadVariables( CFxSettings* pSettings ) = 0;
120 
127  virtual void SaveVariables( CFxSettings* pSettings ) = 0;
128 
133  virtual void SetVariablesDefault() = 0;
134 };
135 
137 
138 #include "FxPragmaPop.h"
FxPragmaPop.h
CFxHostAppServices::getMappedFont
virtual bool getMappedFont(const CFxString &sOriginalFont, CFxString &sMappedFont, bool searchInFontMap=false)=0
CFxSettings
Definition: FxSettings.h:35
CFxHostAppServices::SaveVariables
virtual void SaveVariables(CFxSettings *pSettings)=0
CFxHostAppServices::doFullCRCCheck
bool doFullCRCCheck() override
Definition: FxHostAppServices.h:47
CFxHostAppServices::LoadVariables
virtual void LoadVariables(CFxSettings *pSettings)=0
DDKERNEL.h
RxObject.h
CFxHostAppServices::CFxHostAppServices
CFxHostAppServices()
DbHostAppServices.h
CFxHostAppServices::getRawName
virtual CFxString getRawName(const CFxString &dsName)=0
OdDbHostAppServices2
Definition: DbHostAppServices.h:736
CFxHostAppServices::translateAlias
virtual CFxString translateAlias(const CFxString &aliasName)=0
OdSmartPtr
Definition: SmartPtr.h:58
CFxString
Definition: FxString.h:48
CFxHostAppServices::~CFxHostAppServices
~CFxHostAppServices() override
FxSysVarDefs.h
DDKERNEL_API
#define DDKERNEL_API
Definition: DDKERNEL.h:32
CFxHostAppServices
Definition: FxHostAppServices.h:34
CFxHostAppServices::SetVariablesDefault
virtual void SetVariablesDefault()=0
FxPragmaPush.h
CFxHostAppServices::getDsName
virtual CFxString getDsName(const CFxString &rawName)=0
CFxHostAppServicesPtr
OdSmartPtr< CFxHostAppServices > CFxHostAppServicesPtr
Definition: FxHostAppServices.h:136
CFxHostAppServices::isSysVarAllowed
virtual bool isSysVarAllowed(const CFxString &sysVarName, InputMode mode)=0
CFxHostAppServices::InputMode
InputMode
Definition: FxHostAppServices.h:72