Struct BlackboardKeyInfo

Struct Documentation

struct BlackboardKeyInfo

Information about a blackboard key including name and optional default value.

Public Functions

BlackboardKeyInfo() = default

Default constructor.

inline explicit BlackboardKeyInfo(std::string key_name)

Constructor with key name only.

Parameters:

key_name – The name of the blackboard key.

inline BlackboardKeyInfo(std::string key_name, std::string key_description)

Constructor with key name and description.

Parameters:
  • key_name – The name of the blackboard key.

  • key_description – Human-readable description of the blackboard key.

template<typename T>
inline BlackboardKeyInfo(std::string key_name, std::string key_description, T value)

Constructor with key name, default value and description.

Template Parameters:

T – The type of the default value.

Parameters:
  • key_name – The name of the blackboard key.

  • key_description – Human-readable description of the blackboard key.

  • value – The default value.

inline BlackboardKeyInfo(std::string key_name, std::string key_description, const char *value)

Constructor with key name, default value and description for const char *.

Parameters:
  • key_name – The name of the blackboard key.

  • key_description – Human-readable description of the blackboard key.

  • value – The default value.

template<typename T>
inline T get_default_value() const

Retrieve the default value as the given type.

Template Parameters:

T – The type to cast the default value to.

Returns:

The default value.

Public Members

std::string name

The name of the key.

std::string description

Human-readable description of the key.

bool has_default = {false}

Whether this key has a default value.

std::shared_ptr<void> default_value = {}

The default value stored as a shared pointer to void (similar to Blackboard)

std::string default_value_type = {}

The type name of the default value.

std::function<void(Blackboard&, const std::string&)> inject_default = {}

Function to inject the default value into a blackboard at the given key.