First public contribution.
2 **********************************************************************
3 * Copyright (C) 1999-2000 IBM Corp. All rights reserved.
4 **********************************************************************
5 * Date Name Description
6 * 12/1/99 rgillam Complete port from Java.
7 * 01/13/2000 helena Added UErrorCode to ctors.
8 **********************************************************************
14 #include "unicode/utypes.h"
15 #include "unicode/uobject.h"
16 #include "unicode/udata.h"
21 /* forward declaration */
22 class DictionaryBasedBreakIterator;
25 // DictionaryBasedBreakIteratorTables
27 // This class sits between instances of DictionaryBasedBreakIterator
28 // and the dictionary data itself, which is of type BreakDictionary.
29 // It provides reference counting, allowing multiple copies of a
30 // DictionaryBasedBreakIterator to share a single instance of
33 // TODO: it'd probably be cleaner to add the reference counting to
34 // BreakDictionary and get rid of this class, but doing it this way
35 // was a convenient transition from earlier code, and time is short...
37 class DictionaryBasedBreakIteratorTables : public UMemory {
44 //=======================================================================
46 //=======================================================================
47 /* @param dictionaryFilename The name of the dictionary file
48 * @param status The error code
49 * @return the newly created DictionaryBasedBreakIteratorTables
51 DictionaryBasedBreakIteratorTables(const char* dictionaryFilename,
54 BreakDictionary *fDictionary;
56 void removeReference();
58 * Destructor. Should not be used directly. Use removeReference() istead.
59 * (Not private to avoid compiler warnings.)
61 virtual ~DictionaryBasedBreakIteratorTables();
65 * The copy constructor is declared private and not implemented.
66 * THIS CLASS MAY NOT BE COPIED.
67 * @param that The DictionaryBasedBreakIteratorTables to be copied.
68 * @return the newly constructed DictionaryBasedBreakIteratorTables.
70 DictionaryBasedBreakIteratorTables(const DictionaryBasedBreakIteratorTables& that);
72 //=======================================================================
74 //=======================================================================
78 * The assignment operator is declared private and not implemented.
79 * THIS CLASS MAY NOT BE COPIED.
80 * Call addReference() and share an existing copy instead.
81 * @that The object to be copied
82 * @return the newly created DictionaryBasedBreakIteratorTables.
84 DictionaryBasedBreakIteratorTables& operator=(
85 const DictionaryBasedBreakIteratorTables& that);