Skip to content

Lazy

Lazily produce a value.

Can be used to return a string, list or numeric value whose actual value will only be calculated later, during synthesis.

Static Functions

Name Description
any_value No description.
list_value No description.
number_value No description.
string_value No description.

any_value

import ros_cdk_core
ros_cdk_core.Lazy.any_value(
  producer: IAnyProducer,
  display_hint: str = None,
  omit_empty_array: bool = None
)

producerRequired


display_hintOptional

  • Type: str
  • Default: No hint

Use the given name as a display hint.


omit_empty_arrayOptional

  • Type: bool
  • Default: false

If the produced value is an array and it is empty, return 'undefined' instead.


list_value

import ros_cdk_core
ros_cdk_core.Lazy.list_value(
  producer: IListProducer,
  display_hint: str = None,
  omit_empty: bool = None
)

producerRequired


display_hintOptional

  • Type: str
  • Default: No hint

Use the given name as a display hint.


omit_emptyOptional

  • Type: bool
  • Default: false

If the produced list is empty, return 'undefined' instead.


number_value

import ros_cdk_core
ros_cdk_core.Lazy.number_value(
  producer: INumberProducer
)

producerRequired


string_value

import ros_cdk_core
ros_cdk_core.Lazy.string_value(
  producer: IStringProducer,
  display_hint: str = None
)

producerRequired


display_hintOptional

  • Type: str
  • Default: No hint

Use the given name as a display hint.