| RDB 2

progress.hpp
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 *
4 * Copyright 2026 RIEGL Laser Measurement Systems
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * SPDX-License-Identifier: Apache-2.0
19 *
20 *******************************************************************************
21 */
22 /*!
23 *******************************************************************************
24 *
25 * \file progress.hpp
26 * \author RIEGL LMS GmbH, Austria
27 * \brief Operation progress feedback tools
28 * \version 2016-06-14/AW: Initial version
29 *
30 *******************************************************************************
31 */
32
33 #ifndef RIEGL_RDB_PROGRESS_HPP
34 #define RIEGL_RDB_PROGRESS_HPP
35
36 //---< INCLUDES >---------------------------------------------------------------
37
38 #include <cstdlib>
39 #include <cstdint>
40
41 //---< NAMESPACE >--------------------------------------------------------------
42
43 namespace riegl {
44 namespace rdb {
45
46 //---< TYPES >------------------------------------------------------------------
47
48 //______________________________________________________________________________
49 /*!
50 * \brief Progress callback function type
51 *
52 * Various RDB API functions may accept an optional progress function pointer.
53 * That progress function will be called by the API function on a regular basis
54 * to communicate the progress of the operation to the client application.
55 *
56 * Along with the function pointer a pointer to some user data may be provided
57 * to the API function. This pointer will then be provided to the callback
58 * function which can use it to get or store some context information. Please
59 * note that the library doesn't use the user data in any way - it is just
60 * relayed from the caller to the progress callback function.
61 *
62 * It is guaranteed that the callback function is only called from within the
63 * API function (i.e. it is not called after the API function returned). But
64 * it is =NOT= guaranteed that the callback function is called from within the
65 * same thread context as the API function.
66 */
67 typedef void (*Progress)(
68 std::uint8_t progress, //!< progress value in percent [0..100%]
69 void *userdata //!< pointer to user (client) data
70 );
71
72 }} // namespace riegl::rdb
73
74 #endif // RIEGL_RDB_PROGRESS_HPP
riegl::rdb::Progress
void(* Progress)(std::uint8_t progress, void *userdata)
Progress callback function type.
Definition: progress.hpp:67
riegl
RIEGL Laser Measurement Systems GmbH, Austria.
Definition: context.hpp:48