;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; 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/level1")


#? *** level2_extra

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


#? * torch_ioIdx2Ubyte
;;.TYPE CLASS
#? (==> <torch_ioIdx2Ubyte> get_one_file_is_one_sequence)
#? (==> <torch_ioIdx2Ubyte> set_one_file_is_one_sequence <s>)
#? (==> <torch_ioIdx2Ubyte> get_n_total_frames)
#? (==> <torch_ioIdx2Ubyte> set_n_total_frames <s>)
#? (==> <torch_ioIdx2Ubyte> get_filename)
#? (==> <torch_ioIdx2Ubyte> set_filename <s>)
#? (==> <torch_ioIdx2Ubyte> get_max_load)
#? (==> <torch_ioIdx2Ubyte> set_max_load <s>)
#? (==> <torch_ioIdx2Ubyte> get_is_sequential)
#? (==> <torch_ioIdx2Ubyte> set_is_sequential <s>)
#? (new torch_ioIdx2Ubyte <flag> <filename_> <one_file_is_one_sequence_> <max_load_> <is_sequential>>
#? (==> <torch_ioIdx2Ubyte> savesequence <file> <sequence>)
#? (==> <torch_ioIdx2Ubyte> getsequence <s> <sequence>)
#? (==> <torch_ioIdx2Ubyte> getnumberofframes <s>)
#? (==> <torch_ioIdx2Ubyte> gettotalnumberofframes)
#? (==> <torch_ioIdx2Ubyte> -destructor)




;;class IOIdx2Ubyte : public IOSequence
(defclass  torch_IOIdx2Ubyte   torch_IOSequence)

(defmethod  torch_IOIdx2Ubyte  get_one_file_is_one_sequence ()
  (cpheader "#include <torch/IOIdx2Ubyte.h>")
  (bool #{ ((Torch::IOIdx2Ubyte *)$p)->one_file_is_one_sequence   #} ))

(defmethod  torch_IOIdx2Ubyte  set_one_file_is_one_sequence (s )
  
  ((-bool-) s)  
  #{ ((Torch::IOIdx2Ubyte *)$p)->one_file_is_one_sequence = $s  ; #} 
  ())

(defmethod  torch_IOIdx2Ubyte  get_n_total_frames ()
  
  (int #{ ((Torch::IOIdx2Ubyte *)$p)->n_total_frames   #} ))

(defmethod  torch_IOIdx2Ubyte  set_n_total_frames (s )
  
  ((-int-) s)  
  #{ ((Torch::IOIdx2Ubyte *)$p)->n_total_frames = $s  ; #} 
  ())

(defmethod  torch_IOIdx2Ubyte  get_filename ()
  
  (gptr #{ ((Torch::IOIdx2Ubyte *)$p)->filename   #} ))        ;; char *  -> gptr

(defmethod  torch_IOIdx2Ubyte  set_filename (s )
  
  ((-gptr- "char *") s)  
  #{ ((Torch::IOIdx2Ubyte *)$p)->filename = $s  ; #} 
  ())

(defmethod  torch_IOIdx2Ubyte  get_max_load ()
  
  (int #{ ((Torch::IOIdx2Ubyte *)$p)->max_load   #} ))

(defmethod  torch_IOIdx2Ubyte  set_max_load (s )
  
  ((-int-) s)  
  #{ ((Torch::IOIdx2Ubyte *)$p)->max_load = $s  ; #} 
  ())

(defmethod  torch_IOIdx2Ubyte  get_is_sequential ()
  
  (bool #{ ((Torch::IOIdx2Ubyte *)$p)->is_sequential   #} ))

(defmethod  torch_IOIdx2Ubyte  set_is_sequential (s )
  
  ((-bool-) s)  
  #{ ((Torch::IOIdx2Ubyte *)$p)->is_sequential = $s  ; #} 
  ())

(defmethod  torch_IOIdx2Ubyte  torch_IOIdx2Ubyte ( flag filename_  one_file_is_one_sequence_  max_load_  is_sequential )
  ((-bool-) flag)
  
  ((-str-) filename_)  
  ((-bool-) one_file_is_one_sequence_)  
  ((-int-) max_load_)  
  ((-bool-) is_sequential)  
  #{ if($flag == false) {
            $shell_flag = false;
            $p = new Torch::IOIdx2Ubyte((const char *)$filename_->data  ,$one_file_is_one_sequence_  ,$max_load_  ,$is_sequential); 
     }
     else 
            $shell_flag = true; 
  #} 
  ())

(defmethod  torch_IOIdx2Ubyte  saveSequence (file  sequence )
  
  ((-gptr- "Torch::XFile *") file)  
  ((-gptr- "Torch::Sequence *") sequence)  
  #{ Torch::IOIdx2Ubyte::saveSequence($file  ,$sequence)  ; #} 
  ())

(defmethod  torch_IOIdx2Ubyte  getSequence (s  sequence )
  
  ((-int-) s)  
  ((-gptr- "Torch::Sequence *") sequence)  
  #{ ((Torch::IOIdx2Ubyte *)$p)->getSequence($s  ,$sequence)  ; #} 
  ())

(defmethod  torch_IOIdx2Ubyte  getNumberOfFrames (s )
  
  ((-int-) s)  
  (int #{ ((Torch::IOIdx2Ubyte *)$p)->getNumberOfFrames($s)  #} ))

(defmethod  torch_IOIdx2Ubyte  getTotalNumberOfFrames ()
  
  (int #{ ((Torch::IOIdx2Ubyte *)$p)->getTotalNumberOfFrames()  #} ))

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




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

(dhc-make-with-c++ () (list torch-libtorch) 
  dummy_level2_extra
  (torch_ioIdx2Ubyte  -destructor  gettotalnumberofframes  getnumberofframes  getsequence  savesequence  torch_ioIdx2Ubyte  set_is_sequential  get_is_sequential  set_max_load  get_max_load  set_filename  get_filename  set_n_total_frames  get_n_total_frames  set_one_file_is_one_sequence  get_one_file_is_one_sequence)
)
