opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
object_property_edit.h
Go to the documentation of this file.
1#pragma once
2
3#include <functional>
4#include <string>
5
6namespace OpenSim { class Object; }
7namespace OpenSim { class AbstractProperty; }
8
9namespace osc
10{
11 // concrete encapsulation of an edit that can be applied to an object
12 //
13 // this is designed to be safe to copy around etc. because it will perform
14 // runtime lookups before applying the change
16 public:
18 const OpenSim::AbstractProperty&,
19 std::function<void(OpenSim::AbstractProperty&)>
20 );
21
23 const OpenSim::Object&,
24 const OpenSim::AbstractProperty&,
25 std::function<void(OpenSim::AbstractProperty&)>
26 );
27
28 const std::string& getComponentAbsPath() const; // empty if it's just a standalone object
29 const std::string& getPropertyName() const;
30 void apply(OpenSim::AbstractProperty&);
31 const std::function<void(OpenSim::AbstractProperty&)>& getUpdater() const
32 {
33 return m_Updater;
34 }
35
36 private:
37 std::string m_ComponentAbsPath;
38 std::string m_PropertyName;
39 std::function<void(OpenSim::AbstractProperty&)> m_Updater;
40 };
41}
Definition object_property_edit.h:15
ObjectPropertyEdit(const OpenSim::Object &, const OpenSim::AbstractProperty &, std::function< void(OpenSim::AbstractProperty &)>)
void apply(OpenSim::AbstractProperty &)
const std::string & getPropertyName() const
const std::function< void(OpenSim::AbstractProperty &)> & getUpdater() const
Definition object_property_edit.h:31
const std::string & getComponentAbsPath() const
ObjectPropertyEdit(const OpenSim::AbstractProperty &, std::function< void(OpenSim::AbstractProperty &)>)
Definition static_component_registries.h:3
Definition custom_decoration_generator.h:5
constexpr U to(T &&value)
Definition conversion.h:56