#ifndef __X10_LANG_INTRANGE_H
#define __X10_LANG_INTRANGE_H

#include <x10rt.h>


#define X10_LANG_ANY_H_NODEPS
#include <x10/lang/Any.h>
#undef X10_LANG_ANY_H_NODEPS
#define X10_LANG_ITERABLE_H_NODEPS
#include <x10/lang/Iterable.h>
#undef X10_LANG_ITERABLE_H_NODEPS
#define X10_LANG_ANY_H_NODEPS
#include <x10/lang/Any.h>
#undef X10_LANG_ANY_H_NODEPS
#define X10_LANG_INT_H_NODEPS
#include <x10/lang/Int.h>
#undef X10_LANG_INT_H_NODEPS
#define X10_LANG_BOOLEAN_H_NODEPS
#include <x10/lang/Boolean.h>
#undef X10_LANG_BOOLEAN_H_NODEPS
namespace x10 { namespace lang { 
class Int;
} } 
namespace x10 { namespace lang { 
class Boolean;
} } 
namespace x10 { namespace array { 
class Region;
} } 
namespace x10 { namespace array { 
template<class TPMGL(T)> class Array;
} } 
namespace x10 { namespace array { 
class Point;
} } 
namespace x10 { namespace lang { 
class Place;
} } 
namespace x10 { namespace array { 
class Dist;
} } 
namespace x10 { namespace lang { 
class String;
} } 
namespace x10 { namespace lang { 
template<class TPMGL(T)> class Iterator;
} } 
namespace x10 { namespace lang { 
class IntRange__IntRangeIt;
} } 
namespace x10 { namespace compiler { 
class Native;
} } 
namespace x10 { namespace compiler { 
class NonEscaping;
} } 
namespace x10 { namespace lang { 

class IntRange   {
    public:
    RTT_H_DECLS_STRUCT
    
    x10::lang::IntRange* operator->() { return this; }
    
    x10_int FMGL(min);
    
    x10_int FMGL(max);
    
    x10_boolean FMGL(zeroBased);
    
    static x10aux::itable_entry _itables[3];
    
    x10aux::itable_entry* _getITables() { return _itables; }
    
    static x10::lang::Any::itable<x10::lang::IntRange > _itable_0;
    
    static x10::lang::Iterable<x10_int>::itable<x10::lang::IntRange > _itable_1;
    
    static x10aux::itable_entry _iboxitables[3];
    
    x10aux::itable_entry* _getIBoxITables() { return _iboxitables; }
    
    static x10::lang::IntRange _alloc(){x10::lang::IntRange t; return t; }
    
    void _constructor(x10_int min, x10_int max) {
        
        //#line 39 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/lang/IntRange.x10": polyglot.ast.Empty_c
        ;
        
        //#line 40 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/lang/IntRange.x10": x10.ast.X10LocalDecl_c
        x10_boolean zero = (x10aux::struct_equals(min, ((x10_int)0)));
        
        //#line 41 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/lang/IntRange.x10": x10.ast.AssignPropertyCall_c
        FMGL(min) = min;
        FMGL(max) = max;
        FMGL(zeroBased) = zero;
        
    }
    static x10::lang::IntRange _make(x10_int min, x10_int max) {
        x10::lang::IntRange this_; 
        this_->_constructor(min, max);
        return this_;
    }
    
    x10aux::ref<x10::array::Region> __times(x10::lang::IntRange that);
    x10::lang::IntRange translate(x10_int i) {
        
        //#line 56 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/lang/IntRange.x10": x10.ast.X10Return_c
        return x10::lang::IntRange::_make(((x10_int) (((*this)->FMGL(min)) + (i))),
                                          ((x10_int) (((*this)->FMGL(max)) + (i))));
        
    }
    x10::lang::IntRange translate(x10aux::ref<x10::array::Point> p);
    x10aux::ref<x10::array::Region> __and(x10aux::ref<x10::array::Region> that);
    x10aux::ref<x10::array::Dist> __arrow(x10::lang::Place p);
    x10aux::ref<x10::lang::String> toString();
    x10_boolean equals(x10aux::ref<x10::lang::Any> that);
    x10_int hashCode();
    x10aux::ref<x10::lang::Iterator<x10_int> > iterator();
    x10aux::ref<x10::lang::String> typeName();
    x10_boolean _struct_equals(x10aux::ref<x10::lang::Any> other);
    x10_boolean _struct_equals(x10::lang::IntRange other) {
        
        //#line 32 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/lang/IntRange.x10": x10.ast.X10Return_c
        return (x10aux::struct_equals((*this)->FMGL(min), other->
                                                            FMGL(min))) &&
        (x10aux::struct_equals((*this)->FMGL(max), other->FMGL(max))) &&
        (x10aux::struct_equals((*this)->FMGL(zeroBased), other->FMGL(zeroBased)));
        
    }
    x10::lang::IntRange x10__lang__IntRange____x10__lang__IntRange__this(
      ) {
        
        //#line 17 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/lang/IntRange.x10": x10.ast.X10Return_c
        return (*this);
        
    }
    
    static void _serialize(x10::lang::IntRange this_, x10aux::serialization_buffer& buf);
    
    static x10::lang::IntRange _deserialize(x10aux::deserialization_buffer& buf) {
        x10::lang::IntRange this_;
        this_->_deserialize_body(buf);
        return this_;
    }
    
    void _deserialize_body(x10aux::deserialization_buffer& buf);
    
};

} } 
#endif // X10_LANG_INTRANGE_H

namespace x10 { namespace lang { 
class IntRange;
} } 

#ifndef X10_LANG_INTRANGE_H_NODEPS
#define X10_LANG_INTRANGE_H_NODEPS
#ifndef X10_LANG_INTRANGE_H_GENERICS
#define X10_LANG_INTRANGE_H_GENERICS
#endif // X10_LANG_INTRANGE_H_GENERICS
#endif // __X10_LANG_INTRANGE_H_NODEPS
