[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

utilities.hxx
1 /************************************************************************/
2 /* */
3 /* Copyright 1998-2002 by Ullrich Koethe */
4 /* */
5 /* This file is part of the VIGRA computer vision library. */
6 /* The VIGRA Website is */
7 /* http://hci.iwr.uni-heidelberg.de/vigra/ */
8 /* Please direct questions, bug reports, and contributions to */
9 /* ullrich.koethe@iwr.uni-heidelberg.de or */
10 /* vigra@informatik.uni-hamburg.de */
11 /* */
12 /* Permission is hereby granted, free of charge, to any person */
13 /* obtaining a copy of this software and associated documentation */
14 /* files (the "Software"), to deal in the Software without */
15 /* restriction, including without limitation the rights to use, */
16 /* copy, modify, merge, publish, distribute, sublicense, and/or */
17 /* sell copies of the Software, and to permit persons to whom the */
18 /* Software is furnished to do so, subject to the following */
19 /* conditions: */
20 /* */
21 /* The above copyright notice and this permission notice shall be */
22 /* included in all copies or substantial portions of the */
23 /* Software. */
24 /* */
25 /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND */
26 /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES */
27 /* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND */
28 /* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT */
29 /* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, */
30 /* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING */
31 /* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR */
32 /* OTHER DEALINGS IN THE SOFTWARE. */
33 /* */
34 /************************************************************************/
35 
36 
37 #ifndef VIGRA_BASICS_HXX
38 #define VIGRA_BASICS_HXX
39 
40 #include "config.hxx"
41 #include "error.hxx"
42 #include "metaprogramming.hxx"
43 #include "tuple.hxx"
44 #include "diff2d.hxx"
45 #include "mathutil.hxx"
46 #include <string>
47 #include <sstream>
48 
49 namespace vigra {
50 
51 /** Convert a value to a string. Available for integral and floating point types
52  and void *.
53 */
54 doxygen_overloaded_function(template <class T> std::string asString(T t))
55 
56 #define VIGRA_AS_STRING(T) \
57 inline std::string asString(T t) \
58 { \
59  std::stringstream s; \
60  s << t; \
61  return s.str(); \
62 }
63 
64 VIGRA_AS_STRING(bool)
65 VIGRA_AS_STRING(signed char)
66 VIGRA_AS_STRING(unsigned char)
67 VIGRA_AS_STRING(signed short)
68 VIGRA_AS_STRING(unsigned short)
69 VIGRA_AS_STRING(signed long)
70 VIGRA_AS_STRING(unsigned long)
71 VIGRA_AS_STRING(signed long long)
72 VIGRA_AS_STRING(unsigned long long)
73 VIGRA_AS_STRING(signed int)
74 VIGRA_AS_STRING(unsigned int)
75 VIGRA_AS_STRING(float)
76 VIGRA_AS_STRING(double)
77 VIGRA_AS_STRING(long double)
78 VIGRA_AS_STRING(void *)
79 
80 #undef VIGRA_AS_STRING
81 
82 
83 } // namespace std
84 
85 /*! \page Utilities Utilities
86  Basic helper functionality needed throughout.
87 
88  <UL style="list-style-image:url(documents/bullet.gif)">
89  <LI> \ref vigra::ArrayVector
90  <BR>&nbsp;&nbsp;&nbsp;<em>replacement for std::vector (always uses consecutive memory)</em>
91  <LI> \ref RangesAndPoints
92  <BR>&nbsp;&nbsp;&nbsp;<em>2-D and N-D positions, extents, and boxes</em>
93  <LI> \ref PixelNeighborhood
94  <BR>&nbsp;&nbsp;&nbsp;<em>4- and 8-neighborhood definitions and circulators</em>
95  <LI> \ref VoxelNeighborhood
96  <BR>&nbsp;&nbsp;&nbsp;<em>6- and 26-neighborhood definitions and circulators</em>
97  <LI> \ref vigra::IteratorAdaptor
98  <BR>&nbsp;&nbsp;&nbsp;<em>Quickly create STL-compatible 1D iterator adaptors</em>
99  <LI> \ref TupleTypes
100  <BR>&nbsp;&nbsp;&nbsp;<em>pair, triple, tuple4, tuple5</em>
101  <LI> \ref MathConstants
102  <BR>&nbsp;&nbsp;&nbsp;<em>M_PI, M_SQRT2</em>
103  </UL>
104 */
105 
106 #endif // VIGRA_BASICS_HXX

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de)
Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany

html generated using doxygen and Python
vigra 1.7.1 (Tue Jul 10 2012)