$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
colors.hh
1 // Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
2 // Laboratory (LRDE)
3 //
4 // This file is part of Olena.
5 //
6 // Olena is free software: you can redistribute it and/or modify it under
7 // the terms of the GNU General Public License as published by the Free
8 // Software Foundation, version 2 of the License.
9 //
10 // Olena is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with Olena. If not, see <http://www.gnu.org/licenses/>.
17 //
18 // As a special exception, you may use this file as part of a free
19 // software project without restriction. Specifically, if other files
20 // instantiate templates or use macros or inline functions from this
21 // file, or you compile this file and link it with other files to produce
22 // an executable, this file does not by itself cause the resulting
23 // executable to be covered by the GNU General Public License. This
24 // exception does not however invalidate any other reasons why the
25 // executable file might be covered by the GNU General Public License.
26 
27 #ifndef MLN_LITERAL_COLORS_HH
28 # define MLN_LITERAL_COLORS_HH
29 
33 
34 # include <mln/core/concept/literal.hh>
35 
36 namespace mln
37 {
38 
39  namespace literal
40  {
41 
43  struct red_t : public Literal<red_t>
44  {
45  // This default constructor is needed for compilation with gcc
46  // 4.6.0, gcc 4.6.1 and Clang.
47  red_t();
48  };
49 
51  struct green_t : public Literal<green_t>
52  {
53  // This default constructor is needed for compilation with gcc
54  // 4.6.0, gcc 4.6.1 and Clang.
55  green_t();
56  };
57 
59  struct blue_t : public Literal<blue_t>
60  {
61  // This default constructor is needed for compilation with gcc
62  // 4.6.0, gcc 4.6.1 and Clang.
63  blue_t();
64  };
65 
67  struct brown_t : public Literal<brown_t>
68  {
69  // This default constructor is needed for compilation with gcc
70  // 4.6.0, gcc 4.6.1 and Clang.
71  brown_t();
72  };
73 
75  struct lime_t : public Literal<lime_t>
76  {
77  // This default constructor is needed for compilation with gcc
78  // 4.6.0, gcc 4.6.1 and Clang.
79  lime_t();
80  };
81 
83  struct orange_t : public Literal<orange_t>
84  {
85  // This default constructor is needed for compilation with gcc
86  // 4.6.0, gcc 4.6.1 and Clang.
87  orange_t();
88  };
89 
91  struct pink_t : public Literal<pink_t>
92  {
93  // This default constructor is needed for compilation with gcc
94  // 4.6.0, gcc 4.6.1 and Clang.
95  pink_t();
96  };
97 
99  struct purple_t : public Literal<purple_t>
100  {
101  // This default constructor is needed for compilation with gcc
102  // 4.6.0, gcc 4.6.1 and Clang.
103  purple_t();
104  };
105 
107  struct teal_t : public Literal<teal_t>
108  {
109  // This default constructor is needed for compilation with gcc
110  // 4.6.0, gcc 4.6.1 and Clang.
111  teal_t();
112  };
113 
115  struct violet_t : public Literal<violet_t>
116  {
117  // This default constructor is needed for compilation with gcc
118  // 4.6.0, gcc 4.6.1 and Clang.
119  violet_t();
120  };
121 
123  struct cyan_t : public Literal<cyan_t>
124  {
125  // This default constructor is needed for compilation with gcc
126  // 4.6.0, gcc 4.6.1 and Clang.
127  cyan_t();
128  };
129 
131  struct magenta_t : public Literal<magenta_t>
132  {
133  // This default constructor is needed for compilation with gcc
134  // 4.6.0, gcc 4.6.1 and Clang.
135  magenta_t();
136  };
137 
139  struct yellow_t : public Literal<yellow_t>
140  {
141  // This default constructor is needed for compilation with gcc
142  // 4.6.0, gcc 4.6.1 and Clang.
143  yellow_t();
144  };
145 
147  struct olive_t : public Literal<olive_t>
148  {
149  // This default constructor is needed for compilation with gcc
150  // 4.6.0, gcc 4.6.1 and Clang.
151  olive_t();
152  };
153 
155  extern const red_t red;
156 
158  extern const green_t green;
159 
161  extern const blue_t blue;
162 
164  extern const brown_t brown;
165 
167  extern const lime_t lime;
168 
170  extern const orange_t orange;
171 
173  extern const pink_t pink;
174 
176  extern const purple_t purple;
177 
179  extern const teal_t teal;
180 
182  extern const violet_t violet;
183 
185  extern const cyan_t cyan;
186 
188  extern const magenta_t magenta;
189 
191  extern const yellow_t yellow;
192 
194  extern const olive_t olive;
195 
196 # ifndef MLN_INCLUDE_ONLY
197 
198  inline
199  red_t::red_t()
200  {
201  }
202 
203  inline
205  {
206  }
207 
208  inline
210  {
211  }
212 
213  inline
215  {
216  }
217 
218  inline
220  {
221  }
222 
223  inline
225  {
226  }
227 
228  inline
230  {
231  }
232 
233  inline
235  {
236  }
237 
238  inline
240  {
241  }
242 
243  inline
245  {
246  }
247 
248  inline
250  {
251  }
252 
253  inline
255  {
256  }
257 
258  inline
260  {
261  }
262 
263  inline
265  {
266  }
267 
268 # ifndef MLN_WO_GLOBAL_VARS
269 
270  const red_t red;
271 
272  const green_t green;
273 
274  const blue_t blue;
275 
276  const brown_t brown;
277 
278  const lime_t lime;
279 
280  const orange_t orange;
281 
282  const pink_t pink;
283 
284  const purple_t purple;
285 
286  const teal_t teal;
287 
288  const violet_t violet;
289 
290  const cyan_t cyan;
291 
292  const magenta_t magenta;
293 
294  const yellow_t yellow;
295 
296  const olive_t olive;
297 
298 # endif
299 
300 # endif
301 
302  } // end of namespace mln::literal
303 
304 } // end of namespace mln
305 
306 // White and black are color too.
307 # include <mln/literal/white.hh>
308 # include <mln/literal/black.hh>
309 
310 #endif // ! MLN_LITERAL_COLORS_HH