Adding wrapper for CFArray, updating other wrappers
This commit is contained in:
@@ -165,6 +165,19 @@ public:
|
||||
: m_ptr(NULL)
|
||||
{}
|
||||
|
||||
/*! @method wxCFRef
|
||||
@abstract Assumes ownership of p and creates a reference to it.
|
||||
@param p The raw core foundation reference to assume ownership of. May be NULL.
|
||||
@discussion Like shared_ptr, it is assumed that the caller has a strong reference to p and intends
|
||||
to transfer ownership of that reference to this ref holder. If the object comes from
|
||||
a Create or Copy method then this is the correct behaviour. If the object comes from
|
||||
a Get method then you must CFRetain it yourself before passing it to this constructor.
|
||||
A handy way to do this is to use the non-member wxCFRefFromGet factory funcion.
|
||||
*/
|
||||
wxCFRef(refType p) : m_ptr(p)
|
||||
{
|
||||
|
||||
}
|
||||
/*! @method wxCFRef
|
||||
@abstract Assumes ownership of p and creates a reference to it.
|
||||
@templatefield otherType Any type.
|
||||
@@ -177,6 +190,7 @@ public:
|
||||
This method is templated and takes an otherType *p. This prevents implicit conversion
|
||||
using an operator refType() in a different ref-holding class type.
|
||||
*/
|
||||
|
||||
template <class otherType>
|
||||
explicit wxCFRef(otherType *p)
|
||||
: m_ptr(p) // Implicit conversion from otherType* to refType should occur.
|
||||
|
Reference in New Issue
Block a user