RDB 2
riegl
rdb
pointcloud
openSettings.hpp
Go to the documentation of this file.
1
/*
2
*******************************************************************************
3
*
4
* Copyright 2021 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 openSettings.hpp
26
* \author RIEGL LMS GmbH, Austria
27
* \brief Database open settings
28
* \version 2015-10-14/AW: Initial version
29
* \version 2016-09-22/AW: Parameter 'cacheSize' changed from 32 to 64 bit type
30
* \version 2016-12-19/AW: New functions to load/save settings from/to JSON
31
* \version 2017-03-28/AW: Documentation of JSON load/save functions updated
32
* \version 2017-11-24/AW: Constructors declared as "explicit" (#2825)
33
* \version 2019-02-15/AW: Fix C++ API wrapper of OpenSettings class
34
* \version 2020-02-21/AW: Class 'OpenSettings' is now context-free (#3544)
35
*
36
*******************************************************************************
37
*/
38
39
#ifndef RIEGL_RDB_POINTCLOUD_OPENSETTINGS_HPP
40
#define RIEGL_RDB_POINTCLOUD_OPENSETTINGS_HPP
41
42
//---< INCLUDES >---------------------------------------------------------------
43
44
#include <cstdint>
45
#include "
riegl/rdb/context.hpp
"
46
47
//---< NAMESPACE >--------------------------------------------------------------
48
49
namespace
riegl
{
50
namespace
rdb {
51
namespace
pointcloud {
52
53
//---< CLASS OpenSettings >-----------------------------------------------------
54
/*!
55
* \brief Database open settings
56
*
57
* This class defines settings for opening a point cloud database.
58
*/
59
class
OpenSettings
60
{
61
public
:
62
/*!
63
* \brief Point cache size
64
*
65
* The database engine may buffer read and write operations in an
66
* internal cache. This value defines the cache size in bytes (octets).
67
*
68
* Default: 500 MB
69
*/
70
uint64_t
cacheSize
;
71
72
public
:
73
~OpenSettings
();
74
75
/*!
76
* \brief Default constructor
77
*
78
* All properties are set to default values.
79
*/
80
OpenSettings
();
81
82
/// \deprecated since 2.2.3 - use the context-free constructors instead
83
explicit
OpenSettings
(
riegl::rdb::Context
&context);
84
85
/*!
86
* \brief Copy constructor
87
*
88
* All properties are copied from the given settings object.
89
*/
90
OpenSettings
(
const
OpenSettings
&settings);
91
92
/*!
93
* \brief Assignment operator
94
*
95
* All properties are copied from the given settings object.
96
*/
97
OpenSettings
&
operator=
(
const
OpenSettings
&settings);
98
99
/*!
100
* \brief Load settings from JSON string
101
*
102
* This function parses the given JSON string and applies all available
103
* properties - missing properties are silently ignored (i.e. the value
104
* remains unchanged). When parsing the JSON string fails, an exception
105
* is thrown.
106
*
107
* Example JSON string:
108
*
109
* {
110
* "cache_size": 524288000
111
* }
112
*/
113
void
load
(
const
std::string &json);
114
115
/*!
116
* \brief Save settings to JSON string
117
* \see load()
118
*/
119
std::string
save
()
const
;
120
121
private
:
122
friend
class
OpenSettingsWrapper
;
123
void
*data;
124
};
125
126
}}}
// namespace riegl::rdb::pointcloud
127
128
#endif // RIEGL_RDB_POINTCLOUD_OPENSETTINGS_HPP
riegl::rdb::pointcloud::OpenSettings::~OpenSettings
~OpenSettings()
riegl::rdb::pointcloud::OpenSettings::save
std::string save() const
Save settings to JSON string.
context.hpp
RDB library context.
riegl
RIEGL Laser Measurement Systems GmbH, Austria.
Definition:
context.hpp:48
riegl::rdb::pointcloud::OpenSettings::operator=
OpenSettings & operator=(const OpenSettings &settings)
Assignment operator.
riegl::rdb::pointcloud::OpenSettings
Database open settings.
Definition:
openSettings.hpp:59
riegl::rdb::pointcloud::OpenSettings::cacheSize
uint64_t cacheSize
Point cache size.
Definition:
openSettings.hpp:70
riegl::rdb::pointcloud::OpenSettings::OpenSettingsWrapper
friend class OpenSettingsWrapper
Definition:
openSettings.hpp:122
riegl::rdb::pointcloud::OpenSettings::OpenSettings
OpenSettings()
Default constructor.
riegl::rdb::pointcloud::OpenSettings::load
void load(const std::string &json)
Load settings from JSON string.
riegl::rdb::Context
Library context.
Definition:
context.hpp:70
Generated on Wed Jun 30 2021 08:19:20 for RDB 2 by
1.8.16