# Copyright (c) 2023 Yuki Kimoto
# MIT License

class Native::ClassFile : pointer {
  version_from SPVM;

  allow Native::Compiler;
  
  use Native::Compiler;
  
  # Fields
  has compiler : Native::Compiler;
  
  # Class Methods
  private static method new_with_pointer : Native::ClassFile ($pointer : Address, $options : object[] = undef) {
    
    my $self = new Native::ClassFile;
    
    Fn->set_pointer($self, $pointer);
    
    return $self;
  }
  
  # Instance Methods
  native method get_class_name : string ();
  
  native method get_file : string ();
  
  native method set_file : void ($file : string);
  
  native method get_dir : string ();
  
  native method set_dir : void ($dir : string);
  
  native method get_rel_file : string ();
  
  native method set_rel_file : void ($rel_file : string);
  
  native method get_content : string ();
  
  native method set_content : void ($content : string);
  
  native method get_content_length : int ();
  
  native method set_content_length : void ($content_length : int);
  
}