Class BaseVars#

Inheritance Relationships#

Base Type#

  • public std::enable_shared_from_this< BaseVars >

Derived Types#

Class Documentation#

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

Common base class used by most simulation objects.

Subclassed by Karana::Core::LockingBaseVars, Karana::Dynamics::CELoopKinematicsBaseVars, Karana::Scene::SceneNodeVars, Karana::Scene::ScenePartSpecVars, Karana::Scene::SceneVars

Public Functions

BaseVars(const ks_ptr<BaseWithVars> &bwv)#

BaseVars constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.

Parameters:

bwv – The BaseWithVars that this BaseVars will be associated with.

virtual ~BaseVars()#

Destructor.

virtual NestedVars getAllVars() const#

Get all the Vars that this BaseVars has.

Returns:

A map of Vars, where the Var name is the key and the Var is the value.

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

Dump all of the Vars as a string.

Parameters:
  • prefix – The prefix to put in front of each Var.

  • depth – How many levels deep to dump. A negative value will dump all levels.

Returns:

A string with the information about all the Vars contained within.

void dump(std::string_view prefix = "", int depth = 0) const#

Dump all of the Vars to stdout.

Parameters:
  • prefix – The prefix to put in front of each Var.

  • depth – How many levels deep to dump. A negative value will dump all levels.

Public Static Functions

static Karana::Core::ks_ptr<BaseVars> create(const ks_ptr<BaseWithVars> &bwv)#

Create a new instance of BaseVars.

Parameters:

bwv – The BaseWithVars that this BaseVars will be associated with.

Returns:

A pointer to the newly created instance of BaseVars.

Protected Attributes

ks_ptr<BaseWithVars> _bwv = nullptr#

parent Base instance for the BaseVar instance