Template Class KModelVars#

Inheritance Relationships#

Base Type#

Class Documentation#

template<class T, class P = NoParams, class Sc = NoScratch, class S = NoDiscreteStates, class C = NoContinuousStates>
class KModelVars : public Karana::Core::LockingBaseVars#

This KModelVars template class is for KModel vars.

Public Functions

inline KModelVars(const kc::ks_ptr<const KModel<T, P, Sc, S, C>> &kmodel)#

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

Parameters:

kmodel – The KModel associated with this KModelVars.

inline ~KModelVars()#

Destructor.

inline virtual kc::NestedVars getAllVars() const override#

Get all the Vars that this KModel has.

Returns:

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

Public Static Functions

static inline kc::ks_ptr<KModelVars> create(const kc::ks_ptr<const KModel<T, P, Sc, S, C>> &kmodel)#

Create an instance of the KModelVars.

Parameters:

kmodel – The KModel associated with this KModelVars.

Returns:

A pointer to the newly created instance of KModelVars.

Protected Attributes

kc::ks_ptr<const KModel<T, P, Sc, S, C>> _kmodel#

The KModel associated with these vars.