00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00020 #ifndef _ARAGELI_iomanip_hpp_
00021 #define _ARAGELI_iomanip_hpp_
00022
00023 #include "config.hpp"
00024
00025 #include "sparse_polynom.hpp"
00026 #include "vector.hpp"
00027 #include "matrix.hpp"
00028 #include "io.hpp"
00029
00030
00031 namespace Arageli
00032 {
00033 namespace iomanip
00034 {
00035
00036 #define ARAGELI_IOMANIP_BINDER_PART1(NAME, MANIP, DIR) \
00037 NAME \
00038 ( \
00039 std::basic_##DIR##stream<Ch, ChT>& stream_a, \
00040 const MANIP* manip_a \
00041 ) : stream(stream_a), manip(manip_a) {} \
00042 \
00043 std::basic_##DIR##stream<Ch, ChT>& stream; \
00044 const MANIP* manip;
00045
00046 #define ARAGELI_IOMANIP_MANIP_PART1(MANIP, BINDER, DIR, DIRSYMB)\
00047 template <typename Ch, typename ChT> \
00048 inline BINDER<Ch, ChT> operator DIRSYMB \
00049 (std::basic_##DIR##stream<Ch, ChT>& stream, const MANIP& x) \
00050 { return BINDER<Ch, ChT>(stream, &x); }
00051
00052
00053
00054
00055 struct monom_output_list;
00056
00057 template <typename Ch, typename ChT>
00058 struct monom_output_list_binder
00059 {
00060 ARAGELI_IOMANIP_BINDER_PART1
00061 (monom_output_list_binder, monom_output_list, o);
00062
00063 template <typename F, typename I>
00064 std::basic_ostream<Ch, ChT>& operator<<
00065 (const monom<F, I>& x) const;
00066
00067 };
00068
00069 struct monom_output_list
00070 {
00071 const char *first_bracket, *second_bracket, *separator;
00072
00073 monom_output_list
00074 (
00075 const char* fb_a = monom_output_list_first_bracket_default,
00076 const char* sb_a = monom_output_list_second_bracket_default,
00077 const char* sep_a = monom_output_list_separator_default
00078 )
00079 : first_bracket(fb_a), second_bracket(sb_a), separator(sep_a) {}
00080 };
00081
00082 ARAGELI_IOMANIP_MANIP_PART1(monom_output_list, monom_output_list_binder, o, <<);
00083
00084 template <typename Ch, typename ChT>
00085 template <typename F, typename I>
00086 inline std::basic_ostream<Ch, ChT>& monom_output_list_binder<Ch, ChT>::
00087 operator<< (const monom<F, I>& x) const
00088 {
00089 return output_list
00090 (
00091 stream, x, manip->first_bracket,
00092 manip->second_bracket, manip->separator
00093 );
00094 }
00095
00096
00097
00098 struct monom_input_list;
00099
00100 template <typename Ch, typename ChT>
00101 struct monom_input_list_binder
00102 {
00103 ARAGELI_IOMANIP_BINDER_PART1
00104 (monom_input_list_binder, monom_input_list, i);
00105
00106 template <typename F, typename I>
00107 std::basic_istream<Ch, ChT>& operator>>
00108 (monom<F, I>& x) const;
00109
00110 };
00111
00112 struct monom_input_list
00113 {
00114 const char *first_bracket, *second_bracket, *separator;
00115
00116 monom_input_list
00117 (
00118 const char* fb_a = monom_input_list_first_bracket_default,
00119 const char* sb_a = monom_input_list_second_bracket_default,
00120 const char* sep_a = monom_input_list_separator_default
00121 )
00122 : first_bracket(fb_a), second_bracket(sb_a), separator(sep_a) {}
00123 };
00124
00125 ARAGELI_IOMANIP_MANIP_PART1(monom_input_list, monom_input_list_binder, i, >>);
00126
00127 template <typename Ch, typename ChT>
00128 template <typename F, typename I>
00129 inline std::basic_istream<Ch, ChT>& monom_input_list_binder<Ch, ChT>::
00130 operator>> (monom<F, I>& x) const
00131 {
00132 return input_list
00133 (
00134 stream, x, manip->first_bracket,
00135 manip->second_bracket, manip->separator
00136 );
00137 }
00138
00139
00140
00141 struct monom_output_var;
00142
00143 template <typename Ch, typename ChT>
00144 struct monom_output_var_binder
00145 {
00146 ARAGELI_IOMANIP_BINDER_PART1
00147 (monom_output_var_binder, monom_output_var, o);
00148
00149 template <typename F, typename I>
00150 std::basic_ostream<Ch, ChT>& operator<<
00151 (const monom<F, I>& x) const;
00152
00153 };
00154
00155 struct monom_output_var
00156 {
00157 const char *var, *mul, *pow;
00158 bool first;
00159
00160 monom_output_var
00161 (
00162 bool first_a = true,
00163 const char* var_a = monom_output_var_var_default,
00164 const char* mul_a = monom_output_var_mul_default,
00165 const char* pow_a = monom_output_var_pow_default
00166 )
00167 : var(var_a), mul(mul_a), pow(pow_a), first(first_a) {}
00168 };
00169
00170 ARAGELI_IOMANIP_MANIP_PART1(monom_output_var, monom_output_var_binder, o, <<);
00171
00172 template <typename Ch, typename ChT>
00173 template <typename F, typename I>
00174 inline std::basic_ostream<Ch, ChT>& monom_output_var_binder<Ch, ChT>::
00175 operator<< (const monom<F, I>& x) const
00176 {
00177 return output_var
00178 (
00179 stream, x, manip->first, manip->var,
00180 manip->mul, manip->pow
00181 );
00182 }
00183
00184
00185
00186 struct monom_input_var;
00187
00188 template <typename Ch, typename ChT>
00189 struct monom_input_var_binder
00190 {
00191 ARAGELI_IOMANIP_BINDER_PART1
00192 (monom_input_var_binder, monom_input_var, i);
00193
00194 template <typename F, typename I>
00195 std::basic_istream<Ch, ChT>& operator>>
00196 (monom<F, I>& x) const;
00197 };
00198
00199 struct monom_input_var
00200 {
00201 const char *var, *mul, *pow;
00202 bool first;
00203
00204 monom_input_var
00205 (
00206 bool first_a = true,
00207 const char* var_a = monom_input_var_var_default,
00208 const char* mul_a = monom_input_var_mul_default,
00209 const char* pow_a = monom_input_var_pow_default
00210 )
00211 : var(var_a), mul(mul_a), pow(pow_a), first(first_a) {}
00212 };
00213
00214 ARAGELI_IOMANIP_MANIP_PART1(monom_input_var, monom_input_var_binder, i, >>);
00215
00216 template <typename Ch, typename ChT>
00217 template <typename F, typename I>
00218 inline std::basic_istream<Ch, ChT>& monom_input_var_binder<Ch, ChT>::
00219 operator>> (monom<F, I>& x) const
00220 {
00221 return input_var
00222 (
00223 stream, x, manip->first, manip->var,
00224 manip->mul, manip->pow
00225 );
00226 }
00227
00228
00229
00230 struct monom_output_aligned;
00231
00232 template <typename Ch, typename ChT>
00233 struct monom_output_aligned_binder
00234 {
00235 ARAGELI_IOMANIP_BINDER_PART1
00236 (monom_output_aligned_binder, monom_output_aligned, o);
00237
00238 template <typename F, typename I>
00239 std::basic_ostream<Ch, ChT>& operator<<
00240 (const monom<F, I>& x) const;
00241
00242 };
00243
00244 struct monom_output_aligned
00245 {
00246 const char *var, *mul, *pow;
00247 bool first;
00248
00249 monom_output_aligned
00250 (
00251 bool first_a = true,
00252 const char* var_a = monom_output_var_var_default,
00253 const char* mul_a = monom_output_var_mul_default,
00254 const char* pow_a = monom_output_var_pow_default
00255 )
00256 : var(var_a), mul(mul_a), pow(pow_a), first(first_a) {}
00257 };
00258
00259 ARAGELI_IOMANIP_MANIP_PART1(monom_output_aligned, monom_output_aligned_binder, o, <<);
00260
00261 template <typename Ch, typename ChT>
00262 template <typename F, typename I>
00263 inline std::basic_ostream<Ch, ChT>& monom_output_aligned_binder<Ch, ChT>::
00264 operator<< (const monom<F, I>& x) const
00265 {
00266 return output_aligned
00267 (
00268 stream, x, manip->first, manip->var,
00269 manip->mul, manip->pow
00270 );
00271 }
00272
00273
00274
00275
00276
00277
00278
00279 struct sparse_polynom_output_list;
00280
00281 template <typename Ch, typename ChT>
00282 struct sparse_polynom_output_list_binder
00283 {
00284 ARAGELI_IOMANIP_BINDER_PART1
00285 (sparse_polynom_output_list_binder, sparse_polynom_output_list, o);
00286
00287 template <typename F, typename I, bool REFCNT>
00288 std::basic_ostream<Ch, ChT>& operator<<
00289 (const sparse_polynom<F, I, REFCNT>& x) const;
00290
00291 };
00292
00293 struct sparse_polynom_output_list
00294 {
00295 Arageli::monoms_order monoms_order;
00296 const char *first_bracket, *second_bracket, *separator;
00297
00298 sparse_polynom_output_list
00299 (
00300 Arageli::monoms_order mo = mo_inc,
00301 const char* fb_a = monom_output_list_first_bracket_default,
00302 const char* sb_a = monom_output_list_second_bracket_default,
00303 const char* sep_a = monom_output_list_separator_default
00304 )
00305 : monoms_order(mo), first_bracket(fb_a),
00306 second_bracket(sb_a), separator(sep_a) {}
00307 };
00308
00309 ARAGELI_IOMANIP_MANIP_PART1
00310 (sparse_polynom_output_list,sparse_polynom_output_list_binder, o, <<);
00311
00312 template <typename Ch, typename ChT>
00313 template <typename F, typename I, bool REFCNT>
00314 inline std::basic_ostream<Ch, ChT>& sparse_polynom_output_list_binder<Ch, ChT>::
00315 operator<< (const sparse_polynom<F, I, REFCNT>& x) const
00316 {
00317 return output_list
00318 (
00319 stream, x, manip->monoms_order, manip->first_bracket,
00320 manip->second_bracket, manip->separator
00321 );
00322 }
00323
00324
00325
00326 struct sparse_polynom_input_list;
00327
00328 template <typename Ch, typename ChT>
00329 struct sparse_polynom_input_list_binder
00330 {
00331 ARAGELI_IOMANIP_BINDER_PART1
00332 (sparse_polynom_input_list_binder, sparse_polynom_input_list, i);
00333
00334 template <typename F, typename I, bool REFCNT>
00335 std::basic_istream<Ch, ChT>& operator>>
00336 (sparse_polynom<F, I, REFCNT>& x) const;
00337
00338 };
00339
00340 struct sparse_polynom_input_list
00341 {
00342 const char *first_bracket, *second_bracket, *separator;
00343
00344 sparse_polynom_input_list
00345 (
00346 const char* fb_a = monom_input_list_first_bracket_default,
00347 const char* sb_a = monom_input_list_second_bracket_default,
00348 const char* sep_a = monom_input_list_separator_default
00349 )
00350 : first_bracket(fb_a), second_bracket(sb_a), separator(sep_a) {}
00351 };
00352
00353 ARAGELI_IOMANIP_MANIP_PART1
00354 (sparse_polynom_input_list, sparse_polynom_input_list_binder, i, >>);
00355
00356 template <typename Ch, typename ChT>
00357 template <typename F, typename I, bool REFCNT>
00358 inline std::basic_istream<Ch, ChT>& sparse_polynom_input_list_binder<Ch, ChT>::
00359 operator>> (sparse_polynom<F, I, REFCNT>& x) const
00360 {
00361 return input_list
00362 (
00363 stream, x, manip->first_bracket,
00364 manip->second_bracket, manip->separator
00365 );
00366 }
00367
00368
00369
00370 struct sparse_polynom_output_var;
00371
00372 template <typename Ch, typename ChT>
00373 struct sparse_polynom_output_var_binder
00374 {
00375 ARAGELI_IOMANIP_BINDER_PART1
00376 (sparse_polynom_output_var_binder, sparse_polynom_output_var, o);
00377
00378 template <typename F, typename I, bool REFCNT>
00379 std::basic_ostream<Ch, ChT>& operator<<
00380 (const sparse_polynom<F, I, REFCNT>& x) const;
00381
00382 };
00383
00384 struct sparse_polynom_output_var
00385 {
00386 Arageli::monoms_order monoms_order;
00387 const char *var, *mul, *pow;
00388
00389 sparse_polynom_output_var
00390 (
00391 Arageli::monoms_order mo = mo_inc,
00392 const char* var_a = monom_output_var_var_default,
00393 const char* mul_a = monom_output_var_mul_default,
00394 const char* pow_a = monom_output_var_pow_default
00395 )
00396 : monoms_order(mo), var(var_a), mul(mul_a), pow(pow_a) {}
00397 };
00398
00399 ARAGELI_IOMANIP_MANIP_PART1
00400 (sparse_polynom_output_var, sparse_polynom_output_var_binder, o, <<);
00401
00402 template <typename Ch, typename ChT>
00403 template <typename F, typename I, bool REFCNT>
00404 inline std::basic_ostream<Ch, ChT>& sparse_polynom_output_var_binder<Ch, ChT>::
00405 operator<< (const sparse_polynom<F, I, REFCNT>& x) const
00406 {
00407 return output_var
00408 (
00409 stream, x, manip->monoms_order,
00410 manip->var, manip->mul, manip->pow
00411 );
00412 }
00413
00414
00415
00416 struct sparse_polynom_input_var;
00417
00418 template <typename Ch, typename ChT>
00419 struct sparse_polynom_input_var_binder
00420 {
00421 ARAGELI_IOMANIP_BINDER_PART1
00422 (sparse_polynom_input_var_binder, sparse_polynom_input_var, i);
00423
00424 template <typename F, typename I, bool REFCNT>
00425 std::basic_istream<Ch, ChT>& operator>>
00426 (sparse_polynom<F, I, REFCNT>& x) const;
00427 };
00428
00429 struct sparse_polynom_input_var
00430 {
00431 const char *var, *mul, *pow;
00432
00433 sparse_polynom_input_var
00434 (
00435 const char* var_a = monom_input_var_var_default,
00436 const char* mul_a = monom_input_var_mul_default,
00437 const char* pow_a = monom_input_var_pow_default
00438 )
00439 : var(var_a), mul(mul_a), pow(pow_a) {}
00440 };
00441
00442 ARAGELI_IOMANIP_MANIP_PART1
00443 (sparse_polynom_input_var, sparse_polynom_input_var_binder, i, >>);
00444
00445 template <typename Ch, typename ChT>
00446 template <typename F, typename I, bool REFCNT>
00447 inline std::basic_istream<Ch, ChT>& sparse_polynom_input_var_binder<Ch, ChT>::
00448 operator>> (sparse_polynom<F, I, REFCNT>& x) const
00449 {
00450 return input_var
00451 (
00452 stream, x, manip->var,
00453 manip->mul, manip->pow
00454 );
00455 }
00456
00457
00458
00459 struct sparse_polynom_output_aligned;
00460
00461 template <typename Ch, typename ChT>
00462 struct sparse_polynom_output_aligned_binder
00463 {
00464 ARAGELI_IOMANIP_BINDER_PART1
00465 (sparse_polynom_output_aligned_binder, sparse_polynom_output_aligned, o);
00466
00467 template <typename F, typename I, bool REFCNT>
00468 std::basic_ostream<Ch, ChT>& operator<<
00469 (const sparse_polynom<F, I, REFCNT>& x) const;
00470
00471 };
00472
00473 struct sparse_polynom_output_aligned
00474 {
00475 Arageli::monoms_order monoms_order;
00476 const char *var, *mul, *pow;
00477
00478 sparse_polynom_output_aligned
00479 (
00480 Arageli::monoms_order mo = mo_inc,
00481 const char* var_a = monom_output_var_var_default,
00482 const char* mul_a = monom_output_var_mul_default,
00483 const char* pow_a = monom_output_var_pow_default
00484 )
00485 : monoms_order(mo), var(var_a), mul(mul_a), pow(pow_a) {}
00486 };
00487
00488 ARAGELI_IOMANIP_MANIP_PART1
00489 (sparse_polynom_output_aligned, sparse_polynom_output_aligned_binder, o, <<);
00490
00491 template <typename Ch, typename ChT>
00492 template <typename F, typename I, bool REFCNT>
00493 inline std::basic_ostream<Ch, ChT>& sparse_polynom_output_aligned_binder<Ch, ChT>::
00494 operator<< (const sparse_polynom<F, I, REFCNT>& x) const
00495 {
00496 return output_aligned
00497 (
00498 stream, x, manip->monoms_order,
00499 manip->var, manip->mul, manip->pow
00500 );
00501 }
00502
00503
00504
00505 struct vector_output_list;
00506
00507 template <typename Ch, typename ChT>
00508 struct vector_output_list_binder
00509 {
00510 ARAGELI_IOMANIP_BINDER_PART1
00511 (vector_output_list_binder, vector_output_list, o);
00512
00513 template <typename T, bool REFCNT>
00514 std::basic_ostream<Ch, ChT>& operator<<
00515 (const vector<T, REFCNT>& x) const;
00516
00517 };
00518
00519 struct vector_output_list
00520 {
00521 const char *first_bracket, *second_bracket, *separator;
00522
00523 vector_output_list
00524 (
00525 const char* fb_a = vector_output_list_first_bracket_default,
00526 const char* sb_a = vector_output_list_second_bracket_default,
00527 const char* sep_a = vector_output_list_separator_default
00528 )
00529 : first_bracket(fb_a), second_bracket(sb_a), separator(sep_a) {}
00530 };
00531
00532 ARAGELI_IOMANIP_MANIP_PART1(vector_output_list, vector_output_list_binder, o, <<);
00533
00534 template <typename Ch, typename ChT>
00535 template <typename T, bool REFCNT>
00536 inline std::basic_ostream<Ch, ChT>& vector_output_list_binder<Ch, ChT>::
00537 operator<< (const vector<T, REFCNT>& x) const
00538 {
00539 return output_list
00540 (
00541 stream, x, manip->first_bracket,
00542 manip->second_bracket, manip->separator
00543 );
00544 }
00545
00546
00547
00548 struct vector_input_list;
00549
00550 template <typename Ch, typename ChT>
00551 struct vector_input_list_binder
00552 {
00553 ARAGELI_IOMANIP_BINDER_PART1
00554 (vector_input_list_binder, vector_input_list, i);
00555
00556 template <typename T, bool REFCNT>
00557 std::basic_istream<Ch, ChT>& operator>>
00558 (vector<T, REFCNT>& x) const;
00559
00560 };
00561
00562 struct vector_input_list
00563 {
00564 const char *first_bracket, *second_bracket, *separator;
00565
00566 vector_input_list
00567 (
00568 const char* fb_a = vector_input_list_first_bracket_default,
00569 const char* sb_a = vector_input_list_second_bracket_default,
00570 const char* sep_a = vector_input_list_separator_default
00571 )
00572 : first_bracket(fb_a), second_bracket(sb_a), separator(sep_a) {}
00573 };
00574
00575 ARAGELI_IOMANIP_MANIP_PART1(vector_input_list, vector_input_list_binder, i, >>);
00576
00577 template <typename Ch, typename ChT>
00578 template <typename T, bool REFCNT>
00579 inline std::basic_istream<Ch, ChT>& vector_input_list_binder<Ch, ChT>::
00580 operator>> (vector<T, REFCNT>& x) const
00581 {
00582 return input_list
00583 (
00584 stream, x, manip->first_bracket,
00585 manip->second_bracket, manip->separator
00586 );
00587 }
00588
00589
00590
00591 struct vector_output_aligned;
00592
00593 template <typename Ch, typename ChT>
00594 struct vector_output_aligned_binder
00595 {
00596 ARAGELI_IOMANIP_BINDER_PART1
00597 (vector_output_aligned_binder, vector_output_aligned, o);
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608 };
00609
00610 struct vector_output_aligned
00611 {
00612 const char* left_col;
00613 const char* right_col;
00614
00615 vector_output_aligned
00616 (
00617 const char* left_col_a = vector_output_aligned_left_col_default,
00618 const char* right_col_a = vector_output_aligned_right_col_default
00619 )
00620 : left_col(left_col_a), right_col(right_col_a) {}
00621 };
00622
00623 ARAGELI_IOMANIP_MANIP_PART1
00624 (vector_output_aligned, vector_output_aligned_binder, o, <<);
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636 template <typename Ch, typename ChT, typename T, bool REFCNT>
00637 inline std::basic_ostream<Ch, ChT>&
00638 operator<< (const vector_output_aligned_binder<Ch, ChT>& b, const vector<T, REFCNT>& x)
00639 {
00640 return output_aligned
00641 (b.stream, x, b.manip->left_col, b.manip->right_col);
00642 }
00643
00644
00645
00646
00647 struct matrix_output_list;
00648
00649 template <typename Ch, typename ChT>
00650 struct matrix_output_list_binder
00651 {
00652 ARAGELI_IOMANIP_BINDER_PART1
00653 (matrix_output_list_binder, matrix_output_list, o);
00654
00655 template <typename T, bool REFCNT>
00656 std::basic_ostream<Ch, ChT>& operator<<
00657 (const matrix<T, REFCNT>& x) const;
00658
00659 };
00660
00661 struct matrix_output_list
00662 {
00663 const char
00664 *first_bracket, *second_bracket, *row_separator,
00665 *first_row_bracket, *second_row_bracket, *col_separator;
00666
00667 matrix_output_list
00668 (
00669 const char* fb_a = matrix_output_list_first_bracket_default,
00670 const char* sb_a = matrix_output_list_second_bracket_default,
00671 const char* rsep_a = matrix_output_list_row_separator_default,
00672 const char* frb_a = matrix_output_list_first_row_bracket_default,
00673 const char* srb_a = matrix_output_list_second_row_bracket_default,
00674 const char* csep_a = matrix_output_list_col_separator_default
00675 )
00676 : first_bracket(fb_a), second_bracket(sb_a), row_separator(rsep_a),
00677 first_row_bracket(frb_a), second_row_bracket(srb_a), col_separator(csep_a)
00678 {}
00679 };
00680
00681 ARAGELI_IOMANIP_MANIP_PART1(matrix_output_list, matrix_output_list_binder, o, <<);
00682
00683 template <typename Ch, typename ChT>
00684 template <typename T, bool REFCNT>
00685 inline std::basic_ostream<Ch, ChT>& matrix_output_list_binder<Ch, ChT>::
00686 operator<< (const matrix<T, REFCNT>& x) const
00687 {
00688 return output_list
00689 (
00690 stream, x,
00691 manip->first_bracket, manip->second_bracket, manip->row_separator,
00692 manip->first_row_bracket,
00693 manip->second_row_bracket,
00694 manip->col_separator
00695 );
00696 }
00697
00698
00699
00700 struct matrix_input_list;
00701
00702 template <typename Ch, typename ChT>
00703 struct matrix_input_list_binder
00704 {
00705 ARAGELI_IOMANIP_BINDER_PART1
00706 (matrix_input_list_binder, matrix_input_list, i);
00707
00708 template <typename T, bool REFCNT>
00709 std::basic_istream<Ch, ChT>& operator>>
00710 (matrix<T, REFCNT>& x) const;
00711
00712 };
00713
00714 struct matrix_input_list
00715 {
00716 const char
00717 *first_bracket, *second_bracket, *row_separator,
00718 *first_row_bracket, *second_row_bracket, *col_separator;
00719
00720 matrix_input_list
00721 (
00722 const char* fb_a = matrix_input_list_first_bracket_default,
00723 const char* sb_a = matrix_input_list_second_bracket_default,
00724 const char* rsep_a = matrix_input_list_row_separator_default,
00725 const char* frb_a = matrix_input_list_first_row_bracket_default,
00726 const char* srb_a = matrix_input_list_second_row_bracket_default,
00727 const char* csep_a = matrix_input_list_col_separator_default
00728 )
00729 : first_bracket(fb_a), second_bracket(sb_a), row_separator(rsep_a),
00730 first_row_bracket(frb_a), second_row_bracket(srb_a), col_separator(csep_a)
00731 {}
00732 };
00733
00734 ARAGELI_IOMANIP_MANIP_PART1(matrix_input_list, matrix_input_list_binder, i, >>);
00735
00736 template <typename Ch, typename ChT>
00737 template <typename T, bool REFCNT>
00738 inline std::basic_istream<Ch, ChT>& matrix_input_list_binder<Ch, ChT>::
00739 operator>> (matrix<T, REFCNT>& x) const
00740 {
00741 return input_list
00742 (
00743 stream, x,
00744 manip->first_bracket, manip->second_bracket, manip->row_separator,
00745 manip->first_row_bracket, manip->second_row_bracket, manip->col_separator
00746 );
00747 }
00748
00749
00750
00751 struct matrix_output_aligned;
00752
00753 template <typename Ch, typename ChT>
00754 struct matrix_output_aligned_binder
00755 {
00756 ARAGELI_IOMANIP_BINDER_PART1
00757 (matrix_output_aligned_binder, matrix_output_aligned, o);
00758
00759
00760
00761
00762
00763 };
00764
00765 struct matrix_output_aligned
00766 {
00767 const char *left_col, *right_col, *inter_col;
00768
00769 matrix_output_aligned
00770 (
00771 const char* left_col_a = matrix_output_aligned_left_col_default,
00772 const char* right_col_a = matrix_output_aligned_right_col_default,
00773 const char* inter_col_a = matrix_output_aligned_inter_col_default
00774 )
00775 : left_col(left_col_a), right_col(right_col_a), inter_col(inter_col_a) {}
00776 };
00777
00778 ARAGELI_IOMANIP_MANIP_PART1
00779 (matrix_output_aligned, matrix_output_aligned_binder, o, <<);
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793 template <typename Ch, typename ChT, typename T, bool REFCNT>
00794 inline std::basic_ostream<Ch, ChT>&
00795 operator<<
00796 (
00797 const matrix_output_aligned_binder<Ch, ChT>& binder,
00798 const matrix<T, REFCNT>& x
00799 )
00800 {
00801 return output_aligned
00802 (
00803 binder.stream, x, binder.manip->left_col,
00804 binder.manip->right_col, binder.manip->inter_col
00805 );
00806 }
00807
00808
00809
00810
00811
00812 }
00813 }
00814
00815
00816 #endif // #ifndef _ARAGELI_iomanip_hpp_