|
AGXDynamics
2.31.1.0
|
Inspect a cable's current state and compute a SegmentDamageState for each segment. More...
#include <CableDamageState.h>
Inheritance diagram for agxCable::CableDamageState:Public Member Functions | |
| CableDamageState (agxCable::Cable *cable) | |
| Create a new CableDamageState and register it with the given cable. More... | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| agxCable::Cable * | getCable () |
| const agxCable::Cable * | getCable () const |
| agxCable::CableDamageStateFilter | getCableDamageStateFilter () const |
| const char * | getClassName () const override |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| size_t | getNumSegmentDamageStates () const |
| int | getReferenceCount () const |
| const agxCable::SegmentDamageStateVector & | getSegmentDamageData () const |
| Provides read-only access to the segment damage states. More... | |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agx::Uuid | getUuid () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isEnabled (agxCable::DamageStateTypes::StateType damageType) const |
| Test if the given piece of the SegmentDamageState is part of the set of state that is computed. More... | |
| bool | isFinished () const |
| virtual void | post () |
| virtual void | pre () |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| void | setCableDamageStateFilter (agxCable::CableDamageStateFilter filter) |
| Set the filter used to determine which parts of the SegmentDamageStates that should be computed. More... | |
| void | setEnable (agxCable::DamageStateTypes::StateType damageType, bool enable) |
| Enable or disable computation of a single piece of the SegmentDamageState. More... | |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Static Public Member Functions | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static const char * | getConstructClassId () |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| virtual | ~CableDamageState () |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | generateUuid () |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Protected Attributes | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Inspect a cable's current state and compute a SegmentDamageState for each segment.
The SegmendDamageStates are later used by CableDamage instances to estimate cable damage.
A filter is used to select which parts of the SegmentDamageStates that are computed. This makes it possible to implement other damage estimation models in the future.
Definition at line 42 of file CableDamageState.h.
| agxCable::CableDamageState::CableDamageState | ( | agxCable::Cable * | cable | ) |
Create a new CableDamageState and register it with the given cable.
SegmentDamageStates will be updated ever time step.
| cable | - The cable for which SegmendDamageStates are to be computed. |
|
protectedvirtual |
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), and agx::InternalData::getOrCreate().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
inlinestatic |
Definition at line 102 of file CableDamageState.h.
|
inlinestatic |
Definition at line 102 of file CableDamageState.h.
|
protectedinherited |
|
protectedinherited |
| agxCable::Cable* agxCable::CableDamageState::getCable | ( | ) |
| const agxCable::Cable* agxCable::CableDamageState::getCable | ( | ) | const |
| agxCable::CableDamageStateFilter agxCable::CableDamageState::getCableDamageStateFilter | ( | ) | const |
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 102 of file CableDamageState.h.
|
inlinestatic |
Definition at line 102 of file CableDamageState.h.
|
staticprotectedinherited |
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
|
inherited |
This index is given at creation of this object.
It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.
Definition at line 247 of file Serializable.h.
| size_t agxCable::CableDamageState::getNumSegmentDamageStates | ( | ) | const |
|
inherited |
| const agxCable::SegmentDamageStateVector& agxCable::CableDamageState::getSegmentDamageData | ( | ) | const |
Provides read-only access to the segment damage states.
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 102 of file CableDamageState.h.
|
inherited |
Definition at line 268 of file Serializable.h.
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::Buffer::getElement(), and agx::Object::getResource().
| bool agxCable::CableDamageState::isEnabled | ( | agxCable::DamageStateTypes::StateType | damageType | ) | const |
Test if the given piece of the SegmentDamageState is part of the set of state that is computed.
| damageType | - The piece of the SegmentDamageState to test. |
|
inherited |
Definition at line 252 of file Serializable.h.
|
virtual |
|
virtual |
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
Referenced by agxData::Val< UInt >::Val().
|
overridevirtual |
| void agxCable::CableDamageState::setCableDamageStateFilter | ( | agxCable::CableDamageStateFilter | filter | ) |
Set the filter used to determine which parts of the SegmentDamageStates that should be computed.
| filter | - Filter specification. |
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
| void agxCable::CableDamageState::setEnable | ( | agxCable::DamageStateTypes::StateType | damageType, |
| bool | enable | ||
| ) |
Enable or disable computation of a single piece of the SegmentDamageState.
| damageType | - The piece of the SegmentDamageState that should be enabled or disabled. |
| enable | - True of the given state type is to be computed. False otherwise. |
|
inherited |
Set to false to disable serialization of this object.
It will just be ignored during serialization (writing). It is still possible to restore TO this object.
|
staticinherited |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
|
inherited |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
Explicitly set a Uuid on a serializable object.
Use this method with great care, as it can result in non-unique identifiers in the system!
|
overridevirtual |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
staticinherited |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.