00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 #ifndef MLN_TRAIT_IMAGE_PROPS_HH
00027 # define MLN_TRAIT_IMAGE_PROPS_HH
00028 
00036 # include <string>
00037 # include <mln/trait/undef.hh>
00038 # include <mln/trait/value/kind.hh>
00039 
00040 # include <mln/core/def/coord.hh> 
00041 
00042 
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 
00051 
00052 
00053 
00054 
00055 
00056 
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073 
00074 
00075 
00076 
00077 
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097 
00098 
00099 
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 
00119 
00120 
00121 
00122 
00123 
00124 
00125 
00126 
00127 
00128 
00129 
00130 
00131 
00132 
00133 
00134 
00135 
00136 
00137 
00138 
00139 
00140 
00141 
00142 
00143 
00144 
00145 
00146 
00147 
00148 
00149 
00150 
00151 
00152 
00153 
00154 
00155 
00156 
00157 
00158 
00159 
00160 
00161 
00162 
00163 
00164 
00165 
00166 
00167 
00168 
00169 
00170 
00171 
00172 
00173 
00174 
00175 
00176 
00177 
00178 
00179 
00180 
00181 
00182 
00183 
00184 
00185 
00186 
00187 
00188 
00189 
00190 
00191 
00192 
00193 
00194 
00195 
00196 
00197 
00198 
00199 
00200 
00201 
00202 
00203 
00204 
00205 
00206 
00207 
00208 
00209 
00210 
00211 
00212 
00213 
00214 
00215 
00216 
00217 
00218 
00219 
00220 
00221 
00222 
00223 
00224 
00225 
00226 
00227 
00228 
00229 
00230 
00231 
00232 
00233 
00234 
00235 
00236 
00237 
00238 
00239 
00240 
00241 
00242 
00243 
00244 
00245 
00246 
00247 
00248 
00249 
00250 
00251 
00252 
00253 
00254 
00255 
00256 
00257 
00258 
00259 
00260 
00261 
00262 
00263 
00264 
00265 
00266 
00267 
00268 
00269 
00270 
00271 
00272 
00273 
00274 
00275 
00276 
00277 
00278 
00279 
00280 
00281 
00282 
00283 
00284 
00285 
00286 
00287 
00288 
00289 
00290 
00291 
00292 
00293 
00294 
00295 
00296 
00297 
00298 
00299 
00300 
00301 
00302 
00303 
00304 
00305 
00306 
00307 
00308 
00309 
00310 
00311 
00312 
00313 
00314 
00315 
00316 
00317 
00318 
00319 
00320 
00321 
00322 
00323 
00324 
00325 
00326 
00327 
00328 
00329 
00330 
00331 
00332 
00333 
00334 
00335 
00336 
00337 
00338 
00339 
00340 
00341 
00342 
00343 
00344 
00345 
00346 
00347 namespace mln
00348 {
00349 
00350   namespace trait
00351   {
00352 
00353     namespace image
00354     {
00355 
00356 
00357 
00358 
00359 
00360 
00361 
00362 
00363 
00364 
00365 
00366 
00367 
00368       struct category
00369       {
00370         struct any { protected: any() {} };
00371         struct primary : any { std::string name() const { return "category::primary"; } };
00372         struct morpher : any { protected: morpher() {} };
00373         struct domain_morpher
00374           : morpher { std::string name() const { return "category::domain_morpher"; } };
00375         struct value_morpher
00376           : morpher { std::string name() const { return "category::value_morpher"; } };
00377         struct identity_morpher
00378           : morpher { std::string name() const { return "category::identity_morpher"; } };
00379       };
00380 
00381 
00382 
00383 
00384 
00385 
00386 
00387 
00388 
00389 
00390       struct speed
00391       {
00392         struct any { protected: any() {} };
00393         struct slow : any { std::string name() const { return "speed::slow"; } };
00394         struct fast : any { std::string name() const { return "speed::fast"; } };
00395         struct fastest
00396           : fast { std::string name() const { return "speed::fastest"; } };
00397       };
00398 
00399 
00400 
00401 
00402 
00403 
00404 
00405 
00406       struct size
00407       {
00408         struct any { protected: any() {} };
00409         struct huge     : any { std::string name() const { return "size::huge"; } };
00410         struct regular  : any { std::string name() const { return "size::regular"; } };
00411       };
00412 
00413 
00414 
00415 
00416 
00417 
00418 
00419 
00420 
00421 
00422       struct value_access
00423       {
00424         struct any { protected: any() {} };
00425         struct direct   : any  { std::string name() const { return "value_access::direct"; } };
00426         struct indirect : any  { std::string name() const { return "value_access::indirect"; } };
00427         struct computed : any  { std::string name() const { return "value_access::computed"; } };
00428       };
00429 
00430 
00431 
00432 
00433 
00434 
00435 
00436 
00437 
00438 
00439 
00440 
00441 
00442 
00443 
00444 
00445       struct value_storage
00446       {
00447         struct any { protected: any() {} };
00448         struct organized
00449           : any { protected: organized() {} };
00450         struct singleton
00451           : organized { std::string name() const { return "value_storage::singleton"; } };
00452         struct one_block
00453           : organized { std::string name() const { return "value_storage::one_block"; } };
00454         struct piecewise
00455           : organized { std::string name() const { return "value_storage::piecewise"; } };
00456         struct disrupted : any  { std::string name() const { return "value_storage::disrupted"; } };
00457       };
00458 
00459 
00460 
00461 
00462 
00463 
00464 
00465 
00466       struct value_alignment
00467       {
00468         struct any { protected: any() {} };
00469         struct with_grid
00470           : any { std::string name() const { return "value_alignment::with_grid"; } };
00471         struct not_aligned
00472           : any { std::string name() const { return "value_alignment::not_aligned"; } };
00473         struct irrelevant
00474           : any { std::string name() const { return "value_alignment::irrelevant"; } };
00475       };
00476 
00477 
00478 
00479 
00480 
00481 
00482 
00483       struct pw_io
00484       {
00485         struct any { protected: any() {} };
00486         struct read
00487           : any { std::string name() const { return "pw_io::read"; } };
00488         struct read_write
00489           : any { std::string name() const { return "pw_io::read_write"; } };
00490       };
00491 
00492 
00493 
00494 
00495 
00496 
00497 
00498       struct vw_io
00499       {
00500         struct any { protected: any() {} };
00501         struct some : any { protected: some() {} };
00502         struct read
00503           : some { std::string name() const { return "vw_io::read"; } };
00504         struct read_write
00505           : some { std::string name() const { return "vw_io::read_write"; } };
00506         struct none
00507           : any { std::string name() const { return "vw_io::none"; } };
00508       };
00509 
00510 
00511 
00512 
00513 
00514 
00515 
00516 
00517 
00518 
00519 
00520       struct vw_set
00521       {
00522         struct any { protected: any() {} };
00523         struct some : any { protected: some() {} };
00524         struct none
00525           : any { std::string name() const { return "vw_set::none";} };
00526         struct uni
00527           : some { std::string name() const { return "vw_set::uni";} };
00528         struct multi
00529           : some { std::string name() const { return "vw_set::multi";} };
00530       };
00531 
00532 
00533 
00534 
00535 
00536 
00537 
00538 
00539 
00540 
00541 
00542 
00543 
00544       struct value_browsing
00545       {
00546         struct any { protected: any() {} };
00547         struct site_wise_only
00548           : any { std::string name() const { return "value_browsing::site_wise_only"; } };
00549         struct cell_wise
00550           : virtual any { std::string name() const { return "value_browsing::cell_wise"; } };
00551         struct value_wise
00552           : virtual any { std::string name() const { return "value_browsing::value_wise"; } };
00553         struct cell_and_value_wise
00554           : cell_wise,
00555             value_wise
00556         { std::string name() const { return "value_browsing::cell_and_value_wise"; } };
00557       };
00558 
00559 
00560 
00561 
00562 
00563 
00564 
00565 
00566 
00567       struct value_io
00568       {
00569         struct any { protected: any() {} };
00570         struct read_only
00571           : any { std::string name() const { return "value_io::read_only"; } };
00572         struct read_write
00573           : any { std::string name() const { return "value_io::read_write"; } };
00574       };
00575 
00576 
00577 
00578 
00579 
00580 
00581 
00582 
00583 
00584 
00585 
00586 
00587 
00588 
00589 
00590 
00591       struct localization
00592       {
00593         struct any { protected: any() {} };
00594         struct none  : any { std::string name() const { return "localization::none"; } };
00595         struct space : any { std::string name() const { return "localization::space"; } };
00596         struct grid  : space { protected: grid() {} };
00597         struct isotropic_grid
00598           : grid { std::string name() const { return "localization::isotropic_grid"; } };
00599         struct basic_grid
00600           : isotropic_grid { std::string name() const { return "localization::basic_grid"; } };
00601         struct anisotropic_grid
00602           : grid { std::string name() const { return "localization::anisotropic_grid"; } };
00603       };
00604 
00605 
00606 
00607 
00608 
00609 
00610 
00611 
00612 
00613 
00614 
00615 
00616 
00617 
00618       struct dimension
00619       {
00620         struct any { protected: any() {} };
00621         struct none     : any  { std::string name() const { return "dimension::none"; } };
00622         struct some
00623           : any { protected: some() {} };
00624         struct one_d    : some { std::string name() const { return "dimension::one_d"; } };
00625         struct two_d    : some { std::string name() const { return "dimension::two_d"; } };
00626         struct three_d  : some { std::string name() const { return "dimension::three_d"; } };
00627       };
00628 
00629 
00630 
00631 
00632 
00633 
00634 
00635 
00636 
00637 
00638 
00639 
00640 
00641 
00642       struct ext_domain
00643       {
00644         struct any { protected: any() {} };
00645         struct none     : any  { std::string name() const { return "ext_domain::none"; } };
00646         struct some
00647           : any { protected: some() {} };
00648         struct extendable : some { std::string name() const { return "ext_domain::extendable"; } };
00649         struct fixed      : some { std::string name() const { return "ext_domain::fixed"; } };
00650         struct infinite  : fixed { std::string name() const { return "ext_domain::infinite"; } };
00651       };
00652 
00653 
00654 
00655 
00656 
00657 
00658 
00659 
00660 
00661 
00662       struct ext_value
00663       {
00664         struct any { protected: any() {} };
00665         struct irrelevant : any { std::string name() const { return "ext_value::irrelevant"; } };
00666         struct single     : any { std::string name() const { return "ext_value::single"; } };
00667         struct multiple   : any { std::string name() const { return "ext_value::multiple"; } };
00668       };
00669 
00670 
00671 
00672 
00673 
00674 
00675 
00676 
00677 
00678 
00679       struct ext_io
00680       {
00681         struct any { protected: any() {} };
00682         struct irrelevant
00683           : any { std::string name() const { return "ext_io::irrelevant"; } };
00684         struct read_only
00685           : any { std::string name() const { return "ext_io::read_only"; } };
00686         struct read_write
00687           : any { std::string name() const { return "ext_io::read_write"; } };
00688       };
00689 
00690 
00691 
00692 
00693 
00694 
00695 
00696 
00697 
00698 
00699 
00700 
00701 
00702 
00703 
00704 
00705 
00706 
00707 
00708 
00709 
00710 
00711 
00712 
00713 
00714 
00715 
00716 
00717       typedef mln::trait::value::kind kind; 
00718 
00719 
00720 
00721 
00722 
00723 
00724 
00725 
00726 
00727 
00728 
00729 
00730       struct nature
00731       {
00732         struct any { protected: any() {} };
00733         struct scalar    : any { std::string name() const { return "nature::scalar"; } };
00734         struct vectorial : any { std::string name() const { return "nature::vectorial"; } };
00735         struct structed  : any { std::string name() const { return "nature::structed"; } };
00736         struct pointer   : any { std::string name() const { return "nature::pointer"; } };
00737       };
00738 
00739 
00740 
00741 
00742 
00743 
00744 
00745 
00746       struct quant
00747       {
00748         struct any { protected: any() {} };
00749         struct low  : any { std::string name() const { return "quant::low"; } };
00750         struct high : any { std::string name() const { return "quant::high"; } };
00751       };
00752 
00753 
00754     } 
00755 
00756   } 
00757 
00758 
00759 
00760   
00761 
00764 
00765   
00766   namespace grid
00767   {
00768     struct tick;
00769     struct square;
00770     struct hexa;
00771     struct cube;
00772   }
00773 
00774   template <typename M, typename C> struct point;
00775   typedef point<grid::tick,   def::coord> point1d;
00776   typedef point<grid::square, def::coord> point2d;
00777   typedef point<grid::hexa,   def::coord> point2d_h;
00778   typedef point<grid::cube,   def::coord> point3d;
00779 
00780   namespace trait
00781   {
00782     namespace image
00783     {
00784 
00787       template <typename P>
00788       struct space_from_point
00789       { typedef undef ret; };
00790 
00791       template <>
00792       struct space_from_point<point1d>
00793       { typedef trait::image::dimension::one_d ret; };
00794 
00795       template <>
00796       struct space_from_point<point2d>
00797       { typedef trait::image::dimension::two_d ret; };
00798 
00799       template <>
00800       struct space_from_point<point3d>
00801       { typedef trait::image::dimension::three_d ret; };
00803 
00804     } 
00805 
00806   } 
00807 
00808 } 
00809 
00810 
00811 #endif // ! MLN_TRAIT_IMAGE_PROPS_HH