ListAssignmentProxy.h
Go to the documentation of this file.
1 #ifndef _utl_ListAssignmentProxy_h_
2 #define _utl_ListAssignmentProxy_h_
3 
4 
5 namespace utl {
6 
7 
8  template<class T>
9  class Identity {
10  public:
11  typedef T Type;
12  };
13 
14 
28  template<class Assignee, unsigned int i = 1>
30  public:
31  template<typename Element>
33  operator,(const Element& e)
34  {
35  fAssignee[i] = e;
37  }
38 
39  private:
40  ListVectorAssignmentProxy(Assignee& v) : fAssignee(v) { }
41 
42  Assignee& fAssignee;
43 
44 #if __cplusplus < 201103L && !defined(__clang__)
45  friend class Identity<Assignee>::Type;
46 #else
47  friend typename Identity<Assignee>::Type;
48 #endif
49 
50  friend class ListVectorAssignmentProxy<Assignee, i-1>;
51  };
52 
53 
54  template<class Assignee, unsigned int n, unsigned int i = 1>
56  public:
57  template<typename Element>
59  operator,(const Element& e)
60  {
61  fAssignee[i/n][i%n] = e;
63  }
64 
65  private:
67 
68  Assignee& fAssignee;
69 
70 #if __cplusplus < 201103L && !defined(__clang__)
71  friend class Identity<Assignee>::Type;
72 #else
73  friend typename Identity<Assignee>::Type;
74 #endif
75 
76  friend class ListMatrixAssignmentProxy<Assignee, n, i-1>;
77  };
78 
79 
80 }
81 
82 
83 #endif
ListMatrixAssignmentProxy< Assignee, n, i+1 > operator,(const Element &e)
ListVectorAssignmentProxy< Assignee, i+1 > operator,(const Element &e)
Type
The type of file that we are acutally opening.
Definition: IoCodes.h:33
constexpr double m
Definition: AugerUnits.h:121

, generated on Tue Sep 26 2023.