Safety Class Reference

#include <c4d_baseobject.h>

Detailed Description

Class to enable safe modification of objects under low memory conditions such that any failure can restore the object to its original form.

Note
Only backups tags (which includes points, polygons etc.).

Public Member Functions

 Safety ()
 
 ~Safety ()
 
Bool Init (BaseObject *op)
 
void Detach (void)
 

Private Attributes

ObjectSafety * os
 

Constructor & Destructor Documentation

◆ Safety()

Safety ( )

Default constructor.

◆ ~Safety()

~Safety ( )

Default destructor.

Member Function Documentation

◆ Init()

Bool Init ( BaseObject op)

Initializes the object ready for modification.

Parameters
[in]opThe object that is about to be changed. The caller owns the pointed object.
Returns
true if the class was initialized successfully and is ready for the object changes, otherwise false. If false then the operation should be terminated.

◆ Detach()

void Detach ( void  )

Releases the object from the class when modification is complete.

Note
If not called the class will restore the original state when it is destructed.
To keep the changes call Detach() before stack deconstruction of private member os.

Member Data Documentation

◆ os

ObjectSafety* os
private