Back to index

im-sdk  12.3.91
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
IMLExec_ICState Class Reference

#include <ICState.hh>

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

List of all members.

Public Types

enum  IML_EXITCODE { IML_EXIT_SUCCESS = 1 }

Public Member Functions

bool empty ()
void set_icstate (ICState *x_pics)
ICStateget_icstate ()
virtual iml_instpush_insts (iml_inst **rrv)
virtual bool execute ()
virtual ~IMLExec_ICState ()
 IMLExec_ICState (ICState *x_pics=NULL)

Private Types

typedef list< iml_inst * > IMLInstList

Private Member Functions

void delete_inst (iml_inst *pinst)
bool push_back (iml_inst *pinst)
int execute_opcode (int opcode, iml_inst *rv)
int imli_nop (iml_inst *rv)
int imli_set_status (iml_inst *rv)
int imli_reset (iml_inst *rv)
int imli_keypress (iml_inst *rv)
int imli_commit (iml_inst *rv)
int imli_reset_return (iml_inst *rv)
int imli_preedit_start (iml_inst *rv)
int imli_preedit_draw (iml_inst *rv)
int imli_preedit_done (iml_inst *rv)
int imli_preedit_caret (iml_inst *rv)
int imli_status_start (iml_inst *rv)
int imli_status_draw (iml_inst *rv)
int imli_status_done (iml_inst *rv)
int imli_lookup_start (iml_inst *rv)
int imli_lookup_draw (iml_inst *rv)
int imli_lookup_process (iml_inst *rv)
int imli_lookup_done (iml_inst *rv)
int imli_aux_start (iml_inst *rv)
int imli_aux_draw (iml_inst *rv)
int imli_aux_done (iml_inst *rv)
int imli_ns_listener (iml_inst *rv)
int imli_key_info (iml_inst *rv)
int imli_put_queue (iml_inst *rv)

Private Attributes

ICStatepics
IMLInstList pendinglist

Detailed Description

Definition at line 13 of file ICState.hh.


Member Typedef Documentation

Definition at line 17 of file ICState.hh.


Member Enumeration Documentation

enum IMLExec::IML_EXITCODE [inherited]
Enumerator:
IML_EXIT_SUCCESS 

Definition at line 49 of file ICHandler.hh.

                      {
           IML_EXIT_SUCCESS = 1
    };

Constructor & Destructor Documentation

Definition at line 504 of file ICState.cpp.

{
    IMLInstList::iterator it;
    for (it = pendinglist.begin(); it != pendinglist.end(); it++) {
       iml_delete_inst(*it);
    }
}

Here is the call graph for this function:

IMLExec_ICState::IMLExec_ICState ( ICState x_pics = NULL) [inline]

Definition at line 117 of file ICState.hh.

    { pics = x_pics; }

Member Function Documentation

void IMLExec_ICState::delete_inst ( iml_inst pinst) [private]
bool IMLExec_ICState::empty ( ) [inline]

Definition at line 104 of file ICState.hh.

    { return pendinglist.empty(); }
bool IMLExec_ICState::execute ( ) [virtual]

Definition at line 488 of file ICState.cpp.

{
    iml_inst *pinst;
    int op;

    while (pics->send_avail_p() && !pendinglist.empty()) {
       pinst = pendinglist.front();
       op = pinst->opcode & ~IMM_CB_RESULT_REQUIRED;
       execute_opcode(op, pinst);
       pendinglist.pop_front();
       iml_delete_inst(pinst);
    }

    return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int IMLExec_ICState::execute_opcode ( int  opcode,
iml_inst rv 
) [private]

Definition at line 397 of file ICState.cpp.

{
    switch (opcode) {
      case IMM_NOP:
       return imli_nop(rv);
      case IMM_SET_STATUS:
       return imli_set_status(rv);
      case IMM_RESET:
       return imli_reset(rv);
      case IMM_KEYPRESS:
       return imli_keypress(rv);
      case IMM_COMMIT:
       return imli_commit(rv);
      case IMM_RESET_RETURN:
       return imli_reset_return(rv);
      case IMM_PREEDIT_START:
       return imli_preedit_start(rv);
      case IMM_PREEDIT_DRAW:
       return imli_preedit_draw(rv);
      case IMM_PREEDIT_DONE:
       return imli_preedit_done(rv);
      case IMM_PREEDIT_CARET: 
       return imli_preedit_caret(rv);
      case IMM_STATUS_START: 
       return imli_status_start(rv);
      case IMM_STATUS_DRAW:
       return imli_status_draw(rv);
      case IMM_STATUS_DONE:
       return imli_status_done(rv);
      case IMM_LOOKUP_START:
       return imli_lookup_start(rv);
      case IMM_LOOKUP_DRAW:
       return imli_lookup_draw(rv);
      case IMM_LOOKUP_PROCESS:
       return imli_lookup_process(rv);
      case IMM_LOOKUP_DONE:
       return imli_lookup_done(rv);
      case IMM_AUX_START_2:
       return imli_aux_start(rv);
      case IMM_AUX_DRAW_2:
       return imli_aux_draw(rv);
      case IMM_AUX_DONE_2:
       return imli_aux_done(rv);
      case IMM_NS_LISTENER:
       return imli_ns_listener(rv);
      case IMM_KEY_INFO:
       return imli_key_info(rv);
      case IMM_PUT_QUEUE:
       return imli_put_queue(rv);
    }
    return imli_nop(rv);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 110 of file ICState.hh.

    { return pics; }
int IMLExec_ICState::imli_aux_done ( iml_inst rv) [private]

Definition at line 362 of file ICState.cpp.

{
    IMAuxDoneCallbackStruct *pimauxdone = (IMAuxDoneCallbackStruct*) &rv->operand;
    return pics->aux_done(pimauxdone);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int IMLExec_ICState::imli_aux_draw ( iml_inst rv) [private]

Definition at line 353 of file ICState.cpp.

{
    IMAuxDrawCallbackStruct *pimauxdraw = (IMAuxDrawCallbackStruct*) &rv->operand;
    return pics->draw_aux(pimauxdraw);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int IMLExec_ICState::imli_aux_start ( iml_inst rv) [private]

Definition at line 344 of file ICState.cpp.

{
    IMAuxStartCallbackStruct *pimauxstart = (IMAuxStartCallbackStruct*) &rv->operand;
    return pics->aux_start(pimauxstart);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int IMLExec_ICState::imli_commit ( iml_inst rv) [private]

Definition at line 223 of file ICState.cpp.

{
    IMText *cs = (IMText*) &rv->operand;
    return pics->commit_string(cs); 
}

Here is the call graph for this function:

Here is the caller graph for this function:

int IMLExec_ICState::imli_key_info ( iml_inst rv) [private]

Definition at line 380 of file ICState.cpp.

{
    return 0;
}

Here is the caller graph for this function:

int IMLExec_ICState::imli_keypress ( iml_inst rv) [private]

Definition at line 214 of file ICState.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 336 of file ICState.cpp.

{
    return pics->lookup_done();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 314 of file ICState.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 323 of file ICState.cpp.

{
#if 0
    IMLookupProcessCallbackStruct *pimlp = (IMLookupProcessCallbackStruct*) &rv->operand;
    return pics->lookup_process(pimlp);
#else
    return 0;
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 305 of file ICState.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int IMLExec_ICState::imli_nop ( iml_inst rv) [private]

Definition at line 187 of file ICState.cpp.

{
    return 0;
}

Here is the caller graph for this function:

Definition at line 371 of file ICState.cpp.

{
    IMNSListenerStruct *prns = (IMNSListenerStruct *) &rv->operand;
    return pics->ns_listener(prns);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 266 of file ICState.cpp.

{
#if 0
    IMPreeditCaretCallbackStruct *pimpcaret = (IMPreeditCaretCallbackStruct*) &rv->operand;
#endif
    LOG_ERROR("preedit_caret has already been expired.  Simply ignore it. (%d, %d)",
             pics->get_im_id(), pics->get_ic_id());

    return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 258 of file ICState.cpp.

{
    return pics->preedit_done();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 249 of file ICState.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 241 of file ICState.cpp.

{
    return pics->preedit_start();
}

Here is the call graph for this function:

Here is the caller graph for this function:

int IMLExec_ICState::imli_put_queue ( iml_inst rv) [private]

Definition at line 388 of file ICState.cpp.

{
    return 0;
}

Here is the caller graph for this function:

int IMLExec_ICState::imli_reset ( iml_inst rv) [private]

Definition at line 206 of file ICState.cpp.

{
    return 0;
}

Here is the caller graph for this function:

Definition at line 232 of file ICState.cpp.

{
    IMText *cs = (IMText*) &rv->operand;
    return pics->commit_string(cs); 
}

Here is the call graph for this function:

Here is the caller graph for this function:

int IMLExec_ICState::imli_set_status ( iml_inst rv) [private]

Definition at line 197 of file ICState.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 297 of file ICState.cpp.

{
    return pics->status_done();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 288 of file ICState.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 280 of file ICState.cpp.

{
    return pics->status_start();
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool IMLExec_ICState::push_back ( iml_inst pinst) [private]

Definition at line 454 of file ICState.cpp.

{
    pinst = iml_duplicate_inst(pinst);
    // memory error.
    if (!pinst) return false;
    pendinglist.push_back(pinst);
    return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Implements IMLExec.

Definition at line 466 of file ICState.cpp.

{
    iml_inst *pcur;
    iml_inst *result = NULL;
    int op;

    for (pcur = *rrv; pcur != (iml_inst*)0; pcur = pcur->next) {
       op = pcur->opcode & ~IMM_CB_RESULT_REQUIRED;
       if ((op < 0) || (op >= MAX_IMM_OPCODE)) {
           break;
       }
       push_back(pcur);
       if (pcur->opcode & IMM_CB_RESULT_REQUIRED) {
           if (!result) result = pcur;
       }
    }
    return result ;
}

Here is the call graph for this function:

void IMLExec_ICState::set_icstate ( ICState x_pics) [inline]

Definition at line 106 of file ICState.hh.

    { pics = x_pics; }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 18 of file ICState.hh.

Definition at line 16 of file ICState.hh.


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