Class Base#
Defined in File Base.h
Nested Relationships#
Nested Types#
Inheritance Relationships#
Base Type#
public std::enable_shared_from_this< Base >
Derived Types#
public Karana::Collision::ContactForceBase(Class ContactForceBase)public Karana::Core::LockingBase(Class LockingBase)public Karana::Dynamics::NodeDeformationProvider(Class NodeDeformationProvider)public Karana::Dynamics::TimeKeeper(Class TimeKeeper)public Karana::Dynamics::TimedEvent(Class TimedEvent)public Karana::KUtils::H5Writer(Class H5Writer)public Karana::Models::KModelContinuousStates(Class KModelContinuousStates)public Karana::Models::KModelDiscreteStates(Class KModelDiscreteStates)public Karana::Models::KModelParams(Class KModelParams)public Karana::Models::KModelScratch(Class KModelScratch)public Karana::Scene::AbstractStaticGeometry(Class AbstractStaticGeometry)public Karana::Scene::PhongMaterial(Class PhongMaterial)public Karana::Scene::PhysicalMaterial(Class PhysicalMaterial)public Karana::Scene::Scene(Class Scene)public Karana::Scene::SceneNode(Class SceneNode)public Karana::Scene::Texture(Class Texture)
Class Documentation#
-
class Base : public std::enable_shared_from_this<Base>#
Common base class used by most simulation objects.
Subclassed by Karana::Collision::ContactForceBase, Karana::Core::LockingBase, Karana::Dynamics::NodeDeformationProvider, Karana::Dynamics::TimeKeeper, Karana::Dynamics::TimedEvent, Karana::KUtils::H5Writer, Karana::Models::KModelContinuousStates, Karana::Models::KModelDiscreteStates, Karana::Models::KModelParams, Karana::Models::KModelScratch, Karana::Scene::AbstractStaticGeometry, Karana::Scene::PhongMaterial, Karana::Scene::PhysicalMaterial, Karana::Scene::Scene, Karana::Scene::SceneNode, Karana::Scene::Texture
Public Functions
-
Base(std::string_view name, const ks_ptr<BaseContainer> &container = nullptr)#
Base class constructor.
- Parameters:
name – Name for the base class.
container – The container to add the Base too. If none is specified, the default singleton container will be used.
-
virtual ~Base()#
Destructor.
-
Base &operator=(const Base &other) noexcept#
Copy assignment operator.
- Parameters:
other – Base class to copy.
- Returns:
A reference to this object
-
Base &operator=(Base &&other) noexcept#
Move assignment operator.
- Parameters:
other – Base class to move.
- Returns:
A reference to this object
-
virtual std::string_view typeString() const noexcept#
Returns the type string of Base.
- Returns:
The type string.
-
virtual bool isFinalized() const#
Checks is the params for the object have been initialized.
- Returns:
True if the params have set up.
-
std::string_view name() const noexcept#
Name of this object.
- Returns:
Name of this object.
-
virtual std::string dumpString(std::string_view prefix = "", const DumpOptions *options = nullptr) const#
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.
-
void dump(std::string_view prefix = "", const DumpOptions *options = nullptr) const#
Print dumpString on std::cout.
- Parameters:
prefix – A string to use as prefix for each output line
options – Struct with options to tailor the output
Protected Functions
-
struct DumpOptions#
A struct with options to tailor the content from a dumpString() call.
This struct can be sub-classed by specialized classes to add custom options.
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.
-
DumpOptions() = default#
-
Base(std::string_view name, const ks_ptr<BaseContainer> &container = nullptr)#