#ifndef __X10_UTIL_OPTION_H
#define __X10_UTIL_OPTION_H

#include <x10rt.h>


#define X10_LANG_ANY_H_NODEPS
#include <x10/lang/Any.h>
#undef X10_LANG_ANY_H_NODEPS
#define X10_LANG_ANY_H_NODEPS
#include <x10/lang/Any.h>
#undef X10_LANG_ANY_H_NODEPS
namespace x10 { namespace lang { 
class String;
} } 
namespace x10 { namespace lang { 
class IllegalArgumentException;
} } 
namespace x10 { namespace compiler { 
class Native;
} } 
namespace x10 { namespace compiler { 
class NonEscaping;
} } 
namespace x10 { namespace lang { 
class Int;
} } 
namespace x10 { namespace lang { 
class Boolean;
} } 
namespace x10 { namespace util { 

class Option   {
    public:
    RTT_H_DECLS_STRUCT
    
    x10::util::Option* operator->() { return this; }
    
    static x10aux::itable_entry _itables[2];
    
    x10aux::itable_entry* _getITables() { return _itables; }
    
    static x10::lang::Any::itable<x10::util::Option > _itable_0;
    
    static x10aux::itable_entry _iboxitables[2];
    
    x10aux::itable_entry* _getIBoxITables() { return _iboxitables; }
    
    static x10::util::Option _alloc(){x10::util::Option t; return t; }
    
    x10aux::ref<x10::lang::String> FMGL(short_);
    
    x10aux::ref<x10::lang::String> FMGL(long_);
    
    x10aux::ref<x10::lang::String> FMGL(description);
    
    void _constructor(x10aux::ref<x10::lang::String> s, x10aux::ref<x10::lang::String> l,
                      x10aux::ref<x10::lang::String> d);
    
    static x10::util::Option _make(x10aux::ref<x10::lang::String> s,
                                   x10aux::ref<x10::lang::String> l,
                                   x10aux::ref<x10::lang::String> d);
    
    x10aux::ref<x10::lang::String> toString() {
        
        //#line 32 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/util/Option.x10": x10.ast.X10Return_c
        return (*this)->FMGL(description);
        
    }
    x10aux::ref<x10::lang::String> typeName();
    x10_int hashCode();
    x10_boolean equals(x10aux::ref<x10::lang::Any> other);
    x10_boolean equals(x10::util::Option other) {
        
        //#line 18 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/util/Option.x10": x10.ast.X10Return_c
        return (x10aux::struct_equals((*this)->FMGL(short_), other->
                                                               FMGL(short_))) &&
        (x10aux::struct_equals((*this)->FMGL(long_), other->FMGL(long_))) &&
        (x10aux::struct_equals((*this)->FMGL(description), other->
                                                             FMGL(description)));
        
    }
    x10_boolean _struct_equals(x10aux::ref<x10::lang::Any> other);
    x10_boolean _struct_equals(x10::util::Option other) {
        
        //#line 18 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/util/Option.x10": x10.ast.X10Return_c
        return (x10aux::struct_equals((*this)->FMGL(short_), other->
                                                               FMGL(short_))) &&
        (x10aux::struct_equals((*this)->FMGL(long_), other->FMGL(long_))) &&
        (x10aux::struct_equals((*this)->FMGL(description), other->
                                                             FMGL(description)));
        
    }
    x10::util::Option x10__util__Option____x10__util__Option__this(
      ) {
        
        //#line 18 "/wrkdirs/usr/ports/lang/x10/work/x10.runtime/src-x10/x10/util/Option.x10": x10.ast.X10Return_c
        return (*this);
        
    }
    
    static void _serialize(x10::util::Option this_, x10aux::serialization_buffer& buf);
    
    static x10::util::Option _deserialize(x10aux::deserialization_buffer& buf) {
        x10::util::Option this_;
        this_->_deserialize_body(buf);
        return this_;
    }
    
    void _deserialize_body(x10aux::deserialization_buffer& buf);
    
};

} } 
#endif // X10_UTIL_OPTION_H

namespace x10 { namespace util { 
class Option;
} } 

#ifndef X10_UTIL_OPTION_H_NODEPS
#define X10_UTIL_OPTION_H_NODEPS
#ifndef X10_UTIL_OPTION_H_GENERICS
#define X10_UTIL_OPTION_H_GENERICS
#endif // X10_UTIL_OPTION_H_GENERICS
#endif // __X10_UTIL_OPTION_H_NODEPS
