DiathekeMgr Class Reference

#include <diathekemgr.h>

Inheritance diagram for DiathekeMgr:
Inheritance graph
[legend]
Collaboration diagram for DiathekeMgr:
Collaboration graph
[legend]

List of all members.

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 Encoding (unsigned char e=ENC_UNKNOWN)
unsigned char Markup (unsigned char m=FMT_UNKNOWN)
virtual ~DiathekeMgr ()

Public Attributes

bool bidi
bool shape

Protected Member Functions

virtual void AddGlobalOptions (SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end)
virtual void AddRenderFilters (SWModule *module, ConfigEntMap &section)
virtual signed char Load ()

Private Attributes

SWFilterarshaping
SWFilterbidireorder
SWOptionFiltertransliterator

Detailed Description

Definition at line 26 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 34 of file diathekemgr.cpp.

00035         : SWMgr(iconfig, isysconfig, autoload, new DiathekeFilterMgr(mark, enc))
00036 {
00037     bidi = ibidi;
00038     shape = ishape;
00039 
00040 #ifdef _ICU_
00041     arshaping = new UTF8arShaping();
00042     bidireorder = new UTF8BiDiReorder();
00043     transliterator = new UTF8Transliterator();
00044 #endif
00045     Load();
00046 
00047 #ifdef WIN32
00048     OSVERSIONINFO osvi;
00049     memset (&osvi, 0, sizeof(OSVERSIONINFO));
00050     osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
00051     GetVersionEx(&osvi);
00052     platformID = osvi.dwPlatformId;
00053 #endif
00054 
00055 }

DiathekeMgr::~DiathekeMgr (  )  [virtual]

Definition at line 58 of file diathekemgr.cpp.

00059 {
00060 #ifdef _ICU_
00061         if (arshaping)
00062                 delete arshaping;
00063         if (bidireorder)
00064                 delete bidireorder;
00065         if (transliterator)
00066                 delete transliterator;
00067 #endif
00068 }


Member Function Documentation

void DiathekeMgr::AddGlobalOptions ( SWModule *  module,
ConfigEntMap section,
ConfigEntMap::iterator  start,
ConfigEntMap::iterator  end 
) [protected, virtual]

Definition at line 100 of file diathekemgr.cpp.

00102                                                              {
00103 
00104         SWMgr::AddGlobalOptions(module, section, start, end);
00105 #ifdef _ICU_
00106         module->addOptionFilter(transliterator);
00107 #endif
00108 };

void DiathekeMgr::AddRenderFilters ( SWModule *  module,
ConfigEntMap section 
) [protected, virtual]

Definition at line 71 of file diathekemgr.cpp.

00072 {
00073     SWBuf lang;
00074     bool rtl;
00075     ConfigEntMap::iterator entry;
00076 
00077     lang = ((entry = section.find("Lang")) != section.end()) ? (*entry).second : (SWBuf)"en";
00078     rtl = ((entry = section.find("Direction")) != section.end()) ? ((*entry).second == "RtoL") : false;
00079 
00080 #ifdef _ICU_
00081     if (shape) {
00082         module->addRenderFilter(arshaping);
00083     }
00084     if (bidi && rtl) {
00085         module->addRenderFilter(bidireorder);
00086     }
00087 #endif
00088     SWMgr::AddRenderFilters(module, section);
00089 }

unsigned char DiathekeMgr::Encoding ( unsigned char  e = ENC_UNKNOWN  )  [inline]

Definition at line 45 of file diathekemgr.h.

00045 {return ((EncodingFilterMgr*)filterMgr)->Encoding(e);};

signed char DiathekeMgr::Load (  )  [protected, virtual]

Definition at line 91 of file diathekemgr.cpp.

00091                                {
00092     signed char retval =  SWMgr::Load();
00093 #ifdef _ICU_
00094     optionFilters["UTF8Transliterator"] = transliterator;
00095     options.push_back(transliterator->getOptionName());
00096 #endif
00097     return retval;
00098 };

unsigned char DiathekeMgr::Markup ( unsigned char  m = FMT_UNKNOWN  )  [inline]

Definition at line 44 of file diathekemgr.h.

00044 {return ((DiathekeFilterMgr*)filterMgr)->Markup(m);};


Member Data Documentation

Definition at line 27 of file diathekemgr.h.

Definition at line 42 of file diathekemgr.h.

Definition at line 28 of file diathekemgr.h.

Definition at line 41 of file diathekemgr.h.

Definition at line 29 of file diathekemgr.h.


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

Generated on 18 Mar 2013 for The SWORD Project by  doxygen 1.6.1