Examples of ETuple2


Examples of erjang.ETuple2

    }
   
    while (!opts.isNil()) {
     
      EObject val = opts.head();
      ETuple2 tup;
      if (val == am_compressed) {
        compression = 6;
      } else if ((tup=ETuple2.cast(val)) != null) {
        if (tup.elem1 == am_compressed) {
          ESmall sm;
View Full Code Here

Examples of erjang.ETuple2

        .tail().testCons()) {

      EObject val = settings.head();
      ETuple tup;
      if ((tup = val.testTuple()) != null) {
        ETuple2 tup2;
        if ((tup2 = ETuple2.cast(tup)) != null) {

          if (tup2.elem1 == am_args) {
            ESeq list = tup2.elem2.testSeq();
            EObject[] nargs = list.toArray();

            String[] new_cmd = new String[nargs.length + 1];
            new_cmd[0] = cmd[0];
            for (int i = 0; i < nargs.length; i++) {
              new_cmd[i + 1] = EString.make(nargs[i])
                  .stringValue();
            }
            cmd = new_cmd;

          } else if (tup2.elem1 == am_arg0) {
            String[] new_cmd = new String[2];
            new_cmd[0] = cmd[0];
            new_cmd[1] = EString.make(tup2.elem2).stringValue();

          } else if (tup2.elem1 == am_packet) {
            packet = tup2.elem2.asInt();
            mode = Mode.PACKET;

          } else if (tup2.elem1 == am_cd) {
            cwd = EString.make(tup2.elem2).stringValue();

          } else if (tup2.elem1 == am_env) {

            ESeq ee;
            if ((ee = tup2.elem2.testSeq()) == null) {
              throw ERT.badarg();
            }

            EObject[] envs = ee.toArray();
            for (int i = 0; i < envs.length; i++) {
              ETuple2 e = ETuple2.cast(envs[i].testTuple());
              if (e.elem2 == ERT.FALSE) {
                env.remove(EString.make(e.elem1).stringValue());
              } else {
                env.put(EString.make(e.elem1).stringValue(),
                    EString.make(e.elem2).stringValue());
View Full Code Here

Examples of erjang.ETuple2

          this.instance.timeout();
          continue next_message;
        }
      }

      ETuple2 t2;
      EPortControl ctrl;
      ETuple3 t3;
      ETuple4 t4;
      ETuple tup;
      if ((t2 = ETuple2.cast(msg)) != null) {

        EObject sender = t2.elem1;

        ETuple2 cmd;
        if ((cmd = ETuple2.cast(t2.elem2)) != null) {
          // cmd must be one of
          // {command, iodata()}
          // {connect, PID}
View Full Code Here

Examples of erjang.ETuple2

  /**
   * @param out
   * @throws Pausable
   */
  public void output_from_driver(EObject out) throws Pausable {
    output_term_from_driver(new ETuple2(port, new ETuple2(am_data, out)));
  }
View Full Code Here

Examples of erjang.ETuple2

  public void output_from_driver(EObject out) throws Pausable {
    output_term_from_driver(new ETuple2(port, new ETuple2(am_data, out)));
  }

  public void output_from_driver_b(EObject out) {
    output_term_from_driver_b(new ETuple2(port, new ETuple2(am_data, out)));
  }
View Full Code Here

Examples of erjang.ETuple2

  /**
   * @throws Pausable
   *
   */
  public void eof_from_driver_b() {
    output_term_from_driver_b(new ETuple2(port, am_eof));
  }
View Full Code Here

Examples of erjang.ETuple2

  public void eof_from_driver_b() {
    output_term_from_driver_b(new ETuple2(port, am_eof));
  }

  public void eof_from_driver() throws Pausable {
    output_term_from_driver(new ETuple2(port, am_eof));
  }
View Full Code Here

Examples of erjang.ETuple2

  public void eof_from_driver() throws Pausable {
    output_term_from_driver(new ETuple2(port, am_eof));
  }

  public void exit_status_from_driver(int code) throws Pausable {
    output_term_from_driver(new ETuple2(port, new ETuple2(am_exit_status, ERT.box(code))));
  }
View Full Code Here

Examples of erjang.ETuple2

  public void exit_status_from_driver(int code) throws Pausable {
    output_term_from_driver(new ETuple2(port, new ETuple2(am_exit_status, ERT.box(code))));
  }

  public void exit_status_from_driver_b(int code) {
    output_term_from_driver_b(new ETuple2(port, new ETuple2(am_exit_status, ERT.box(code))));
  }
View Full Code Here

Examples of erjang.ETuple2

  }

  public EObject port_info(EAtom spec) {
   
    if (spec == am_connected) {
      return new ETuple2(am_connected, owner);
    }
   
    if (spec == am_name) {
      return new ETuple2(am_name, getName());
    }
   
    if (spec == EProc.am_links) {
      return new ETuple2(EProc.am_links, links());
    }
   
    throw new NotImplemented("port_info(" + spec + ")");
  
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.