API 4.4.1-2022-10-19-2c4045e59
For MATLAB, Python, Java, and C++ users
|
Public Member Functions | |
virtual | ~Socket () |
Socket< T > * | clone () const override |
Create a dynamically-allocated copy. More... | |
bool | isConnected () const override |
Is the Socket connected to object of type T? More... | |
const T & | getConnecteeAsObject () const override |
Generic access to the connectee. More... | |
const T & | getConnectee () const |
Temporary access to the connectee for testing purposes. More... | |
void | connect (const Object &object) override |
Connect this Socket to the provided connectee object. More... | |
void | findAndConnect (const ComponentPath &connectee) override |
Find a component using a partial path or component name of the correct type anywhere in the model (using Component::findComponent()) and connect to that component. More... | |
void | finalizeConnection (const Component &root) override |
Connect this Socket given its connectee path property More... | |
void | disconnect () override |
Clear references to connectees. More... | |
std::string | getConnecteeTypeName () const override |
Derived classes must satisfy this Interface. More... | |
SimTK_DOWNCAST (Socket, AbstractSocket) | |
Public Member Functions inherited from OpenSim::AbstractSocket | |
virtual | ~AbstractSocket () |
const std::string & | getName () const |
SimTK::Stage | getConnectAtStage () const |
Get the system Stage when the connection should be made. More... | |
bool | isListSocket () const |
Can this Socket have more than one connectee? More... | |
unsigned | getNumConnectees () const |
The number of slots to fill in order to satisfy this socket. More... | |
void | findAndConnect (const std::string &connectee) |
Same as findAndConnect(const ComponentPath&), but using a string argument. More... | |
void | setConnecteePath (const std::string &name) |
Set connectee path. More... | |
void | setConnecteePath (const std::string &name, unsigned ix) |
Set connectee path of a connectee among a list of connectees. More... | |
const std::string & | getConnecteePath () const |
Get connectee path. More... | |
const std::string & | getConnecteePath (unsigned ix) const |
Get connectee path of a connectee among a list of connectees. More... | |
void | appendConnecteePath (const std::string &name) |
void | clearConnecteePath () |
Clear all connectee paths in the connectee path property. More... | |
const Component & | getOwner () const |
Get owner component of this socket. More... | |
Static Public Member Functions | |
static Socket< T > * | safeDownCast (AbstractSocket *base) |
For use in python/java/MATLAB bindings. More... | |
|
inlinevirtual |
|
inlineprotected |
|
inlineoverridevirtual |
Create a dynamically-allocated copy.
You must manage the memory for the returned pointer. This function exists to facilitate the use of SimTK::ClonePtr<AbstractSocket>.
Implements OpenSim::AbstractSocket.
|
inlineoverridevirtual |
Connect this Socket to the provided connectee object.
Implements OpenSim::AbstractSocket.
References OpenSim::Socket< T >::getConnecteeTypeName(), and OpenSim::AbstractSocket::getName().
|
inlineoverridevirtual |
Clear references to connectees.
The connectee path property is not affected. Calling finalizeConnection() will use the connectee path property to satisfy the socket.
Implements OpenSim::AbstractSocket.
|
overridevirtual |
Connect this Socket given its connectee path property
Reimplemented from OpenSim::AbstractSocket.
References OpenSim::ComponentPath::getNumPathLevels(), OpenSim::ComponentPath::getSubcomponentNameAtLevel(), OpenSim::ComponentPath::isAbsolute(), and OpenSim::ComponentPath::toString().
|
overridevirtual |
Find a component using a partial path or component name of the correct type anywhere in the model (using Component::findComponent()) and connect to that component.
Throws an exception If you provide only a component name and the model has multiple components with that nume.
Reimplemented from OpenSim::AbstractSocket.
References OpenSim::ComponentPath::toString().
const C & OpenSim::Socket< C >::getConnectee |
|
inlineoverridevirtual |
Generic access to the connectee.
Not all sockets support this method (e.g., the connectee for an Input is not an Object).
Reimplemented from OpenSim::AbstractSocket.
|
inlineoverridevirtual |
Derived classes must satisfy this Interface.
get the type of object this socket connects to
Implements OpenSim::AbstractSocket.
Referenced by OpenSim::Socket< T >::connect().
|
inlineoverridevirtual |
Is the Socket connected to object of type T?
Implements OpenSim::AbstractSocket.
|
inlinestatic |
For use in python/java/MATLAB bindings.
OpenSim::Socket< T >::SimTK_DOWNCAST | ( | Socket< T > | , |
AbstractSocket< T > | |||
) |