Package org.apache.etch.compiler.ast

Examples of org.apache.etch.compiler.ast.TypeRef.dim()


      Parameter param = (Parameter) named;
      TypeRef type = param.type();

      if (type.isBuiltin())
        return String.format("EtchValidator%s::Get(runtime, %d, tmpValue)",
            this.getValidatorStringForParam(param), type.dim());

      Named<?> n = type.getNamed(type.intf());

      if (n.isBuiltin()) {
        Builtin b = (Builtin) n;
View Full Code Here


        /*
         * int i = cn.indexOf( '<' ); if (i >= 0) cn = cn.substring( 0, i );
         */
        return String.format(
            "EtchValidatorCustom::Get(runtime, %d, %s::TYPE(), %s, tmpValue);",
            type.dim(), cn, b.allowSubclass());
      }

      // Allow subclassing for etch defined structs and externs.

      if (n.isStruct() || n.isExcept()) {
View Full Code Here

      if (n.isStruct() || n.isExcept()) {
        if (n.isStruct()) {
          Struct s = (Struct) n;
          return String.format(
              "EtchValidatorCustom::Get(runtime, %d, %s::TYPE(), true, tmpValue);",
              type.dim(), s
              .service().name() + "::" + n.efqname(this));
        }
        Except e = (Except) n;
        return String.format(
            "EtchValidatorCustom::Get(runtime, %d, %s::TYPE(), true, tmpValue);", type.dim(), e
View Full Code Here

              type.dim(), s
              .service().name() + "::" + n.efqname(this));
        }
        Except e = (Except) n;
        return String.format(
            "EtchValidatorCustom::Get(runtime, %d, %s::TYPE(), true, tmpValue);", type.dim(), e
            .service().name() + "::" + n.efqname(this));
      }
      // Don't allow subclassing for externs or etch defined enums.
      if (!(n.isExtern() || n.isEnumx()))
        Assertion.check(n.isExtern() || n.isEnumx(),
View Full Code Here

        Assertion.check(n.isExtern() || n.isEnumx(),
            "n.isExtern() || n.isEnumx(): " + n);
      Enumx e = (Enumx) n;
      return String.format(
          "EtchValidatorCustom::Get(runtime, %d, %s::TYPE(), false, tmpValue);",
          type.dim(), n.efqname(this));
    }

    if (named instanceof Thrown) {
      Thrown thrown = (Thrown) named;
      Except e = (Except) thrown.getNamed();
View Full Code Here

      Parameter param = (Parameter) named;
      TypeRef type = param.type();

      if (type.isBuiltin())
        return String.format("(etch_object*)etchvtor_%s_get( %d )", getValidatorStringForParam(param),
            type.dim());

      Named<?> n = type.getNamed(type.intf());

      if (n.isBuiltin()) {
        Builtin b = (Builtin) n;
View Full Code Here


      if (n.isStruct() || n.isExcept() || n.isEnumx())
        return String.format(
            "(etch_object*)etchvtor_custom_get(ETCHTYPEB_USER, get_dynamic_classid_unique(&CLASSID_%s), %s_valufact_get_static()->_mt_%s, %d)",
                 n.efqname(this).toUpperCase(), service.name().toString().toLowerCase(), n.efqname(this), type.dim());

      if (n.isExtern())
      {
        Assertion.check(false,"extern type not supported for " + n );
      }
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.