HowManyAreAnalyzed(): use status_user_agent to report progress
[linguistica.git] / Prefix.h
blob30031c75371dd1d37c35c083a1dc59ce2ce42a81
1 // Prefix type with corpus count for suffix/signature-based morphology discovery
2 // Copyright © 2009 The University of Chicago
3 #ifndef PREFIX_H
4 #define PREFIX_H
6 // See the CMiniLexicon class in MiniLexicon.h for an overview of
7 // suffix/signature-based discovery of morphology.
9 class CPrefix;
11 #include "Affix.h"
13 // XXX. affix_list_view_item<CPrefix> is explicitly instantiated
14 // in Prefix.cpp, so we should avoid instantiating it automatically
15 // in other translation units:
17 //extern template class linguistica::affix_list_view_item<CPrefix>;
19 // but swig cannot handle the "extern template" declaration, so we
20 // skip it. Luckily for us, affix_list_view_item<CPrefix> is not
21 // used in Suffix.cpp, the only other translation unit that
22 // includes affix_list_view_item.tcc, so even without the "extern
23 // template" declaration the methods happen to be instantiated only
24 // once.
26 /// A list view item for prefixes.
27 /**
28 Contains all the necessary variables needed when displaying a
29 prefix and its data in a list view.
31 typedef linguistica::affix_list_view_item<CPrefix> CPrefixListViewItem;
33 /// A string represention of prefixes.
34 /**
35 This class is a string representation of prefixes.
38 class CPrefix : public CAffix
41 public:
43 //--------------------------------------------------
44 // Constructors/Destructor
45 //--------------------------------------------------
47 CPrefix ( class CMiniLexicon* mini = NULL );
48 // CPrefix (const QString);
49 CPrefix (const CStringSurrogate&, class CMiniLexicon* mini = NULL );
50 virtual ~CPrefix();
53 //--------------------------------------------------
54 // Public accessor methods
55 //--------------------------------------------------
57 void ListDisplay(class Q3ListView*, QMap<QString, QString>* = NULL, int char_count = 27 );
58 CParse& Express( CParse& Output, bool DisplayDeletees = true );
59 void OutputPrefix( class Q3TextStream& );
60 QString ExpressPrefix ();
62 //--------------------------------------------------
63 // Public mutator methods
64 //--------------------------------------------------
66 void MergeMeWithMyStems ( class CMiniLexicon* );
67 virtual double GetLengthOfPointerToMe();
70 #endif // PREFIX_H