~ubuntu-branches/ubuntu/raring/sunpinyin/raring

« back to all changes in this revision

Viewing changes to src/ime-core/imi_option_event.h

  • Committer: Package Import Robot
  • Author(s): YunQiang Su
  • Date: 2012-03-30 15:31:55 UTC
  • mfrom: (1.1.3) (1.2.7 sid)
  • Revision ID: package-import@ubuntu.com-20120330153155-qgls77sogzgtg9zp
Tags: 2.0.3+git20120222-1
* Team upload: git snapshot 20120222.
   - fix breaks if LDFLAGS in environment contains
       multiple words (Closese #646001).
   - rm patches merged to upstream:
       append-os-environ-toenv.patch
       fix-ftbfs-on-sh.patch
       remove-10-candidate-words-limitation.patch
   - refresh disable-lm-dict-compile.patch.
* Bump stardard version to 3.9.3: no modify needed.
* add libsunpinyin3-dbg and python-sunpinyin packages.
* debian/compat to 9, multiarch it.
* rewrite debian/rules with dh 7 format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
class COptionEventBus;
11
11
 
12
 
struct COptionEvent
13
 
{
14
 
    template<typename ValueType>
15
 
    COptionEvent(const std::string& k, const ValueType& v)
16
 
        : name(k), value(v) 
 
12
struct COptionEvent {
 
13
    template<typename ValueType>COptionEvent(const std::string& k,
 
14
                                             const ValueType& v)
 
15
        : name(k), value(v)
17
16
    {}
18
17
 
19
18
    int get_int() const;
21
20
    std::string get_string() const;
22
21
    std::vector<std::string> get_string_list() const;
23
22
    std::vector<string_pair> get_string_pair_list() const;
24
 
    
 
23
 
25
24
    /* TODO:
26
25
     * string_pair get_string_pair() const;
27
26
     * std::vector<bool> get_bool_list() const;
28
27
     * std::vector<int> get_int_list() const;
29
28
     */
30
 
    
 
29
 
31
30
    int type;
32
31
    std::string name;
33
 
    
34
 
    struct variant_
35
 
    {
 
32
 
 
33
    struct variant_ {
36
34
        variant_(int);
37
35
        variant_(const std::string&);
38
36
        variant_(bool);
39
37
        variant_(const std::vector<std::string>&);
40
38
        variant_(const std::vector<string_pair>&);
41
 
        struct val_
42
 
        {
43
 
            int                      d_int;
44
 
            std::string              d_string;
45
 
            bool                     d_bool;
 
39
        struct val_ {
 
40
            int d_int;
 
41
            std::string d_string;
 
42
            bool d_bool;
46
43
            std::vector<std::string> d_strings;
47
44
            std::vector<string_pair> d_string_pair_list;
48
45
        } data;
81
78
     * @param listener who is interested in a change of options
82
79
     */
83
80
    void registerAsListener(IConfigurable* listener);
84
 
    
 
81
 
85
82
    /**
86
83
     * remove listener from the subscriber list
87
84
     * @param listener who is no more interested in a change of options