parent
83a261d23f
commit
88b37e83bb
|
@ -0,0 +1,4 @@
|
|||
build
|
||||
.yotta.json
|
||||
yotta_modules
|
||||
yotta_targets
|
|
@ -80,10 +80,35 @@ public:
|
|||
*/
|
||||
int getReferences();
|
||||
|
||||
/**
|
||||
* De-reference operator overload. This makes modifying ref-counted POD
|
||||
* easier.
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* ManagedType<int> x = 0;
|
||||
* *x = 1; // mutates the ref-counted integer
|
||||
*/
|
||||
T& operator*() {
|
||||
return *object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method call operator overload. This forwards the call to the underlying
|
||||
* object.
|
||||
*
|
||||
* Example:
|
||||
* @code
|
||||
* ManagedType<T> x = new T();
|
||||
* x->m(); // resolves to T::m
|
||||
*/
|
||||
T* operator->() {
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* x.get() is shorthand for x.operator->()
|
||||
*/
|
||||
T* get() {
|
||||
return object;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue