ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccObject.cpp File Reference
#include <pybind11/native_enum.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/stl_bind.h>
#include <ecvBBox.h>
#include <ecvGenericDisplayTools.h>
#include <ecvHObject.h>
#include <ecvObject.h>
#include <ecvShiftedObject.h>
#include "../casters.h"
Include dependency graph for ccObject.cpp:

Go to the source code of this file.

Functions

void removePatient (py::object &nurse, py::object &patient)
 
void setDeletable (py::object &object, bool state)
 
template<typename T >
py::object castToFakeOwnedObject (T &&obj)
 
void define_ccObject (py::module &m)
 

Function Documentation

◆ castToFakeOwnedObject()

template<typename T >
py::object castToFakeOwnedObject ( T &&  obj)

This is a hack.

This function creates a py::object from a value but it makes the object think it does not own the data so when the ref count reaches 0 it does no call the destructor unless setDeletable(obj, true) was called in between

Definition at line 70 of file ccObject.cpp.

References setDeletable().

Referenced by define_ccObject().

◆ define_ccObject()

◆ removePatient()

void removePatient ( py::object &  nurse,
py::object &  patient 
)

Definition at line 26 of file ccObject.cpp.

Referenced by define_ccObject().

◆ setDeletable()

void setDeletable ( py::object &  object,
bool  state 
)

Definition at line 51 of file ccObject.cpp.

Referenced by castToFakeOwnedObject(), and define_ccObject().