Example #1
0
  @Override
  public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException {
    short firstBytes = ITypeMarshalBuffer.EVAL_FUNCTION_SET;
    if (fQualified) firstBytes |= FLAG_QUALIFIED;
    if (fAddressOf) firstBytes |= FLAG_ADDRESS_OF;
    if (fFunctionSet != null) {
      firstBytes |= FLAG_HAS_FUNCTION_SET;
      final ICPPFunction[] bindings = fFunctionSet.getBindings();
      final ICPPTemplateArgument[] args = fFunctionSet.getTemplateArguments();
      if (args != null) firstBytes |= FLAG_HAS_TEMPLATE_ARGS;

      buffer.putShort(firstBytes);
      buffer.putInt(bindings.length);
      for (ICPPFunction binding : bindings) {
        buffer.marshalBinding(binding);
      }
      if (args != null) {
        buffer.putInt(args.length);
        for (ICPPTemplateArgument arg : args) {
          buffer.marshalTemplateArgument(arg);
        }
      }
      buffer.marshalType(fImpliedObjectType);
    } else {
      buffer.putShort(firstBytes);
      buffer.putCharArray(fName);
    }
    marshalTemplateDefinition(buffer);
  }
Example #2
0
 @Override
 public void marshal(ITypeMarshalBuffer buffer, boolean includeValue) throws CoreException {
   buffer.putShort(ITypeMarshalBuffer.EXEC_SWITCH);
   buffer.marshalEvaluation(controllerExprEval, includeValue);
   buffer.marshalExecution(controllerDeclExec, includeValue);
   buffer.putInt(bodyStmtExecutions.length);
   for (ICPPExecution execution : bodyStmtExecutions) {
     buffer.marshalExecution(execution, includeValue);
   }
 }