Back to index

Public Member Functions | Public Attributes | Private Attributes
interactive_command_rep Class Reference
Inheritance diagram for interactive_command_rep:
Inheritance graph
Collaboration diagram for interactive_command_rep:
Collaboration graph

List of all members.

Public Member Functions

 interactive_command_rep (server_rep *sv2, tm_window win2, object fun2, scheme_tree p2)
void apply ()
tm_ostreamprint (tm_ostream &out)
virtual void apply (object args)

Public Attributes

int ref_count

Private Attributes

tm_window win
object fun
scheme_tree p
int i
array< strings

Detailed Description

Definition at line 175 of file tm_dialogue.cpp.

Constructor & Destructor Documentation

Definition at line 184 of file tm_dialogue.cpp.

      sv (sv2), win (win2), fun (fun2), p (p2), i (0), s (N(p)) {}

Member Function Documentation

void command_rep::apply ( object  args) [virtual, inherited]

Reimplemented in object_command_rep.

Definition at line 20 of file command.cpp.

  (void) args;
  apply ();

Here is the call graph for this function:

void interactive_command_rep::apply ( ) [virtual]

Implements command_rep.

Definition at line 193 of file tm_dialogue.cpp.

  if ((i>0) && (s[i-1] == "#f")) return;
  if (i == N(p)) {
    object learn= null_object ();
    array<object> params (N(p));
    for (i=N(p)-1; i>=0; i--) {
      params[i]= string_to_object (s[i]);
      learn= cons (cons (object (as_string (i)), params[i]), learn);
    call ("learn-interactive", fun, learn);
    string ret= object_to_string (call (fun, params));
    if (ret != "" && ret != "<unspecified>" && ret != "#<unspecified>")
      sv->set_message (verbatim (ret), "interactive command");
  else {
    s[i]= string ("");
    string prompt= get_prompt (p, i);
    string type  = get_type (p, i);
    array<string> proposals= get_proposals (p, i);
    win->interactive (prompt, type, proposals, s[i], this);

Here is the call graph for this function:

tm_ostream& interactive_command_rep::print ( tm_ostream out) [inline, virtual]

Reimplemented from command_rep.

Definition at line 188 of file tm_dialogue.cpp.

    return out << "interactive command " << p; }

Member Data Documentation

Definition at line 178 of file tm_dialogue.cpp.

Definition at line 180 of file tm_dialogue.cpp.

Definition at line 179 of file tm_dialogue.cpp.

int abstract_struct::ref_count [inherited]

Definition at line 142 of file basic.hpp.

Definition at line 181 of file tm_dialogue.cpp.

Definition at line 176 of file tm_dialogue.cpp.

Definition at line 177 of file tm_dialogue.cpp.

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