29 #ifndef DATATOOLS_CONFIGURATION_VARIANT_REPOSITORY_H 30 #define DATATOOLS_CONFIGURATION_VARIANT_REPOSITORY_H 49 namespace configuration {
51 class variant_registry;
52 class variant_registry_manager;
53 class variant_reporting;
74 std::string & registry_name_,
75 std::string & variant_path_,
93 const std::string &
get_name()
const;
142 std::shared_ptr<variant_registry_manager> _embedded_manager_;
143 std::shared_ptr<variant_registry> _embedded_registry_;
145 bool _last_active_ =
false;
146 bool _sealed_ =
false;
202 virtual void tree_dump(std::ostream & out_ = std::clog,
203 const std::string & title_ =
"",
204 const std::string & indent_ =
"",
205 bool inherit_ =
false)
const;
214 bool has_registry(
const std::string & registry_name_)
const;
233 const std::string & top_variant_name_ =
"",
234 const std::string & registry_name_ =
"",
235 const std::string & registry_display_name_ =
"",
236 const std::string & registry_terse_description_ =
"",
237 int registry_rank_ = -1,
242 const std::string & registry_name_ =
"",
252 bool is_ranked(
const std::string & registry_name_)
const;
255 int get_rank(
const std::string & registry_name_)
const;
262 const std::string & variant_path_)
const;
289 bool has_variant(
const std::string & registry_key_,
290 const std::string & variant_path_)
const;
294 const std::string & variant_parameter_path_)
const;
308 void print_rst(std::ostream & out_, uint32_t flags_ = 0)
const;
351 bool _noclear_ =
false;
352 bool _dont_ignore_unknown_registries_ =
false;
353 bool _dont_ignore_unknown_orgapp_ =
false;
355 std::vector<std::string> _settings_;
356 std::string _current_registry_name_;
357 std::string _current_setting_;
382 bool _noclear_ =
false;
383 bool _noorgapp_ =
false;
385 std::string _settings_key_;
387 std::vector<std::string> _settings_;
388 std::string _current_registry_name_;
393 registry_entry &
_add_entry(
const std::string & registry_name_,
int rank_ = -1);
407 bool _initialized_ =
false;
410 std::string _organization_;
411 std::string _application_;
412 bool _requested_lock_ =
false;
415 bool _locked_ =
false;
418 std::vector<std::string> _unranked_;
419 std::unique_ptr<variant_dependency_model> _dependency_model_;
428 #endif // DATATOOLS_CONFIGURATION_VARIANT_REPOSITORY_H
void set_rank(int)
Set the rank of the registry.
bool is_external() const
Check if the registry is external.
void seal()
Place seal on the registry.
bool is_embedded() const
Check if the registry is embedded.
bool is_sealed() const
Check if registry is sealed (non mutable)
~registry_entry()
Destructor.
Entry that hosts a variant registry.
Definition: variant_repository.h:79
void set_external_registry(variant_registry &)
Set the external registry.
void reset_external_registry()
Reset the external registry.
const std::string & get_name() const
Return the registry name.
variant_registry & grab_registry()
Return the mutable handle to the registry.
bool has_rank() const
Check if rank is set.
const variant_repository & get_parent_repository() const
Return the handle to the parent repository.
bool is_valid() const
Check if the entry is valid.
registry_entry(variant_repository &)
Constructor.
void set_name(const std::string &)
Set the registry name.
int get_rank() const
Get the rank of the registry.
const variant_registry & get_registry() const
Return the handle to the registry.