Viam C++ SDK current
Loading...
Searching...
No Matches
instance.hpp
1#pragma once
2
3#include <memory>
4
5namespace viam {
6namespace sdk {
7
8namespace impl {
9class Tracer;
10} // namespace impl
11
17class Instance {
18 public:
20 enum class Creation {
23 };
24
25 Instance();
26 ~Instance();
27
32
33 private:
34 friend class Registry;
35 friend class LogManager;
36 friend class impl::Tracer;
37
38 struct Impl;
39 std::unique_ptr<Impl> impl_;
40};
41
42} // namespace sdk
43} // namespace viam
Instance management for Viam C++ SDK applications. This is a single instance class which is responsib...
Definition instance.hpp:17
static Instance & current(Creation)
Get the current Instance according to the Creation behavior.
Creation
Enumeration for creation behavior of current.
Definition instance.hpp:20
@ if_needed
Use existing instance if present, else create one.
@ open_existing
Instance must already exist.
Manages the logging infrastructure in the SDDK.
Definition logging.hpp:67
A registry of known resources.
Definition registry.hpp:107
Holds the SDK-side OpenTelemetry tracer provider. Spans go nowhere until initialize_provider installs...
Definition tracer.hpp:18
Definition instance.hpp:11