C++ Server-Side SDK
LaunchDarkly SDK
context_builder.hpp
1 #pragma once
2 
3 #include <launchdarkly/attributes_builder.hpp>
4 #include <launchdarkly/context.hpp>
5 
6 #include <string>
7 
8 namespace launchdarkly {
9 
62 class ContextBuilder final {
64 
65  public:
66  ContextBuilder() = default;
67 
77  ContextBuilder(Context const& context);
78 
91  AttributesBuilder<ContextBuilder, Context>& Kind(std::string const& kind,
92  std::string key);
93 
101  AttributesBuilder<ContextBuilder, Context>* Kind(std::string const& kind);
102 
112  Context Build() const;
113 
114  private:
115  std::map<std::string, AttributesBuilder<ContextBuilder, Context>> builders_;
116 };
117 
118 } // namespace launchdarkly
Definition: attributes_builder.hpp:22
Definition: context_builder.hpp:62
AttributesBuilder< ContextBuilder, Context > & Kind(std::string const &kind, std::string key)
Definition: context_builder.cpp:41
Context Build() const
Definition: context_builder.cpp:56
Definition: context.hpp:29