PFObject¶
The objects of this class encapsulate one or more data streams, describing a protocol object.
-
tPF_ObjectType getType();¶
- Description:
Returns the object type.
-
void setType(tPF_ObjectType type);¶
- Description:
Sets the object type.
-
bool isReadOnly();¶
- Description:
Returns true if the object is read-only, i.e. posting it to the session has no effect.
-
void setReadOnly(bool value);¶
- Description:
Sets the read-only flag.
-
int getStreamCount();¶
- Description:
Returns the number of object streams.
-
PFStream *getStream(int index = 0);¶
- Description:
Returns a stream at the specified position.
-
void clear();
- Description:
Clears the object streams.
-
PFObject *clone();¶
- Description:
Creates a copy of the object.
-
PFObject *detach();¶
- Description:
Creates a copy of the object by moving all streams of the old object to the new one. The original object streams become empty. This method is useful as a faster alternative to clone(). For example, it makes sense to use detach() when implementing a queue of objects indicated via dataAvailable().
-
void free();¶
- Description:
Deletes the object if it was created via PFObject_create(), clone() or detach().