#ifndef __X10_ARRAY_ARRAY__ANONYMOUS__14087_H
#define __X10_ARRAY_ARRAY__ANONYMOUS__14087_H

#include <x10rt.h>


#define X10_LANG_OBJECT_H_NODEPS
#include <x10/lang/Object.h>
#undef X10_LANG_OBJECT_H_NODEPS
#define X10_LANG_SEQUENCE_H_NODEPS
#include <x10/lang/Sequence.h>
#undef X10_LANG_SEQUENCE_H_NODEPS
namespace x10 { namespace array { 
template<class TPMGL(T)> class Array;
} } 
namespace x10 { namespace lang { 
template<class TPMGL(T)> class Iterator;
} } 
namespace x10 { namespace lang { 
template<class TPMGL(T)> class Iterable;
} } 
namespace x10 { namespace lang { 
class Int;
} } 
namespace x10 { namespace array { 

template<class TPMGL(T31873)> class Array__Anonymous__14087;
template <> class Array__Anonymous__14087<void>;
template<class TPMGL(T31873)> class Array__Anonymous__14087 : public x10::lang::Object
  {
    public:
    RTT_H_DECLS_CLASS
    
    static x10aux::itable_entry _itables[5];
    
    virtual x10aux::itable_entry* _getITables() { return _itables; }
    
    static typename x10::lang::Sequence<TPMGL(T31873)>::template itable<x10::array::Array__Anonymous__14087<TPMGL(T31873)> > _itable_0;
    
    static x10::lang::Any::itable<x10::array::Array__Anonymous__14087<TPMGL(T31873)> > _itable_1;
    
    static typename x10::lang::Fun_0_1<x10_int, TPMGL(T31873)>::template itable<x10::array::Array__Anonymous__14087<TPMGL(T31873)> > _itable_2;
    
    static typename x10::lang::Iterable<TPMGL(T31873)>::template itable<x10::array::Array__Anonymous__14087<TPMGL(T31873)> > _itable_3;
    
    x10aux::ref<x10::array::Array<TPMGL(T31873)> > FMGL(out__);
    
    virtual x10aux::ref<x10::lang::Iterator<TPMGL(T31873)> > iterator(
      );
    virtual TPMGL(T31873) __apply(x10_int i);
    x10_int size();
    void _constructor(x10aux::ref<x10::array::Array<TPMGL(T31873)> > out__);
    
    static x10aux::ref<x10::array::Array__Anonymous__14087<TPMGL(T31873)> > _make(
             x10aux::ref<x10::array::Array<TPMGL(T31873)> > out__);
    
    
    // Serialization
    public: static const x10aux::serialization_id_t _serialization_id;
    
    public: x10aux::serialization_id_t _get_serialization_id() {
         return _serialization_id;
    }
    
    public: virtual void _serialize_body(x10aux::serialization_buffer& buf);
    
    public: static x10aux::ref<x10::lang::Reference> _deserializer(x10aux::deserialization_buffer& buf);
    
    public: void _deserialize_body(x10aux::deserialization_buffer& buf);
    
};
template <> class Array__Anonymous__14087<void> : public x10::lang::Object
{
    public:
    static x10aux::RuntimeType rtt;
    static const x10aux::RuntimeType* getRTT() { return & rtt; }
    
};

} } 
#endif // X10_ARRAY_ARRAY__ANONYMOUS__14087_H

namespace x10 { namespace array { 
template<class TPMGL(T31873)> class Array__Anonymous__14087;
} } 

#ifndef X10_ARRAY_ARRAY__ANONYMOUS__14087_H_NODEPS
#define X10_ARRAY_ARRAY__ANONYMOUS__14087_H_NODEPS
#include <x10/lang/Object.h>
#include <x10/lang/Sequence.h>
#include <x10/array/Array.h>
#include <x10/lang/Iterator.h>
#include <x10/lang/Iterable.h>
#include <x10/lang/Int.h>
#ifndef X10_ARRAY_ARRAY__ANONYMOUS__14087_H_GENERICS
#define X10_ARRAY_ARRAY__ANONYMOUS__14087_H_GENERICS
#endif // X10_ARRAY_ARRAY__ANONYMOUS__14087_H_GENERICS
#ifndef X10_ARRAY_ARRAY__ANONYMOUS__14087_H_IMPLEMENTATION
#define X10_ARRAY_ARRAY__ANONYMOUS__14087_H_IMPLEMENTATION
#include <x10/array/Array__Anonymous__14087.h>

template<class TPMGL(T31873)> typename x10::lang::Sequence<TPMGL(T31873)>::template itable<x10::array::Array__Anonymous__14087<TPMGL(T31873)> >  x10::array::Array__Anonymous__14087<TPMGL(T31873)>::_itable_0(&x10::array::Array__Anonymous__14087<TPMGL(T31873)>::equals, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::hashCode, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::iterator, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::__apply, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::size, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::toString, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::typeName);
template<class TPMGL(T31873)> x10::lang::Any::itable<x10::array::Array__Anonymous__14087<TPMGL(T31873)> >  x10::array::Array__Anonymous__14087<TPMGL(T31873)>::_itable_1(&x10::array::Array__Anonymous__14087<TPMGL(T31873)>::equals, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::hashCode, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::toString, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::typeName);
template<class TPMGL(T31873)> typename x10::lang::Fun_0_1<x10_int, TPMGL(T31873)>::template itable<x10::array::Array__Anonymous__14087<TPMGL(T31873)> >  x10::array::Array__Anonymous__14087<TPMGL(T31873)>::_itable_2(&x10::array::Array__Anonymous__14087<TPMGL(T31873)>::equals, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::hashCode, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::__apply, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::toString, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::typeName);
template<class TPMGL(T31873)> typename x10::lang::Iterable<TPMGL(T31873)>::template itable<x10::array::Array__Anonymous__14087<TPMGL(T31873)> >  x10::array::Array__Anonymous__14087<TPMGL(T31873)>::_itable_3(&x10::array::Array__Anonymous__14087<TPMGL(T31873)>::equals, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::hashCode, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::iterator, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::toString, &x10::array::Array__Anonymous__14087<TPMGL(T31873)>::typeName);
template<class TPMGL(T31873)> x10aux::itable_entry x10::array::Array__Anonymous__14087<TPMGL(T31873)>::_itables[5] = {x10aux::itable_entry(&x10aux::getRTT<x10::lang::Sequence<TPMGL(T31873)> >, &_itable_0), x10aux::itable_entry(&x10aux::getRTT<x10::lang::Any>, &_itable_1), x10aux::itable_entry(&x10aux::getRTT<x10::lang::Fun_0_1<x10_int, TPMGL(T31873)> >, &_itable_2), x10aux::itable_entry(&x10aux::getRTT<x10::lang::Iterable<TPMGL(T31873)> >, &_itable_3), x10aux::itable_entry(NULL, (void*)x10aux::getRTT<x10::array::Array__Anonymous__14087<TPMGL(T31873)> >())};

//#line 55 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10FieldDecl_c

//#line 391 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T31873)> x10aux::ref<x10::lang::Iterator<TPMGL(T31873)> >
  x10::array::Array__Anonymous__14087<TPMGL(T31873)>::iterator() {
    
    //#line 391 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return x10::lang::Iterable<TPMGL(T31873)>::iterator(x10aux::nullCheck(x10aux::nullCheck(((x10aux::ref<x10::array::Array__Anonymous__14087<TPMGL(T31873)> >)this)->
                                                                                              FMGL(out__))->x10::array::Array<TPMGL(T31873)>::values()));
    
}

//#line 393 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T31873)> TPMGL(T31873) x10::array::Array__Anonymous__14087<TPMGL(T31873)>::__apply(
  x10_int i) {
    
    //#line 393 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return x10aux::nullCheck(((x10aux::ref<x10::array::Array__Anonymous__14087<TPMGL(T31873)> >)this)->
                               FMGL(out__))->x10::array::Array<TPMGL(T31873)>::__apply(
             i);
    
}

//#line 394 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10MethodDecl_c
template<class TPMGL(T31873)> x10_int x10::array::Array__Anonymous__14087<TPMGL(T31873)>::size(
  ) {
    
    //#line 394 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10Return_c
    return x10aux::nullCheck(((x10aux::ref<x10::array::Array__Anonymous__14087<TPMGL(T31873)> >)this)->
                               FMGL(out__))->FMGL(size);
    
}

//#line 390 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorDecl_c
template<class TPMGL(T31873)> void x10::array::Array__Anonymous__14087<TPMGL(T31873)>::_constructor(
                                x10aux::ref<x10::array::Array<TPMGL(T31873)> > out__) {
    
    //#line 390 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": x10.ast.X10ConstructorCall_c
    (this)->::x10::lang::Object::_constructor();
    
    //#line 55 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/array/Array.x10": Eval of x10.ast.X10FieldAssign_c
    ((x10aux::ref<x10::array::Array__Anonymous__14087<TPMGL(T31873)> >)this)->
      FMGL(out__) = out__;
}
template<class TPMGL(T31873)> x10aux::ref<x10::array::Array__Anonymous__14087<TPMGL(T31873)> > x10::array::Array__Anonymous__14087<TPMGL(T31873)>::_make(
                                x10aux::ref<x10::array::Array<TPMGL(T31873)> > out__)
{
    x10aux::ref<x10::array::Array__Anonymous__14087<TPMGL(T31873)> > this_ = new (memset(x10aux::alloc<x10::array::Array__Anonymous__14087<TPMGL(T31873)> >(), 0, sizeof(x10::array::Array__Anonymous__14087<TPMGL(T31873)>))) x10::array::Array__Anonymous__14087<TPMGL(T31873)>();
    this_->_constructor(out__);
    return this_;
}


template<class TPMGL(T31873)> const x10aux::serialization_id_t x10::array::Array__Anonymous__14087<TPMGL(T31873)>::_serialization_id = 
    x10aux::DeserializationDispatcher::addDeserializer(x10::array::Array__Anonymous__14087<TPMGL(T31873)>::_deserializer, x10aux::CLOSURE_KIND_NOT_ASYNC);

template<class TPMGL(T31873)> void x10::array::Array__Anonymous__14087<TPMGL(T31873)>::_serialize_body(x10aux::serialization_buffer& buf) {
    x10::lang::Object::_serialize_body(buf);
    buf.write(this->FMGL(out__));
    
}

template<class TPMGL(T31873)> x10aux::ref<x10::lang::Reference> x10::array::Array__Anonymous__14087<TPMGL(T31873)>::_deserializer(x10aux::deserialization_buffer& buf) {
    x10aux::ref<x10::array::Array__Anonymous__14087<TPMGL(T31873)> > this_ = new (memset(x10aux::alloc<x10::array::Array__Anonymous__14087<TPMGL(T31873)> >(), 0, sizeof(x10::array::Array__Anonymous__14087<TPMGL(T31873)>))) x10::array::Array__Anonymous__14087<TPMGL(T31873)>();
    buf.record_reference(this_);
    this_->_deserialize_body(buf);
    return this_;
}

template<class TPMGL(T31873)> void x10::array::Array__Anonymous__14087<TPMGL(T31873)>::_deserialize_body(x10aux::deserialization_buffer& buf) {
    x10::lang::Object::_deserialize_body(buf);
    FMGL(out__) = buf.read<x10aux::ref<x10::array::Array<TPMGL(T31873)> > >();
}

template<class TPMGL(T31873)> x10aux::RuntimeType x10::array::Array__Anonymous__14087<TPMGL(T31873)>::rtt;
template<class TPMGL(T31873)> void x10::array::Array__Anonymous__14087<TPMGL(T31873)>::_initRTT() {
    const x10aux::RuntimeType *canonical = x10aux::getRTT<x10::array::Array__Anonymous__14087<void> >();
    if (rtt.initStageOne(canonical)) return;
    const x10aux::RuntimeType* parents[2] = { x10aux::getRTT<x10::lang::Object>(), x10aux::getRTT<x10::lang::Sequence<TPMGL(T31873)> >()};
    const x10aux::RuntimeType* params[1] = { x10aux::getRTT<TPMGL(T31873)>()};
    x10aux::RuntimeType::Variance variances[1] = { x10aux::RuntimeType::invariant};
    const char *baseName = "x10.array.Array.Anonymous.14087";
    rtt.initStageTwo(baseName, x10aux::RuntimeType::class_kind, 2, parents, 1, params, variances);
}
#endif // X10_ARRAY_ARRAY__ANONYMOUS__14087_H_IMPLEMENTATION
#endif // __X10_ARRAY_ARRAY__ANONYMOUS__14087_H_NODEPS
