Class BaseWithVars#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

Derived Types#

Class Documentation#

class BaseWithVars : public Karana::Core::Base#

Common base class used by most simulation objects.

Subclassed by Karana::Collision::ContactForceBase, Karana::Core::LockingBase, Karana::Dynamics::CELoopKinematicsBase, Karana::Dynamics::NodeDeformationProvider, Karana::Dynamics::TimeKeeper, Karana::Dynamics::TimedEvent, Karana::Integrators::Integrator, Karana::KUtils::H5Writer, Karana::KUtils::PlotData, Karana::Models::GravityInterface, Karana::Models::KModelContinuousStates, Karana::Models::KModelDiscreteStates, Karana::Models::KModelParams, Karana::Models::KModelScratch, Karana::Models::ProfileGenerator< T >, Karana::Scene::AbstractStaticGeometry, Karana::Scene::PhongMaterial, Karana::Scene::PhysicalMaterial, Karana::Scene::Scene, Karana::Scene::SceneNode, Karana::Scene::Texture

Public Functions

BaseWithVars(std::string_view name, const ks_ptr<BaseContainer> &container = nullptr)#

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

Parameters:
  • name – Name for the class.

  • container – The container to add the BaseWithVars too. If none is specified, the default singleton container will be used.

~BaseWithVars()#

Destructor.

BaseWithVars(const BaseWithVars &other)#

Copy constructor.

Parameters:

otherBaseWithVars class to copy.

BaseWithVars &operator=(const BaseWithVars &other) noexcept#

Copy assignment operator.

Parameters:

otherBaseWithVars class to copy.

Returns:

A reference to this object

BaseWithVars(BaseWithVars &&other) noexcept#

Move constructor.

Parameters:

otherBaseWithVars class to move.

BaseWithVars &operator=(BaseWithVars &&other) noexcept#

Move assignment operator.

Parameters:

otherBaseWithVars class to move.

Returns:

A reference to this object

virtual Karana::Core::ks_ptr<Karana::Core::BaseVars> getVars() const#

Get the vars for this object.

Returns:

The vars for this object.

virtual std::string dumpString(std::string_view prefix = "", const Base::DumpOptions *options = nullptr) const override#

Return information about the object.

Parameters:
  • prefix – A string to use as prefix for each output line

  • options – Struct with options to tailor the output

Returns:

String with the information about the object.

Public Static Functions

static ks_ptr<BaseWithVars> create(std::string_view name)#

Create an instance of BaseWithVars.

Parameters:

name – Name for the BaseWithVars class.

Returns:

A pointer to the newly created BaseWithVars class.

Protected Functions

virtual Karana::Core::ks_ptr<Karana::Core::BaseVars> _getVars() const#

Create the vars for this object.

Returns:

The vars for this object.

Protected Attributes

mutable std::weak_ptr<BaseVars> _vars#

Weak pointer to vars for this object.

struct DumpOptions : public Karana::Core::Base::DumpOptions#

Options for calling dumpString for BaseWithVars.

Subclassed by Karana::Core::LockingBase::DumpOptions

Public Functions

DumpOptions() = default#
DumpOptions &operator=(const DumpOptions &p)#

Copy assignment operator.

Parameters:

p – The DumpOptions to copy from.

Returns:

A reference to this.

DumpOptions(const DumpOptions &p)#

Copy constructor.

Parameters:

p – The DumpOptions to copy from.

virtual ~DumpOptions()#

Destructor.

Public Members

bool vars = true#

include Vars member dump output

int vars_depth = 0#

the depth to which to expand Vars dump output