#ifndef __X10_LANG_LONGRANGE_H
#define __X10_LANG_LONGRANGE_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_LONG_H_NODEPS
#include <x10/lang/Long.h>
#undef X10_LANG_LONG_H_NODEPS
#define X10_LANG_BOOLEAN_H_NODEPS
#include <x10/lang/Boolean.h>
#undef X10_LANG_BOOLEAN_H_NODEPS
namespace x10 { namespace lang { 
class Long;
} } 
namespace x10 { namespace lang { 
class Boolean;
} } 
namespace x10 { namespace lang { 
class String;
} } 
namespace x10 { namespace lang { 
class Int;
} } 
namespace x10 { namespace lang { 
template<class TPMGL(T)> class Iterator;
} } 
namespace x10 { namespace lang { 
class LongRange__LongRangeIt;
} } 
namespace x10 { namespace compiler { 
class Native;
} } 
namespace x10 { namespace compiler { 
class NonEscaping;
} } 
namespace x10 { namespace lang { 

class LongRange   {
    public:
    RTT_H_DECLS_STRUCT
    
    x10::lang::LongRange* operator->() { return this; }
    
    x10_long FMGL(min);
    
    x10_long 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::LongRange > _itable_0;
    
    static x10::lang::Iterable<x10_long>::itable<x10::lang::LongRange > _itable_1;
    
    static x10aux::itable_entry _iboxitables[3];
    
    x10aux::itable_entry* _getIBoxITables() { return _iboxitables; }
    
    static x10::lang::LongRange _alloc(){x10::lang::LongRange t; return t; }
    
    void _constructor(x10_long min, x10_long max) {
        
        //#line 39 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/lang/LongRange.x10": polyglot.ast.Empty_c
        ;
        
        //#line 40 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/lang/LongRange.x10": x10.ast.X10LocalDecl_c
        x10_boolean x = (x10aux::struct_equals(min, ((x10_long)0ll)));
        
        //#line 41 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/lang/LongRange.x10": x10.ast.AssignPropertyCall_c
        FMGL(min) = min;
        FMGL(max) = max;
        FMGL(zeroBased) = x;
        
    }
    static x10::lang::LongRange _make(x10_long min, x10_long max) {
        x10::lang::LongRange this_; 
        this_->_constructor(min, max);
        return this_;
    }
    
    x10aux::ref<x10::lang::String> toString();
    x10_boolean equals(x10aux::ref<x10::lang::Any> that);
    x10_int hashCode();
    x10aux::ref<x10::lang::Iterator<x10_long> > iterator();
    x10aux::ref<x10::lang::String> typeName();
    x10_boolean _struct_equals(x10aux::ref<x10::lang::Any> other);
    x10_boolean _struct_equals(x10::lang::LongRange other) {
        
        //#line 32 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/lang/LongRange.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::LongRange x10__lang__LongRange____x10__lang__LongRange__this(
      ) {
        
        //#line 17 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/lang/LongRange.x10": x10.ast.X10Return_c
        return (*this);
        
    }
    
    static void _serialize(x10::lang::LongRange this_, x10aux::serialization_buffer& buf);
    
    static x10::lang::LongRange _deserialize(x10aux::deserialization_buffer& buf) {
        x10::lang::LongRange this_;
        this_->_deserialize_body(buf);
        return this_;
    }
    
    void _deserialize_body(x10aux::deserialization_buffer& buf);
    
};

} } 
#endif // X10_LANG_LONGRANGE_H

namespace x10 { namespace lang { 
class LongRange;
} } 

#ifndef X10_LANG_LONGRANGE_H_NODEPS
#define X10_LANG_LONGRANGE_H_NODEPS
#ifndef X10_LANG_LONGRANGE_H_GENERICS
#define X10_LANG_LONGRANGE_H_GENERICS
#endif // X10_LANG_LONGRANGE_H_GENERICS
#endif // __X10_LANG_LONGRANGE_H_NODEPS
