Subversion
init.hpp
Go to the documentation of this file.
1 /**
2  * @file svnxx/init.hpp
3  * @copyright
4  * ====================================================================
5  * Licensed to the Apache Software Foundation (ASF) under one
6  * or more contributor license agreements. See the NOTICE file
7  * distributed with this work for additional information
8  * regarding copyright ownership. The ASF licenses this file
9  * to you under the Apache License, Version 2.0 (the
10  * "License"); you may not use this file except in compliance
11  * with the License. You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing,
16  * software distributed under the License is distributed on an
17  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18  * KIND, either express or implied. See the License for the
19  * specific language governing permissions and limitations
20  * under the License.
21  * ====================================================================
22  * @endcopyright
23  */
24 
25 #ifndef SVNXX_INIT_HPP
26 #define SVNXX_INIT_HPP
27 
28 #include <memory>
29 
30 namespace apache {
31 namespace subversion {
32 namespace svnxx {
33 
34 namespace detail {
35 // Forward declaration of the private API context.
36 class global_state;
37 } // namespace detail
38 
39 /**
40  * @brief SVN++ initialization.
41  *
42  * The @c init class takes care of library initialization and
43  * teardown and maintains shared (global) internal state. You must
44  * create an @c init object before you can use the SVN++ API. It is
45  * safe to create create any number of these objects.
46  */
47 class init : private std::shared_ptr<detail::global_state>
48 {
49  using state = std::shared_ptr<detail::global_state>;
50 
51 public:
52  init();
53  ~init() noexcept;
54 };
55 
56 } // namespace svnxx
57 } // namespace subversion
58 } // namespace apache
59 
60 #endif // SVNXX_INIT_HPP
apache::subversion::svnxx::init
SVN++ initialization.
Definition: init.hpp:47