35 template<
typename T,
typename SMART >
40 SMART
const &smart()
const {
return *
this; }
42 void _delete()
throw()
47 Cap<T> release()
const throw()
72 template<
typename O >
74 { T* __t = ((O*)100); (void)__t; }
76 template<
typename O >
79 { T* __t = ((O*)100); (void)__t; }
81 template<
typename O >
83 :
Cap_base(SMART::copy(o)), SMART(o.smart())
84 { T* __t = ((O*)100); (void)__t; }
87 :
Cap_base(SMART::copy(o)), SMART(o.smart())
90 template<
typename O >
92 { T* __t = ((O*)100); (void)__t; }
100 template<
typename O >
104 _c = this->SMART::copy(o).cap();
105 this->SMART::operator = (o.smart());
115 _c = this->SMART::copy(o).cap();
116 this->SMART::operator = (o.smart());
120 #if __cplusplus >= 201103L 121 template<
typename O >
123 :
Cap_base(o.release()), SMART(o.smart())
124 { T* __t = ((O*)100); (void)__t; }
127 :
Cap_base(o.release()), SMART(o.smart())
130 template<
typename O >
134 _c = o.release().cap();
135 this->SMART::operator = (o.smart());
145 _c = o.release().cap();
146 this->SMART::operator = (o.smart());
161 template<
typename T >
167 template<
typename O >
169 { T* __t = ((O*)100); (void)__t; }
171 template<
typename O,
typename S >
173 { T* __t = ((O*)100); (void)__t; }
175 Weak_cap(Weak_cap
const &o) :
Cap_base(o) {}
177 template<
typename O >
178 Weak_cap(Weak_cap<O>
const &o) :
Cap_base(o)
179 { T* __t = ((O*)100); (void)__t; }
183 namespace Cap_traits {
184 template<
typename T1,
typename T2 >
185 struct Type {
enum { Equal =
false }; };
187 template<
typename T1 >
188 struct Type<T1,T1> {
enum { Equal =
true }; };
201 template<
typename T,
typename F,
typename SMART >
205 (void)static_cast<T const *>(reinterpret_cast<F const *>(100));
220 template<
typename T,
typename F,
typename SMART >
Invalid capability selector.
l4_cap_idx_t _c
The C representation of a capability selector.
L4 low-level kernel interface.
unsigned long l4_cap_idx_t
L4 Capability selector Type.
L4::Cap related definitions.
Cap< T > cap_reinterpret_cast(Cap< F > const &c)
reinterpret_cast for capabilities.
Cap< T > operator->() const
Member access of a T.
l4_cap_idx_t cap() const
Return capability selector.
Cap_type
Invalid capability type.
Smart_cap(Cap< O > const &p)
Internal constructor, use to generate a capability from a this pointer.
Cap_base()
Create an uninitialized instance.
Base class for all kinds of capabilities.
Invalid capability selector.
Cap< T > cap_cast(Cap< F > const &c)
static_cast for capabilities.
C++ interface for capabilities.