# Copyright (c) 2023 Yuki Kimoto
# MIT License

class Native::Arg : pointer {
  version_from SPVM;

  allow Native::Method;
  
  use Native::BasicType;
  
  # Fields
  has runtime : Native::Runtime;
  
  has ref_method : Native::Method;
  
  # Class Method
  private static method new_with_pointer : Native::Arg ($pointer : Address, $options : object[] = undef) {
    
    my $self = new Native::Arg;
    
    Fn->set_pointer($self, $pointer);
    
    return $self;
  }
  
  # Instance Methods
  native method get_index : int ();
  
  native method get_basic_type : Native::BasicType ();
  
  native method get_type_dimension : int ();
  
  native method get_type_flag : int ();
  
  native method is_optional : int ();
  
  native method get_default_value_byte : byte ();
  
  native method get_default_value_short : short ();
  
  native method get_default_value_int : int ();
  
  native method get_default_value_long : long ();
  
  native method get_default_value_float : float ();
  
  native method get_default_value_double : double ();
  
  native method get_default_value_object : object ();
}
