38 #ifndef RIEGL_RDB_POINTCLOUD_MANAGEMENT_HPP
39 #define RIEGL_RDB_POINTCLOUD_MANAGEMENT_HPP
56 namespace pointcloud {
72 explicit Management(riegl::rdb::PointcloudData* pointcloud);
124 void *userdata =
nullptr
132 template<
typename Callable>
135 typedef typename std::decay<Callable>::type CallableType;
137 &progress_proxy_callable<CallableType>,
138 const_cast<CallableType*>(&progress)
147 template<
typename Receiver>
148 void vacuum(
void (Receiver::*progress)(std::uint8_t), Receiver &receiver)
150 auto userdata = std::make_pair(progress, &receiver);
151 this->
vacuum(&progress_proxy_receiver<Receiver>, &userdata);
160 template<
typename Receiver>
161 void vacuum(
void (Receiver::*progress)(std::uint8_t)
const,
const Receiver &receiver)
163 auto userdata = std::make_pair(progress, &receiver);
164 this->
vacuum(&progress_proxy_receiver<Receiver>, &userdata);
200 const std::string &schema,
201 const bool strict=
false
205 riegl::rdb::PointcloudData *data;
207 template<
typename Callable>
208 static void progress_proxy_callable(std::uint8_t progress,
void *userdata)
212 Callable &callback = *reinterpret_cast<Callable*>(userdata);
221 template<
typename Receiver>
222 static void progress_proxy_receiver(std::uint8_t progress,
void *userdata)
226 typedef void (Receiver::*Function)(std::uint8_t);
227 auto data(
reinterpret_cast<std::pair<Function, Receiver*>*
>(userdata));
228 (*data->second.*data->first)(progress);
239 #endif // RIEGL_RDB_POINTCLOUD_MANAGEMENT_HPP