stlab.adobe.com Adobe Systems Incorporated
sheet.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2005-2007 Adobe Systems Incorporated
3  Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
4  or a copy at http://stlab.adobe.com/licenses.html)
5 */
6 
7 /*************************************************************************************************/
8 
9 #ifndef ADOBE_SHEET_HPP
10 #define ADOBE_SHEET_HPP
11 
12 /*************************************************************************************************/
13 
14 #include <adobe/config.hpp>
15 
16 /*************************************************************************************************/
17 
18 namespace adobe {
19 
20 /*************************************************************************************************/
21 
22 #ifdef ADOBE_CONCEPTS
23 
24 /*************************************************************************************************/
25 
26 auto concept BasicSheetConcept<typename T> {};
27 
28 /*************************************************************************************************/
29 
30 auto concept SheetConcept<typename T> : BasicSheetConcept<T>
31 {
32  void touch(T& t, const name_t*, const name_t*);
33 };
34 
35 /*************************************************************************************************/
36 
37 auto concept SheetMFConcept<typename T> : BasicSheetConcept<T>
38 {
39  void T::touch(const name_t*, const name_t*);
40 };
41 
42 /*************************************************************************************************/
43 
44 template <SheetMFConcept T>
45 concept_map SheetConcept<T>
46 {
47  inline void touch(T& t, const name_t* x, const name_t* y)
48  {
49  t.touch(x, y);
50  }
51 };
52 
53 /*************************************************************************************************/
54 
55 template <BasicSheetConcept T>
56 concept_map BasicSheetConcept<boost::reference_wrapper<T> > {};
57 
58 /*************************************************************************************************/
59 
60 template <SheetConcept T>
61 concept_map SheetConcept<boost::reference_wrapper<T> >
62 {
63  inline void touch(boost::reference_wrapper<T>& r, const name_t* x, const name_t* y)
64  {
65  SheetConcept<T>::touch(static_cast<T&>(r), x, y);
66  }
67 };
68 
69 /*************************************************************************************************/
70 
71 #endif
72 
73 /*************************************************************************************************/
74 
75 }
76 
77 /*************************************************************************************************/
78 
79 #endif

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google