/[libvob]/libvob/include/vob/jni/Generate.hxx
ViewVC logotype

Diff of /libvob/include/vob/jni/Generate.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by tjl, Mon Mar 10 14:26:18 2003 UTC revision 1.14 by tjl, Mon Mar 10 16:02:05 2003 UTC
# Line 41  Generate.hxx Line 41  Generate.hxx
41  #ifndef VOB_JNI_GENERATE_HXX  #ifndef VOB_JNI_GENERATE_HXX
42  #define VOB_JNI_GENERATE_HXX  #define VOB_JNI_GENERATE_HXX
43    
44    #include <string>
45    #include <cctype>
46    #include <iostream>
47    
48  #include <boost/preprocessor/repetition/enum_binary_params.hpp>  #include <boost/preprocessor/repetition/enum_binary_params.hpp>
49  #include <boost/preprocessor/repetition/enum_params.hpp>  #include <boost/preprocessor/repetition/enum_params.hpp>
50  #include <boost/preprocessor/repetition/enum_shifted_params.hpp>  #include <boost/preprocessor/repetition/enum_shifted_params.hpp>
51  #include <boost/preprocessor/iteration/local.hpp>  #include <boost/preprocessor/iteration/local.hpp>
 #include <string>  
 #include <iostream>  
52    
53  #include <vob/Primitives.hxx>  #include <vob/Primitives.hxx>
54  #include <vob/Transform.hxx>  #include <vob/Transform.hxx>
# Line 175  namespace JNI { Line 177  namespace JNI {
177    
178      template<class Primitive> struct TransJNIGenerator {      template<class Primitive> struct TransJNIGenerator {
179          int ind;          int ind;
180          Primitives::HierarchicalTransform<Primitive> hier;          Primitives::PrimitiveHierarchicalTransform<Primitive> hier;
181    
182          TransJNIGenerator(std::string className, std::string methodName) {          TransJNIGenerator(std::string className, std::string methodName) {
183              ind = index++;              ind = index++;
# Line 216  namespace JNI { Line 218  namespace JNI {
218              VOB_TRANSCSTREAM << " case "<<ind<<": \n"              VOB_TRANSCSTREAM << " case "<<ind<<": \n"
219                      << "\t\tTRANSTYPE("<<className<<");break;\n";                      << "\t\tTRANSTYPE("<<className<<");break;\n";
220    
221    
222                if(hier.getNParams() > 0) {
223                    std::string n = methodName;
224                    n[0] = std::toupper(n[0]);
225                    VOB_TRANSJAVASTREAM << "public void set"<<n
226                            <<"Params(int ind";
227                    for(int i=0; i<hier.getNParams(); i++)
228                        VOB_TRANSJAVASTREAM << ", float p"<<i;
229                    VOB_TRANSJAVASTREAM<<") {\n";
230                    VOB_TRANSJAVASTREAM<<"int i = inds[ind+"<<
231                            (hier.getNDepends()+1)<<"];";
232                    VOB_TRANSJAVASTREAM << passignCode.str() << "}\n";
233                }
234          }          }
235      };      };
236    

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26