Foxit PDF Conversion SDK
|
Inherits CFX_Object.
Classes | |
class | CountedObj |
Define a class here derived from user data class, with an additional reference count member. More... | |
Public Types | |
typedef CFX_CountRef< ObjClass > | Ref |
Type definition: it is used short for CFX_CountRef<ObjClass>. | |
Public Member Functions | |
CFX_CountRef () | |
Construct a null reference. | |
CFX_CountRef (const Ref &ref) | |
Copy constructor from another reference. More... | |
~CFX_CountRef () | |
Destruct a reference and release the object it refers to. | |
void | Decref () |
Decrease the reference. More... | |
ObjClass * | GetModify () |
Get a modifiable copy of the object. More... | |
const ObjClass * | GetObjectA () const |
Get a pointer of constant object. This pointer can't be used to alter the object content. More... | |
void | Incref () |
Increase the reference. More... | |
FX_BOOL | IsNull () const |
Check if the pointer of the object is NULL. More... | |
ObjClass * | New () |
Create a new object and refer to it. The returned pointer to the object can be used to modify the content of objects. More... | |
FX_BOOL | NotNull () const |
Check if the pointer of the object is not NULL. More... | |
operator const ObjClass * () const | |
This casting operator get a pointer of the constant object. More... | |
void | operator= (const Ref &ref) |
Assignment(=) operator overload. Assign from another reference. More... | |
void | operator= (void *p) |
assignment(=) operator overload. Assign from a typeless pointer. More... | |
FX_BOOL | operator== (const Ref &ref) const |
Comparison(==) operator overload. Compare with another reference. More... | |
int | RefCount () const |
Get the reference count. More... | |
void | SetNull () |
Set the pointer of the object to be null. More... | |
The class represents accessor of reference counted object. To use reference counted objects, application can use this template with particular object class.
|
inline |
Copy constructor from another reference.
[in] | ref | The input reference. |
|
inline |
Decrease the reference.
|
inline |
Get a modifiable copy of the object.
If the reference was refer to null, then a new object will be created. The returned pointer can be used to alter the object content.
|
inline |
Get a pointer of constant object. This pointer can't be used to alter the object content.
|
inline |
Increase the reference.
|
inline |
Check if the pointer of the object is NULL.
|
inline |
Create a new object and refer to it. The returned pointer to the object can be used to modify the content of objects.
|
inline |
Check if the pointer of the object is not NULL.
|
inline |
This casting operator get a pointer of the constant object.
|
inline |
Assignment(=) operator overload. Assign from another reference.
[in] | ref | The input reference. |
|
inline |
assignment(=) operator overload. Assign from a typeless pointer.
[in] | p | It must be zero. Other value is not valid. |
|
inline |
Comparison(==) operator overload. Compare with another reference.
[in] | ref | Another Ref object. |
|
inline |
Get the reference count.
|
inline |
Set the pointer of the object to be null.