forked from yvt/xtbook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
XTBDictionary.h
45 lines (36 loc) · 1.33 KB
/
XTBDictionary.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// XTBDictionary.h
// XTBook
//
// Created by Kawada Tomoaki on 5/22/11.
// Copyright 2011 Nexhawks. All rights reserved.
//
#pragma once
#include <string>
#include <tcw/twObject.h>
#include "TPList/TPLDictionary.h"
class XTBDocument;
class XTBDictionaryIterator;
#define XTBDictionaryIdentifierKey "XTBDictionaryIdentifier"
#define XTBDictionarySchemeKey "XTBDictionaryScheme"
#define XTBDictionaryTypeIdentifierKey "XTBDictionaryTypeIdentifier"
#define XTBDictionaryDisplayNameKey "XTBDictionaryDisplayName"
class XTBDictionary: public twObject{
protected:
std::wstring m_scheme;
std::wstring m_identifier;
std::wstring m_displayName;
public:
XTBDictionary(const TPLDictionary *options);
virtual ~XTBDictionary();
virtual bool hasDocumentForName(const std::wstring&) const=0;
virtual XTBDocument *documentForName(const std::wstring&) const=0;
virtual XTBDictionaryIterator *searchWithKey(const std::wstring&) const{return NULL;}
static XTBDictionary *dictionaryWithName(const std::wstring&);
static void addDictionaryAtPath(const XTBSysString&);
static void scanDictionaries();
static std::map<std::wstring, XTBDictionary *>& allDictionaries();
const std::wstring& scheme() const{return m_scheme;}
const std::wstring& identifier() const{return m_identifier;}
const std::wstring& displayName() const{return m_displayName;}
};