;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; LUSH Lisp Universal Shell
;;;   Copyright (C) 2002 Leon Bottou, Yann Le Cun, AT&T Corp, NECI.
;;; Includes parts of TL3:
;;;   Copyright (C) 1987-1999 Leon Bottou and Neuristique.
;;; Includes selected parts of SN3.2:
;;;   Copyright (C) 1991-2001 AT&T Corp.
;;;
;;; Includes information derived from the GSL (Gnu Scientific Library)
;;;   header files which are copyrighted and distributed under the GPL
;;;   by their respective authors.
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(libload "torch/torch-config")
(libload "torch/level2")


#? *** level3

;; dummy function that adds torch header files in C file
(eval `(de dummy_level3_extra () ,torch-cpheader-cmd ()))


#? * torch_diskIdx2Ubytedataset
;;.TYPE CLASS
#? (new torch_diskIdx2Ubytedataset <flag> <filename> <n_inputs_> <n_targets_> <one_file_is_one_sequence> <max_load> <binary_mode>>
#? (new torch_diskIdx2Ubytedataset <flag> <filenames> <n_files_> <n_inputs_> <n_targets_> <one_file_is_one_sequence> <max_load> <binary_mode>>
#? (new torch_diskIdx2Ubytedataset <flag> <input_filenames> <target_filenames> <n_files_> <max_load> <binary_mode>>
#? (==> <torch_diskIdx2Ubytedataset> -destructor)


;; ********************************************************





;;class DiskIdx2UbyteDataSet : public DiskDataSet
(defclass  torch_DiskIdx2UbyteDataSet   torch_DiskDataSet)

(defmethod  torch_DiskIdx2UbyteDataSet  torch_DiskIdx2UbyteDataSet ( flag filename  n_inputs_  n_targets_  one_file_is_one_sequence  max_load  binary_mode )
  (cpheader "#include <torch/DiskIdx2UbyteDataSet.h>")
  ((-bool-) flag)
  
  ((-str-) filename)  
  ((-int-) n_inputs_)  
  ((-int-) n_targets_)  
  ((-bool-) one_file_is_one_sequence)  
  ((-int-) max_load)  
  ((-bool-) binary_mode)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::DiskIdx2UbyteDataSet((const char *)$filename->data  ,$n_inputs_  ,$n_targets_  ,$one_file_is_one_sequence  ,$max_load  ,$binary_mode); 
     }
     else
            $shell_flag = true; 
  #} 
  ())

;; (defmethod  torch_DiskIdx2UbyteDataSet  torch_DiskIdx2UbyteDataSet ( flag filenames  n_files_  n_inputs_  n_targets_  one_file_is_one_sequence  max_load  binary_mode )
;;   ((-bool-) flag)
;;   
;;   ((-gptr- "char **") filenames)  
;;   ((-int-) n_files_)  
;;   ((-int-) n_inputs_)  
;;   ((-int-) n_targets_)  
;;   ((-bool-) one_file_is_one_sequence)  
;;   ((-int-) max_load)  
;;   ((-bool-) binary_mode)  
;;   #{ if($flag == 0) {
;;             $shell_flag = 0;
;;             $p = new Torch::DiskIdx2UbyteDataSet($filenames  ,$n_files_  ,$n_inputs_  ,$n_targets_  ,$one_file_is_one_sequence  ,$max_load  ,$binary_mode); 
;;      }
;;   #} 
;;   ())
;; 
;; (defmethod  torch_DiskIdx2UbyteDataSet  torch_DiskIdx2UbyteDataSet ( flag input_filenames  target_filenames  n_files_  max_load  binary_mode )
;;   ((-bool-) flag)
;;   
;;   ((-gptr- "char **") input_filenames)  
;;   ((-gptr- "char **") target_filenames)  
;;   ((-int-) n_files_)  
;;   ((-int-) max_load)  
;;   ((-bool-) binary_mode)  
;;   #{ if($flag == 0) {
;;             $shell_flag = 0;
;;             $p = new Torch::DiskIdx2UbyteDataSet($input_filenames  ,$target_filenames  ,$n_files_  ,$max_load  ,$binary_mode); 
;;      }
;;   #} 
;;   ())

(defmethod  torch_DiskIdx2UbyteDataSet  -destructor  ()
  
  #{ if ( $shell_flag == false )  {
             delete  ((Torch::DiskIdx2UbyteDataSet *)$p);
             $p = NULL;
             $shell_flag = true; 
     }
  #} 
  ())








;; ********************************************************

(dhc-make-with-c++ () (list torch-libtorch) 
  dummy_level3_extra
;; overloaded constructor: torch_diskIdx2Ubytedataset  torch_diskIdx2Ubytedataset
  (torch_diskIdx2Ubytedataset  -destructor   torch_diskIdx2Ubytedataset)
)
