[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob ./TODO include/vob/LinearPrimitives.hxx ...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] libvob ./TODO include/vob/LinearPrimitives.hxx ... |
Date: |
Mon, 10 Mar 2003 06:15:15 -0500 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Changes by: Tuomas J. Lukka <address@hidden> 03/03/10 06:15:13
Modified files:
. : TODO
include/vob : LinearPrimitives.hxx Primitives.hxx
include/vob/jni: Generate.hxx
src/jni : Gen.cxx
Log message:
Generated transformid code compiles
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/TODO.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/LinearPrimitives.hxx.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/Primitives.hxx.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/jni/Generate.hxx.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/src/jni/Gen.cxx.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: libvob/TODO
diff -u libvob/TODO:1.4 libvob/TODO:1.5
--- libvob/TODO:1.4 Mon Mar 10 06:04:29 2003
+++ libvob/TODO Mon Mar 10 06:15:12 2003
@@ -4,7 +4,8 @@
tjl:
- make tests and make them work
- bring back fonts
-
+ vegai:
+ - .cvsignores
0.1alpha2: Vital fixes for packages depending on this
tjl:
Index: libvob/include/vob/LinearPrimitives.hxx
diff -u libvob/include/vob/LinearPrimitives.hxx:1.6
libvob/include/vob/LinearPrimitives.hxx:1.7
--- libvob/include/vob/LinearPrimitives.hxx:1.6 Mon Mar 10 04:49:31 2003
+++ libvob/include/vob/LinearPrimitives.hxx Mon Mar 10 06:15:12 2003
@@ -33,6 +33,8 @@
#include <GL/gl.h>
+#include <vob/Primitives.hxx>
+
namespace Vob {
namespace Primitives {
Index: libvob/include/vob/Primitives.hxx
diff -u libvob/include/vob/Primitives.hxx:1.9
libvob/include/vob/Primitives.hxx:1.10
--- libvob/include/vob/Primitives.hxx:1.9 Mon Mar 10 05:35:32 2003
+++ libvob/include/vob/Primitives.hxx Mon Mar 10 06:15:13 2003
@@ -213,8 +213,6 @@
};
- using Vob::Templates::Int2Type;
-
/** A hierarchical transformation, which applies the
* template argument primitive transformation to the result
* of the parent transform.
Index: libvob/include/vob/jni/Generate.hxx
diff -u libvob/include/vob/jni/Generate.hxx:1.11
libvob/include/vob/jni/Generate.hxx:1.12
--- libvob/include/vob/jni/Generate.hxx:1.11 Mon Mar 10 05:35:32 2003
+++ libvob/include/vob/jni/Generate.hxx Mon Mar 10 06:15:13 2003
@@ -175,34 +175,39 @@
template<class Primitive> struct TransJNIGenerator {
int ind;
+ Primitive typer;
+
+ int nParents(Primitives::DependentPrimitiveTransform &t) {
+ return Primitive::NDepends;
+ }
+ template<class T> int nParents(T &t) { return 1; }
+
+ int nParams(Primitives::ParametrizedPrimitiveTransform &t) {
+ return Primitive::NParams;
+ }
+ template<class T> int nParams(T &t) { return 0; }
+
TransJNIGenerator(std::string className, std::string methodName) {
ind = index++;
VOB_TRANSJAVASTREAM << "public int "<<methodName
<<"(int d0 ";
- for(int i=1; i<nParents(Primitive()); i++) {
+ for(int i=1; i<nParents(typer); i++) {
VOB_TRANSJAVASTREAM << ", int d"<<i<<" ";
}
- for(int i=0; i<nParams(Primitive()); i++) {
+ for(int i=0; i<nParams(typer); i++) {
VOB_TRANSJAVASTREAM << ", float p"<<i<<" ";
}
std::string passignCode = "";
- for(int i=0; i<nParams(Primitive()); i++) {
+ for(int i=0; i<nParams(typer); i++) {
passignCode += "floats[i+";
}
VOB_TRANSJAVASTREAM << ") {\n"
"int i = nfloats;";
- }
- int nParents(Primitives::DependentPrimitiveTransform &t) {
- return Primitive::NDepends;
- }
- template<class T> int nParents(T &t) { return 1; }
+ VOB_TRANSCSTREAM << " case "<<ind<<": \n"
+ << "\t\tTRANSTYPE("<<className<<");break;\n";
- int nParams(Primitives::ParametrizedPrimitiveTransform &t) {
- return Primitive::NParams;
}
- template<class T> int nParams(T &t) { return 0; }
-
};
}
Index: libvob/src/jni/Gen.cxx
diff -u libvob/src/jni/Gen.cxx:1.6 libvob/src/jni/Gen.cxx:1.7
--- libvob/src/jni/Gen.cxx:1.6 Sat Mar 8 14:45:47 2003
+++ libvob/src/jni/Gen.cxx Mon Mar 10 06:15:13 2003
@@ -32,9 +32,12 @@
std::ostringstream VOB_JNISTREAM;
std::ostringstream VOB_JAVASTREAM;
+std::ostringstream VOB_TRANSJAVASTREAM;
+std::ostringstream VOB_TRANSCSTREAM;
#include <vob/jni/Generate.hxx>
#include <vob/vobs/Trivial.hxx>
+#include <vob/LinearPrimitives.hxx>
int main() {
std::ifstream templ("src/jni/GLRen.template.java");
@@ -51,13 +54,24 @@
java << VOB_JAVASTREAM.str()<<"\n\n";
java << "}\n";
+ jni << "//COMPUTER GENERATED DO NOT EDIT\n";
jni << "#include <vob/jni/Types.hxx>\n";
jni << "#include <vob/jni/Define.hxx>\n";
jni << "#include <vob/vobs/Trivial.hxx>\n";
+ jni << "#include <vob/LinearPrimitives.hxx>\n";
jni << "using namespace Vob::JNI;\n";
- jni << "namespace Vob { namespace Vobs { \n";
+ jni << "using namespace Vob::Primitives;\n";
+ jni << "namespace Vob { \n";
+ jni << "#define TRANSTYPE(x) return new HierarchicalTransform<x>()\n";
+ jni << "Transform *defaultTransformFactory(int id) {\n";
+ jni << " switch(id) {\n" << VOB_TRANSCSTREAM.str()<<"\n";
+ jni << " default: return 0;\n";
+ jni << " }}\n";
+ jni << "namespace Vobs { \n";
jni << "extern \"C\" { \n";
jni << VOB_JNISTREAM.str()<<"\n\n";
jni << "}}}\n";
return 0;
}
+
+
- [Gzz-commits] libvob ./TODO include/vob/LinearPrimitives.hxx ...,
Tuomas J. Lukka <=