Class Var#

Inheritance Relationships#

Base Type#

  • public std::enable_shared_from_this< Var >

Derived Type#

Class Documentation#

class Var : public std::enable_shared_from_this<Var>#

Base class for all Vars.

Subclassed by Karana::Core::Var_T< T >

Public Functions

Var(const Var&) = delete#
Var &operator=(const Var&) = delete#
Var(Var&&) = delete#
Var &operator=(Var&) = delete#
virtual VarType getType() const = 0#

Get the VarType for this Var.

Returns:

The VarType for this Var.

virtual std::string dumpString(std::string_view prefix = "") const = 0#

Get the value this Var holds as a string.

Parameters:

prefix – The prefix to put in front of each output line.

Returns:

The string representation of this Var.

const Karana::Core::id_t &id() const noexcept#

id of this object.

Returns:

id of this object.

std::string_view name() const noexcept#

Name of this Var.

Returns:

Name of this Var.

std::string_view description() const noexcept#

Description of this Var.

Returns:

Description of this Var.

std::string_view quantity() const noexcept#

Quantity type of this Var.

Returns:

Quantity type of this Var.

virtual ~Var()#

Destructor.

Protected Functions

Var(std::string_view name, std::string_view description, std::string_view quantity = "")#

Using the Base constructor.

It is protected, as a Var should never be created directly. Only Var_Ts should be created.

Parameters:
  • name – The name of the Var.

  • description – A description of the Var.

  • quantity – The quantity of the Var.

Protected Attributes

Karana::Core::id_t _id#

The unique id of the Var.

std::string _name#

The name of the Base.

std::string _description#

A description of the Base.

std::string _quantity#

The name of the Base.