class RRef : public RRefBase |
Contains, or packages, a copy of an instance of another class.
The template parameter defines the type of the contained object.
The contained object is held in allocated memory, and can be accessed through the member selection and dereference operators.
Public Member Functions | |
---|---|
RRef () | |
RRef (const RRef < T > &) | |
void | Alloc (const T &) |
void | Alloc (const T &, TInt ) |
void | AllocL (const T &) |
void | AllocL (const T &, TInt ) |
operator T * () | |
T * | operator-> () |
void | operator= (const RRef < T > &) |
Inherited Attributes | |
---|---|
RRefBase::iPtr |
RRef | ( | const RRef < T > & | anObject | ) | [inline] |
Copy constructor.
The constructor frees any existing contained object, and takes ownership of the object owned by anObject.
const RRef < T > & anObject | A reference to another 'reference' object. On return from this constructor, anObject may be safely orphaned if it lives on the program stack. |
void | Alloc | ( | const T & | anObject | ) | [inline] |
Creates a copy of the specified object, which is to be contained by this reference object.
The amount of memory set aside to contain the object is defined by the size of the object
const T & anObject | The object to be packaged up by this reference object. |
void | Alloc | ( | const T & | anObject, |
TInt | aSize | |||
) | [inline] |
Creates a copy of the specified object, which is to be contained by this reference object.
The amount of memory set aside to contain the object is defined by aSize.
const T & anObject | The object to be packaged up by this reference object. |
TInt aSize | The amount of memory to be set aside to contain the object. You must make sure that this is big enough. |
void | AllocL | ( | const T & | anObject | ) | [inline] |
Creates a copy of the specified object, which is to be contained by this reference object, and leaves on failure.
The amount of memory set aside to contain the object is defined by the size of the object
const T & anObject | The object to be packaged up by this reference object. |
void | AllocL | ( | const T & | anObject, |
TInt | aSize | |||
) | [inline] |
Creates a copy of the specified object, which is to be contained by this reference object, and leaves on failure.
The amount of memory set aside to contain the object is defined by aSize.
const T & anObject | The object to be packaged up by this reference object. |
TInt aSize | The amount of memory to be set aside to contain the object. You must make sure that this is big enough. |
void | operator= | ( | const RRef < T > & | anObject | ) | [inline] |
Assignment operator.
The constructor frees any existing contained object, and takes ownership of the object owned by anObject.
const RRef < T > & anObject | A reference to another 'reference' object. On return from this constructor, anObject may be safely orphaned if it lives on the program stack. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.