[Gridflow-cvs] [svn] commit: r5545 - in /trunk: doc/flow_classes/#cast-help.pd src/classes1.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Mon Apr 26 19:29:54 EDT 2010


Author: pboivin
Date: Mon Apr 26 19:29:54 2010
New Revision: 5545

Log:
rename attribute 'nt' to 'cast'

Modified:
    trunk/doc/flow_classes/#cast-help.pd
    trunk/src/classes1.cxx

Modified: trunk/doc/flow_classes/#cast-help.pd
==============================================================================
--- trunk/doc/flow_classes/#cast-help.pd (original)
+++ trunk/doc/flow_classes/#cast-help.pd Mon Apr 26 19:29:54 2010
@@ -1,51 +1,60 @@
-#N canvas 646 0 632 564 10;
-#X obj 14 219 #print;
-#X obj 14 199 #cast float64;
-#X obj 269 218 #print;
-#X obj 126 218 #print;
-#X obj 269 198 #cast uint8;
-#X obj 126 198 #cast int32;
-#X floatatom 14 181 5 0 0 0 - - -;
-#X msg 126 177 9.8764 9 -32 0.3;
-#X obj 269 158 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
+#N canvas 629 22 632 642 10;
+#X obj 24 220 #print;
+#X obj 24 199 #cast float64;
+#X obj 279 219 #print;
+#X obj 136 219 #print;
+#X obj 279 198 #cast uint8;
+#X obj 136 198 #cast int32;
+#X floatatom 24 158 5 0 0 0 - - -;
+#X msg 136 177 9.8764 9 -32 0.3;
+#X obj 279 158 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
 -1;
-#X obj 306 79 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
+#X obj 316 79 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
 -262144 -1 -1 2.1416 256;
-#X obj 356 96 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
+#X obj 366 96 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
 -262144 -1 -1 45 256;
-#X obj 269 177 #store;
-#X obj 306 133 #pack 3 float32;
-#X obj 14 161 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
+#X obj 279 177 #store;
+#X obj 316 133 #pack 3 float32;
+#X obj 24 138 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
 -1;
-#X obj 126 157 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
+#X obj 136 157 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
 -1;
-#X text 12 26 Changes an entity of one data type into another. Returns
+#X text 22 26 Changes an entity of one data type into another. Returns
 a grid of the same dimensions containing all the same values after
 type conversion. While casting to a smaller type \, overflowing values
 will be truncated.;
-#X obj 406 113 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
+#X obj 416 113 nbx 8 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
 -262144 -1 -1 45 256;
 #X text 232 358 Any grid;
-#X obj 14 420 doc_oo 0;
+#X obj 14 490 doc_oo 0;
 #X obj 14 358 doc_ii 0;
 #X obj 14 283 doc_cc 0;
-#X text 232 420 Produces a grid of the same dimensions containing all
+#X text 232 490 Produces a grid of the same dimensions containing all
 the same values after type conversion.;
-#X text 232 455 conversion from float truncates fractional part (rounds
-towards zero);
-#X text 232 490 conversion to an int type may wrap (same as some #
-& or some # %);
 #X text 232 283 Number types are: uint8 \, int16 \, int32 \, int64
 \, float32 \, float64. see doc/numtype.pd for more info.;
-#X obj 306 154 #redim (2 2);
+#X obj 316 154 #redim (2 2);
 #X obj 0 0 doc_h;
-#X obj 0 535 doc_f;
+#X obj 0 625 doc_f;
 #X obj 3 253 doc_c 1;
 #X obj 3 328 doc_i 1;
-#X obj 3 390 doc_o 1;
+#X obj 3 460 doc_o 1;
 #X obj 97 283 doc_m c0 symbol/numbertype;
 #X obj 97 358 doc_m i0 grid;
-#X obj 97 420 doc_m o0 grid;
+#X obj 97 490 doc_m o0 grid;
+#X obj 97 380 doc_m i0 cast;
+#X text 232 525 Conversion from float truncates fractional part (rounds
+towards zero);
+#X text 232 560 Conversion to an int type may wrap (same as some #
+& or some # %);
+#X text 232 380 \$1=number_type;
+#X text 232 402 Changes the number type dynamically;
+#X obj 3 605 doc_also;
+#X obj 232 424 doc_link numtype 1;
+#X obj 103 605 #import;
+#X obj 187 605 #type;
+#X obj 157 605 #in;
+#X msg 32 177 cast uint8;
 #X connect 1 0 0 0;
 #X connect 4 0 2 0;
 #X connect 5 0 3 0;
@@ -55,13 +64,20 @@
 #X connect 9 0 12 0;
 #X connect 10 0 12 1;
 #X connect 11 0 4 0;
-#X connect 12 0 25 0;
+#X connect 12 0 23 0;
 #X connect 13 0 6 0;
 #X connect 14 0 7 0;
 #X connect 16 0 12 2;
-#X connect 25 0 11 1;
-#X connect 31 1 24 0;
-#X connect 32 1 17 0;
-#X connect 33 1 21 0;
-#X connect 33 1 22 0;
-#X connect 33 1 23 0;
+#X connect 23 0 11 1;
+#X connect 29 1 22 0;
+#X connect 30 1 17 0;
+#X connect 31 1 21 0;
+#X connect 31 1 33 0;
+#X connect 31 1 34 0;
+#X connect 32 1 36 0;
+#X connect 32 1 35 0;
+#X connect 32 1 38 0;
+#X connect 37 1 39 0;
+#X connect 37 1 41 0;
+#X connect 37 1 40 0;
+#X connect 42 0 1 0;

Modified: trunk/src/classes1.cxx
==============================================================================
--- trunk/src/classes1.cxx (original)
+++ trunk/src/classes1.cxx Mon Apr 26 19:29:54 2010
@@ -71,12 +71,12 @@
 
 //****************************************************************
 \class GridCast : FObject {
-	\attr NumberTypeE nt;
-	\constructor (NumberTypeE nt) {this->nt = nt;}
-	\grin 0
-};
-GRID_INLET(0) {
-	out = new GridOutlet(this,0,in->dim,nt);
+	\attr NumberTypeE cast;
+	\constructor (NumberTypeE nt) {this->cast = nt;}
+	\grin 0
+};
+GRID_INLET(0) {
+	out = new GridOutlet(this,0,in->dim,cast);
 } GRID_FLOW {
 	out->send(n,data);
 } GRID_END



More information about the Gridflow-cvs mailing list