NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
html.cpp
Go to the documentation of this file.
1 /*
2  * nvbio
3  * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of the NVIDIA CORPORATION nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #include <nvbio/basic/html.h>
29 #include <stdarg.h>
30 #include <string.h>
31 
32 namespace nvbio {
33 namespace html {
34 
35 const char* style()
36 {
37  return
38 /*
39 stats th also goes with:
40 
41 background-color:#82A416;
42 color:#000000;
43 border:1px solid #729404;
44 */
45 "body\n\
46 {\n\
47 background-color:#252525;\n\
48 }\n\
49 span statnum\n\
50 {\n\
51  float:left;\n\
52  width:60px;\n\
53 }\n\
54 span statbar\n\
55 {\n\
56  background-color:#AADD44;\n\
57  color:#AADD44;\n\
58  solid:#AADD44;\n\
59  border:1px solid #555555;\n\
60  float:left;\n\
61  display:inline-block;\n\
62  margin-left:5px;\n\
63 }\n\
64 table.params\n\
65 {\n\
66 font-family:\"Calibri\", \"Courier New\", \"Trebuchet MS\", Arial, Helvetica, sans-serif;\n\
67 width:84%;\n\
68 margin-left:8%;\n\
69 margin-right:8%;\n\
70 border-collapse:collapse;\n\
71 }\n\
72 table.params caption\n\
73 {\n\
74 font-family:\"Courier New\", \"Trebuchet MS\", Arial, Helvetica, sans-serif;\n\
75 font-size:1.0em;\n\
76 color:#FFFFFF;\n\
77 background-color:#000000;\n\
78 padding:4px 7px 4px 7px;\n\
79 }\n\
80 table.params tr a { color:#FFFFFF; }\n\
81 table.params tr a:hover { color:#99DD66; }\n\
82 table.params th\n\
83 {\n\
84 width:50%;\n\
85 font-size:0.9em;\n\
86 text-align:left;\n\
87 padding-top:5px;\n\
88 padding-bottom:4px;\n\
89 background-color:#AAAAAA;\n\
90 color:#FFFFFF;\n\
91 border:1px solid #999999;\n\
92 }\n\
93 table.params td, th\n\
94 {\n\
95 font-size:0.8em;\n\
96 border:1px solid #CBCBCB;\n\
97 padding:3px 7px 2px 7px;\n\
98 background-color:#EBEBEB;\n\
99 }\n\
100 table.params tr.alt td\n\
101 {\n\
102 color:#000000;\n\
103 background-color:#DADADA;\n\
104 }\n\
105 table.stats\n\
106 {\n\
107 font-family:\"Calibri\", \"Courier New\", \"Trebuchet MS\", Arial, Helvetica, sans-serif;\n\
108 width:84%;\n\
109 margin-left:8%;\n\
110 margin-right:8%;\n\
111 border-collapse:collapse;\n\
112 }\n\
113 table.stats tr a { color:#DDDDFF; }\n\
114 table.stats tr a:hover { color:#99DD66; }\n\
115 table.stats td, th\n\
116 {\n\
117 font-size:0.8em;\n\
118 border:1px solid #BBBBBB;\n\
119 padding:3px 7px 2px 7px;\n\
120 background-color:#DDDDDD;\n\
121 }\n\
122 table.stats td.small\n\
123 {\n\
124 font-size:0.7em;\n\
125 border:1px solid #BBBBBB;\n\
126 padding:3px 7px 2px 7px;\n\
127 }\n\
128 table.stats td.smallpink\n\
129 {\n\
130 font-size:0.7em;\n\
131 padding:3px 7px 2px 7px;\n\
132 color:#000000;\n\
133 background-color:#FFE5D5;\n\
134 border:1px solid #BB9988;\n\
135 }\n\
136 table.stats th\n\
137 {\n\
138 width:2%;\n\
139 font-size:0.9em;\n\
140 text-align:left;\n\
141 padding-top:5px;\n\
142 padding-bottom:4px;\n\
143 background-color:#444444;\n\
144 color:#DDDDDD;\n\
145 border:1px solid #383838;\n\
146 }\n\
147 table.stats caption\n\
148 {\n\
149 font-family:\"Courier New\", \"Trebuchet MS\", Arial, Helvetica, sans-serif;\n\
150 font-size:1.0em;\n\
151 color:#AADD44;\n\
152 height:24px;\n\
153 background-color:#000000;\n\
154 padding:12px 7px 4px 7px;\n\
155 }\n\
156 table.stats tr.alt td\n\
157 {\n\
158 color:#000000;\n\
159 background-color:#EAEAEA;\n\
160 }\n\
161 table.stats tr.alt td.small\n\
162 {\n\
163 font-size:0.7em;\n\
164 color:#000000;\n\
165 background-color:#EAEAEA;\n\
166 }\n\
167 table.stats tr.alt td.smallpink\n\
168 {\n\
169 font-size:0.7em;\n\
170 color:#000000;\n\
171 background-color:#FFD7C3;\n\
172 border:1px solid #BB9988;\n\
173 }\n\
174 table.stats tr.alt td.red\n\
175 {\n\
176 color:#000000;\n\
177 background-color:#FFAABB;\n\
178 border:1px solid #BB6655;\n\
179 }\n\
180 table.stats tr.alt td.green\n\
181 {\n\
182 color:#000000;\n\
183 background-color:#D6FF93;\n\
184 border:1px solid #A6CC83;\n\
185 }\n\
186 table.stats tr.alt td.pink\n\
187 {\n\
188 color:#000000;\n\
189 background-color:#FFD7C3;\n\
190 border:1px solid #BB9988;\n\
191 }\n\
192 table.stats tr.alt td.azure\n\
193 {\n\
194 color:#000000;\n\
195 background-color:#99DDFF;\n\
196 }\n\
197 table.stats tr.alt td.gray\n\
198 {\n\
199 color:#000000;\n\
200 background-color:#BBBBBB;\n\
201 border:1px solid #999999;\n\
202 }\n\
203 table.stats tr.alt td.orange\n\
204 {\n\
205 color:#000000;\n\
206 background-color:#FFBB55;\n\
207 border:1px solid #DD9911;\n\
208 }\n\
209 table.stats tr.alt td.yellow\n\
210 {\n\
211 color:#000000;\n\
212 background-color:#FFFF77;\n\
213 border:1px solid #CCCC33;\n\
214 }\n\
215 table.stats td.red\n\
216 {\n\
217 color:#000000;\n\
218 background-color:#FF9988;\n\
219 border:1px solid #BB6655;\n\
220 }\n\
221 table.stats td.green\n\
222 {\n\
223 color:#000000;\n\
224 background-color:#DCFF9A;\n\
225 border:1px solid #AACC89;\n\
226 }\n\
227 table.stats td.pink\n\
228 {\n\
229 color:#000000;\n\
230 background-color:#FFE5D5;\n\
231 border:1px solid #BB9988;\n\
232 }\n\
233 table.stats td.azure\n\
234 {\n\
235 color:#000000;\n\
236 background-color:#99DDFF;\n\
237 }\n\
238 table.stats tr td.gray\n\
239 {\n\
240 color:#000000;\n\
241 background-color:#BBBBBB;\n\
242 border:1px solid #999999;\n\
243 }\n\
244 table.stats td.orange\n\
245 {\n\
246 color:#000000;\n\
247 background-color:#FFBB66;\n\
248 border:1px solid #DD9911;\n\
249 }\n\
250 table.stats td.yellow\n\
251 {\n\
252 color:#000000;\n\
253 background-color:#FFFF99;\n\
254 border:1px solid #CCCC33;\n\
255 }";
256 #if 0
257  // params
258  "table.params\n"
259  "{\n"
260  "font-family:\"Trebuchet MS\", Arial, Helvetica, sans-serif;\n"
261  "width:84%;\n"
262  "margin-left:8%;\n"
263  "margin-right:8%;\n"
264  "border-collapse:collapse;\n"
265  "}\n"
266  "table.params caption\n"
267  "{\n"
268  "font-family:\"Trebuchet MS\", Arial, Helvetica, sans-serif;\n"
269  "font-size:1.1em;\n"
270  "color:#FFFFFF;\n"
271  "background-color:#555555;\n"
272  "padding:4px 7px 4px 7px;\n"
273  "}\n"
274  "table.params tr a\n"
275  "{\n"
276  "color:#FFFFFF;\n"
277  "}\n"
278  "table.params th\n"
279  "{\n"
280  "font-size:0.9em;\n"
281  "text-align:left;\n"
282  "padding-top:5px;\n"
283  "padding-bottom:4px;\n"
284  "background-color:#AAAAAA;\n"
285  "color:#FFFFFF;\n"
286  "border:1px solid #999999;\n"
287  "}\n"
288  "table.params td, th\n"
289  "{\n"
290  "font-size:0.8em;\n"
291  "border:1px solid #CBCBCB;\n"
292  "padding:3px 7px 2px 7px;\n"
293  "background-color:#EBEBEB;\n"
294  "}\n"
295  "table.params tr.alt td\n"
296  "{\n"
297  "color:#000000;\n"
298  "background-color:#DADADA;\n"
299  "}\n"
300  // stats
301  "table.stats\n"
302  "{\n"
303  "font-family:\"Trebuchet MS\", Arial, Helvetica, sans-serif;\n"
304  "width:84%;\n"
305  "margin-left:8%;\n"
306  "margin-right:8%;\n"
307  "border-collapse:collapse;\n"
308  "}\n"
309  "table.stats tr a\n"
310  "{\n"
311  "color:#FFFFFF;\n"
312  "}\n"
313  "table.stats td, th\n"
314  "{\n"
315  "font-size:0.8em;\n"
316  "border:1px solid #98bf21;\n"
317  "padding:3px 7px 2px 7px;\n"
318  "}\n"
319  "table.stats td.small\n"
320  "{\n"
321  "font-size:0.7em;\n"
322  "border:1px solid #98bf21;\n"
323  "padding:3px 7px 2px 7px;\n"
324  "}\n"
325  "table.stats td.smallpink\n"
326  "{\n"
327  "font-size:0.7em;\n"
328  "padding:3px 7px 2px 7px;\n"
329  "color:#000000;\n"
330  "background-color:#FFCCBB;\n"
331  "border:1px solid #BB9988;\n"
332  "}\n"
333  "table.stats th\n"
334  "{\n"
335  "font-size:0.9em;\n"
336  "text-align:left;\n"
337  "padding-top:5px;\n"
338  "padding-bottom:4px;\n"
339  "background-color:#A7C942;\n"
340  "color:#ffffff;\n"
341  "}\n"
342  "table.stats caption\n"
343  "{\n"
344  "font-family:\"Trebuchet MS\", Arial, Helvetica, sans-serif;\n"
345  "font-size:1.1em;\n"
346  "color:#FFFFFF;\n"
347  "background-color:#6688FF;\n"
348  "padding:4px 7px 4px 7px;\n"
349  "}\n"
350  "table.stats tr.alt td\n"
351  "{\n"
352  "color:#000000;\n"
353  "background-color:#EAF2D3;\n"
354  "}\n"
355  "table.stats tr.alt td.small\n"
356  "{\n"
357  "font-size:0.7em;\n"
358  "color:#000000;\n"
359  "background-color:#EAF2D3;\n"
360  "}\n"
361  "table.stats tr.alt td.smallpink\n"
362  "{\n"
363  "font-size:0.7em;\n"
364  "color:#000000;\n"
365  "background-color:#FFBBAA;\n"
366  "border:1px solid #BB9988;\n"
367  "}\n"
368  "table.stats tr.alt td.red\n"
369  "{\n"
370  "color:#000000;\n"
371  "background-color:#FFAA99;\n"
372  "border:1px solid #BB6655;\n"
373  "}\n"
374  "table.stats tr.alt td.pink\n"
375  "{\n"
376  "color:#000000;\n"
377  "background-color:#FFBBAA;\n"
378  "border:1px solid #BB9988;\n"
379  "}\n"
380  "table.stats tr.alt td.azure\n"
381  "{\n"
382  "color:#000000;\n"
383  "background-color:#99DDFF;\n"
384  "}\n"
385  "table.stats tr.alt td.gray\n"
386  "{\n"
387  "color:#000000;\n"
388  "background-color:#BBBBBB;\n"
389  "border:1px solid #999999;\n"
390  "}\n"
391  "table.stats tr.alt td.orange\n"
392  "{\n"
393  "color:#000000;\n"
394  "background-color:#FFBB33;\n"
395  "}\n"
396  "table.stats tr.alt td.yellow\n"
397  "{\n"
398  "color:#000000;\n"
399  "background-color:#FFFF44;\n"
400  "}\n"
401  "table.stats td.red\n"
402  "{\n"
403  "color:#000000;\n"
404  "background-color:#FF9988;\n"
405  "border:1px solid #BB6655;\n"
406  "}\n"
407  "table.stats td.pink\n"
408  "{\n"
409  "color:#000000;\n"
410  "background-color:#FFCCBB;\n"
411  "border:1px solid #BB9988;\n"
412  "}\n"
413  "table.stats td.azure\n"
414  "{\n"
415  "color:#000000;\n"
416  "background-color:#99DDFF;\n"
417  "}\n"
418  "table.stats tr td.gray\n"
419  "{\n"
420  "color:#000000;\n"
421  "background-color:#BBBBBB;\n"
422  "border:1px solid #999999;\n"
423  "}\n"
424  "table.stats td.orange\n"
425  "{\n"
426  "color:#000000;\n"
427  "background-color:#FFBB33;\n"
428  "}\n"
429  "table.stats td.yellow\n"
430  "{\n"
431  "color:#000000;\n"
432  "background-color:#FFFF44;\n"
433  "}";
434 #endif
435 }
436 
437 void html_begin(FILE* output)
438 {
439  fprintf( output, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n" );
440  fprintf( output, "<html lang=\"en\">\n" );
441 }
442 void html_end(FILE* output)
443 {
444  fprintf( output, "</html>\n" );
445 }
446 void header(FILE* output, const char* title, const char* css, const char* meta)
447 {
448  fprintf( output, "<head>\n" );
449  fprintf( output, "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n" );
450  if (meta != NULL)
451  fprintf( output, meta );
452  fprintf( output, "<title>%s</title>\n", title );
453  const char* css_end = css + strlen( css )-4;
454  if (strcmp( css_end, ".css" ) == 0)
455  fprintf( output, "<link rel=\"stylesheet\" href=\"%s\" type=\"text/css\">\n", css );
456  else
457  fprintf( output, "<style>\n%s\n</style>\n", css );
458  fprintf( output, "</head>\n ");
459 }
460 void body_begin(FILE* output)
461 {
462  fprintf( output, "<body>\n" );
463 }
464 void body_end(FILE* output)
465 {
466  fprintf( output, "</body>\n" );
467 }
468 void table_begin(FILE* output, const char* id, const char* cls, const char* caption)
469 {
470  fprintf( output, "<table id = \"%s\" class = \"%s\">\n", id, cls );
471  fprintf( output, "<caption>%s</caption>\n", caption );
472 }
473 void table_end(FILE* output)
474 {
475  fprintf( output, "</table>\n" );
476 }
477 void tr_begin(FILE* output, ...)
478 {
479  va_list args;
480  va_start( args, output );
481 
482  fprintf( output, "<tr" );
483  while (1)
484  {
485  const char* key = va_arg( args, const char* );
486  if (key == NULL)
487  break;
488 
489  const char* value = va_arg( args, const char* );
490 
491  fprintf( output, " %s = \"%s\"", key, value );
492  }
493  fprintf( output, ">\n" );
494 
495  va_end(args);
496 }
497 void tr_end(FILE* output)
498 {
499  fprintf( output, "</tr>\n" );
500 }
501 void th(FILE* output, const char* name, ...)
502 {
503  va_list args;
504  va_start( args, name );
505 
506  fprintf( output, "<th" );
507  while (1)
508  {
509  const char* key = va_arg( args, const char* );
510  if (key == NULL)
511  break;
512 
513  const char* value = va_arg( args, const char* );
514 
515  fprintf( output, " %s = \"%s\"", key, value );
516  }
517  fprintf( output, ">" );
518  fprintf( output, "%s</th>\n", name );
519 
520  va_end(args);
521 }
522 void td(FILE* output, const char* name, ...)
523 {
524  va_list args;
525  va_start( args, name );
526 
527  fprintf( output, "<td" );
528  while (1)
529  {
530  const char* key = va_arg( args, const char* );
531  if (key == NULL)
532  break;
533 
534  const char* value = va_arg( args, const char* );
535 
536  fprintf( output, " %s = \"%s\"", key, value );
537  }
538  fprintf( output, ">" );
539  fprintf( output, "%s</td>\n", name );
540 
541  va_end(args);
542 }
543 void vtr_begin(FILE* output, va_list args)
544 {
545  fprintf( output, "<tr" );
546  while (1)
547  {
548  const char* key = va_arg( args, const char* );
549  if (key == NULL)
550  break;
551 
552  const char* value = va_arg( args, const char* );
553 
554  fprintf( output, " %s = \"%s\"", key, value );
555  }
556  fprintf( output, ">\n" );
557 }
558 void vth(FILE* output, const char* name, va_list args)
559 {
560  fprintf( output, "<th" );
561  while (1)
562  {
563  const char* key = va_arg( args, const char* );
564  if (key == NULL)
565  break;
566 
567  const char* value = va_arg( args, const char* );
568 
569  fprintf( output, " %s = \"%s\"", key, value );
570  }
571  fprintf( output, ">" );
572  fprintf( output, "%s</th>\n", name );
573 }
574 void vtd(FILE* output, const char* name, va_list args)
575 {
576  fprintf( output, "<td" );
577  while (1)
578  {
579  const char* key = va_arg( args, const char* );
580  if (key == NULL)
581  break;
582 
583  const char* value = va_arg( args, const char* );
584 
585  fprintf( output, " %s = \"%s\"", key, value );
586  }
587  fprintf( output, ">" );
588  fprintf( output, "%s</td>\n", name );
589 }
590 void vth(FILE* output, const Formatting formatted, va_list args)
591 {
592  fprintf( output, "<th" );
593  while (1)
594  {
595  const char* key = va_arg( args, const char* );
596  if (key == NULL)
597  break;
598 
599  const char* value = va_arg( args, const char* );
600 
601  fprintf( output, " %s = \"%s\"", key, value );
602  }
603  fprintf( output, ">" );
604  const char* format = va_arg( args, const char* );
605  vfprintf( output, format, args );
606  fprintf( output, "</th>\n" );
607 }
608 void vtd(FILE* output, const Formatting formatted, va_list args)
609 {
610  fprintf( output, "<td" );
611  while (1)
612  {
613  const char* key = va_arg( args, const char* );
614  if (key == NULL)
615  break;
616 
617  const char* value = va_arg( args, const char* );
618 
619  fprintf( output, " %s = \"%s\"", key, value );
620  }
621  fprintf( output, ">" );
622  const char* format = va_arg( args, const char* );
623  vfprintf( output, format, args );
624  fprintf( output, "</td>\n" );
625 }
626 
627 tr_object::tr_object(FILE* output, ...) :
628  m_output( output )
629 {
630  va_list args;
631  va_start(args, output);
632  vtr_begin( output, args );
633  va_end(args);
634 }
635 th_object::th_object(FILE* output, const char* name, ...) :
636  m_output( output )
637 {
638  va_list args;
639  va_start(args, name);
640  vth( output, name, args );
641  va_end(args);
642 }
643 th_object::th_object(FILE* output, const Formatting formatted, ...) :
644  m_output( output )
645 {
646  va_list args;
647  va_start(args, formatted);
648  vth( output, formatted, args );
649  va_end(args);
650 }
651 /*
652 th_object::td_object(FILE* output, const uint32 value, ...) :
653  m_output( output )
654 {
655  va_list args;
656  va_start(args, value);
657  char name[1024];
658  sprintf( name, "%u", value );
659  vth( output, name, args );
660  va_end(args);
661 }
662 th_object::td_object(FILE* output, const int32 value, ...) :
663  m_output( output )
664 {
665  va_list args;
666  va_start(args, value);
667  char name[1024];
668  sprintf( name, "%i", value );
669  vth( output, name, args );
670  va_end(args);
671 }
672 th_object::td_object(FILE* output, const float value, ...) :
673  m_output( output )
674 {
675  va_list args;
676  va_start(args, value);
677  char name[1024];
678  sprintf( name, "%f", value );
679  vth( output, name, args );
680  va_end(args);
681 }
682 th_object::td_object(FILE* output, const float value, const uint32 prec, ...) :
683  m_output( output )
684 {
685  va_list args;
686  va_start(args, value);
687  char format[1024];
688  char name[1024];
689  sprintf( format, "%u%%f", prec );
690  sprintf( name, format, value );
691  vth( output, name, args );
692  va_end(args);
693 }
694 */
695 td_object::td_object(FILE* output, const char* name, ...) :
696  m_output( output )
697 {
698  va_list args;
699  va_start(args, name);
700  vtd( output, name, args );
701  va_end(args);
702 }
703 td_object::td_object(FILE* output, const Formatting formatted, ...) :
704  m_output( output )
705 {
706  va_list args;
707  va_start(args, formatted);
708  vtd( output, formatted, args );
709  va_end(args);
710 }
711 /*
712 td_object::td_object(FILE* output, const uint32 value, ...) :
713  m_output( output )
714 {
715  va_list args;
716  va_start(args, value);
717  char name[1024];
718  sprintf( name, "%u", value );
719  vtd( output, name, args );
720  va_end(args);
721 }
722 td_object::td_object(FILE* output, const int32 value, ...) :
723  m_output( output )
724 {
725  va_list args;
726  va_start(args, value);
727  char name[1024];
728  sprintf( name, "%i", value );
729  vtd( output, name, args );
730  va_end(args);
731 }
732 td_object::td_object(FILE* output, const float value, ...) :
733  m_output( output )
734 {
735  va_list args;
736  va_start(args, value);
737  char name[1024];
738  sprintf( name, "%f", value );
739  vtd( output, name, args );
740  va_end(args);
741 }
742 td_object::td_object(FILE* output, const float value, const uint32 prec, ...) :
743  m_output( output )
744 {
745  va_list args;
746  va_start(args, value);
747  char format[1024];
748  char name[1024];
749  sprintf( format, "%u%%f", prec );
750  sprintf( name, format, value );
751  vtd( output, name, args );
752  va_end(args);
753 }
754 */
755 void test()
756 {
757  FILE* output = fopen( "test.html", "w" );
758 
759  // let's write our HTML
760  {
761  html_object html( output );
762  {
763  header_object hd( output, "Test", style() );
764  {
765  body_object body( output );
766  {
767  table_object table( output, "my_stats", "stats", "stats" );
768  {
769  tr_object tr( output, NULL );
770  th_object( output, "", NULL );
771  th_object( output, "stats1", NULL );
772  th_object( output, "stats2", NULL );
773  th_object( output, "stats3", NULL );
774  }
775  {
776  tr_object tr( output, NULL );
777  th_object( output, "first", NULL );
778  }
779  {
780  tr_object tr( output, "class", "alt", NULL );
781  th_object( output, "first", NULL );
782  td_object( output, "0.5", NULL );
783  td_object( output, "0.1", NULL );
784  td_object( output, "0.7", NULL );
785  }
786  {
787  tr_object tr( output, NULL );
788  th_object( output, "second", NULL );
789  }
790  {
791  tr_object tr( output, "class", "alt", NULL );
792  th_object( output, "second", NULL );
793  td_object( output, "0.25", NULL );
794  td_object( output, "0.3", NULL );
795  td_object( output, "0.9", NULL );
796  }
797  {
798  tr_object tr( output, NULL );
799  th_object( output, "third", NULL );
800  }
801  {
802  tr_object tr( output, "class", "alt", NULL );
803  th_object( output, "third", NULL );
804  td_object( output, "0.3", NULL );
805  td_object( output, "0.72", NULL );
806  td_object( output, "0.1", NULL );
807  }
808  }
809  }
810  }
811  }
812  fclose( output );
813 }
814 
815 } // namespace html
816 } // namespace nvbio