File: initialize.adoc

package info (click to toggle)
boost1.90 1.90.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 593,168 kB
  • sloc: cpp: 4,190,642; xml: 196,648; python: 34,618; ansic: 23,145; asm: 5,468; sh: 3,776; makefile: 1,162; perl: 1,020; sql: 728; ruby: 676; yacc: 478; java: 77; lisp: 24; csh: 6
file content (57 lines) | stat: -rw-r--r-- 1,551 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

## initialize

### Synopsis

Defined in `<boost/openmethod/initialize.hpp>`.

```c++
namespace boost::openmethod {

template<class Policy = BOOST_OPENMETHOD_DEFAULT_REGISTRY>
auto initialize() -> /*unspecified*/;

}
```

### Description

Initializes dispatch data for the methods registered in `Policy`. This function
must be called before any calls to those methods, and after loading or unloading
a dynamic library that adds classes, methods or overriders to `Policy`.

The return value is an object that contains a member variable, `report`, that
contains the following information:

* `std::size_t cells`: the number of cells used by the v-tables and the multiple
dispatch tables.

* `std::size_t not_implemented`: the number of methods that don't have an
overrider for at least one combination of virtual arguments.

* `std::size_t ambiguous`: the number of methods that have more than one
overrider, none of which is more specific than the others, for at least one
combination of virtual arguments.

## finalize

### Synopsis

Defined in `<boost/openmethod/initialize.hpp>`.

```c++
namespace boost::openmethod {

template<class Policy = BOOST_OPENMETHOD_DEFAULT_REGISTRY>
auto finalize() -> void;

}
```

### Description

De-allocates the resources allocated by `initialize` for the `Policy`, including
resources allocated by the policys in `Policy`. Resources are de-allocated in an
arbitrary order. It is not necessary to call `finalize` between calls to
`initialize`. It is provided mainly for the benefit of memory leak detection
schemes.