The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DiathekeMgr Class Reference

#include <diathekemgr.h>

+ Inheritance diagram for DiathekeMgr:
+ Collaboration diagram for DiathekeMgr:

Public Member Functions

 DiathekeMgr (SWConfig *iconf=NULL, SWConfig *isysconfig=NULL, bool autoload=false, char enc=ENC_UTF8, char mark=FMT_PLAIN, bool bidi=false, bool shape=false)
 
unsigned char getEncoding ()
 
unsigned char Markup (unsigned char m=FMT_UNKNOWN)
 
void setEncoding (unsigned char e=ENC_UNKNOWN)
 
virtual ~DiathekeMgr ()
 

Public Attributes

bool bidi
 
bool shape
 

Protected Member Functions

virtual void addGlobalOptionFilters (SWModule *module, ConfigEntMap &section)
 
virtual void addRenderFilters (SWModule *module, ConfigEntMap &section)
 
virtual signed char load ()
 

Private Attributes

SWFilterarshaping
 
SWFilterbidireorder
 
SWOptionFiltertransliterator
 

Detailed Description

Definition at line 31 of file diathekemgr.h.

Constructor & Destructor Documentation

DiathekeMgr::DiathekeMgr ( SWConfig iconf = NULL,
SWConfig isysconfig = NULL,
bool  autoload = false,
char  enc = ENC_UTF8,
char  mark = FMT_PLAIN,
bool  bidi = false,
bool  shape = false 
)

Definition at line 39 of file diathekemgr.cpp.

40  : SWMgr(iconfig, isysconfig, autoload, new DiathekeFilterMgr(mark, enc))
41 {
42  bidi = ibidi;
43  shape = ishape;
44 
45 #ifdef _ICU_
46  arshaping = new UTF8arShaping();
49 #endif
50  load();
51 
52 #ifdef WIN32
53  OSVERSIONINFO osvi;
54  memset (&osvi, 0, sizeof(OSVERSIONINFO));
55  osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
56  GetVersionEx(&osvi);
57  platformID = osvi.dwPlatformId;
58 #endif
59 
60 }
SWFilter * bidireorder
Definition: diathekemgr.h:33
virtual signed char load()
Definition: diathekemgr.cpp:97
SWFilter * arshaping
Definition: diathekemgr.h:32
SWOptionFilter * transliterator
Definition: diathekemgr.h:34
DiathekeMgr::~DiathekeMgr ( )
virtual

Definition at line 63 of file diathekemgr.cpp.

64 {
65 #ifdef _ICU_
66  if (arshaping)
67  delete arshaping;
68  if (bidireorder)
69  delete bidireorder;
70  if (transliterator)
71  delete transliterator;
72 #endif
73 }
SWFilter * bidireorder
Definition: diathekemgr.h:33
SWFilter * arshaping
Definition: diathekemgr.h:32
SWOptionFilter * transliterator
Definition: diathekemgr.h:34

Member Function Documentation

void DiathekeMgr::addGlobalOptionFilters ( SWModule module,
ConfigEntMap section 
)
protectedvirtual

Definition at line 106 of file diathekemgr.cpp.

106  {
107 
109 #ifdef _ICU_
111 #endif
112 };
SWText * module
Definition: osis2mod.cpp:105
virtual SWModule & addOptionFilter(SWOptionFilter *newFilter)
Definition: swmodule.h:727
SWOptionFilter * transliterator
Definition: diathekemgr.h:34
virtual void addGlobalOptionFilters(SWModule *module, ConfigEntMap &section)
Definition: swmgr.cpp:1140
void DiathekeMgr::addRenderFilters ( SWModule module,
ConfigEntMap section 
)
protectedvirtual

Definition at line 76 of file diathekemgr.cpp.

77 {
78  SWBuf lang;
79  ConfigEntMap::iterator entry;
80 
81  lang = ((entry = section.find("Lang")) != section.end()) ? (*entry).second : (SWBuf)"en";
82 
83 #ifdef _ICU_
84  bool rtl;
85  rtl = ((entry = section.find("Direction")) != section.end()) ? ((*entry).second == "RtoL") : false;
86 
87  if (shape) {
89  }
90  if (bidi && rtl) {
92  }
93 #endif
95 }
virtual SWModule & addRenderFilter(SWFilter *newFilter)
Definition: swmodule.h:564
SWText * module
Definition: osis2mod.cpp:105
SWFilter * bidireorder
Definition: diathekemgr.h:33
SWFilter * arshaping
Definition: diathekemgr.h:32
virtual void addRenderFilters(SWModule *module, ConfigEntMap &section)
Definition: swmgr.cpp:1272
unsigned char DiathekeMgr::getEncoding ( )
inline

Definition at line 51 of file diathekemgr.h.

51 { return ((EncodingFilterMgr*)filterMgr)->getEncoding(); }
signed char DiathekeMgr::load ( )
protectedvirtual

Definition at line 97 of file diathekemgr.cpp.

97  {
98  signed char retval = SWMgr::load();
99 #ifdef _ICU_
100  optionFilters["UTF8Transliterator"] = transliterator;
101  options.push_back(transliterator->getOptionName());
102 #endif
103  return retval;
104 };
virtual const char * getOptionName()
Definition: swoptfilter.h:72
virtual signed char load()
Definition: swmgr.cpp:837
SWOptionFilter * transliterator
Definition: diathekemgr.h:34
unsigned char DiathekeMgr::Markup ( unsigned char  m = FMT_UNKNOWN)
inline

Definition at line 49 of file diathekemgr.h.

49 { return ((DiathekeFilterMgr*)filterMgr)->Markup(m); }
void DiathekeMgr::setEncoding ( unsigned char  e = ENC_UNKNOWN)
inline

Definition at line 50 of file diathekemgr.h.

50 { ((EncodingFilterMgr*)filterMgr)->setEncoding(e); }

Member Data Documentation

SWFilter* DiathekeMgr::arshaping
private

Definition at line 32 of file diathekemgr.h.

bool DiathekeMgr::bidi

Definition at line 47 of file diathekemgr.h.

SWFilter* DiathekeMgr::bidireorder
private

Definition at line 33 of file diathekemgr.h.

bool DiathekeMgr::shape

Definition at line 46 of file diathekemgr.h.

SWOptionFilter* DiathekeMgr::transliterator
private

Definition at line 34 of file diathekemgr.h.


The documentation for this class was generated from the following files: