|
AGXDynamics
2.31.1.0
|
Algorithm task either empty, single or group type. More...
#include <SolveAlgorithms.h>
Inheritance diagram for agx::SolveAlgorithm::Task:Classes | |
| struct | ConditionData |
| The type of tasks may depend on the data in this structure. More... | |
Public Types | |
| enum | Type { EMPTY, EXIT, SINGLE, GROUP, CUSTOM } |
| Task type either EMPTY branch (no callback), EXIT branch (no callback, traversal of this branch will end), SINGLE (getSolveKernel given agx::Solver callback) or GROUP (getSolveKernel given SolveGroupPtr callback). More... | |
Public Member Functions | |
| Task () | |
| Default constructor, type set to EMPTY. More... | |
| void | addChild (agx::SolveAlgorithm::Task *child) |
| Add child task. 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 |
| virtual void | customSetup (Solver *solver, JobGroup *entry, JobGroup *exit) |
| agx::SolveAlgorithm::Task * | getChild (agx::UInt i) const |
| agx::UInt | getNumChildren () const |
| agx::SolveAlgorithm::Task * | getParent () const |
| int | getReferenceCount () const |
| virtual agx::SolveKernel * | getSolveKernel (agx::Solver *solver) const |
| Callback for solve algorithms task type SINGLE. More... | |
| virtual agx::SolveKernel * | getSolveKernel (agx::Physics::SolveGroupPtr group) const |
| Callback for solve algorithms task type GROUP. More... | |
| virtual agx::SolveAlgorithm::Task::Type | getType (const agx::SolveAlgorithm::Task::ConditionData &conditionData) const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| 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... | |
| 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 | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Types | |
| typedef agx::Vector < agx::ref_ptr < SolveAlgorithm::Task > > | SolveAlgorithmTaskContainer |
Protected Member Functions | |
| Task (agx::SolveAlgorithm::Task::Type type) | |
| Construct given type. More... | |
| virtual | ~Task () |
| Reference counted object - protected virtual destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
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... | |
Algorithm task either empty, single or group type.
The type of this task determines which callback (getSolveKernel) is called. EMPTY: Includes no jobs but has children. No callback. EXIT: Includes no jobs and any children and/or dependency will be ignored. This is an exit node. No callback. SINGLE: Includes one task (given agx::Solver) and receives getSolveKernel( agx::Solver* ) callback. GROUP: Includes several tasks (given SolveGroupPtr) and receives getSolveKernel( agx::Physics::SolveGroupPtr ) callback.
Definition at line 110 of file SolveAlgorithms.h.
|
protected |
Definition at line 193 of file SolveAlgorithms.h.
Task type either EMPTY branch (no callback), EXIT branch (no callback, traversal of this branch will end), SINGLE (getSolveKernel given agx::Solver callback) or GROUP (getSolveKernel given SolveGroupPtr callback).
| Enumerator | |
|---|---|
| EMPTY | |
| EXIT | |
| SINGLE | |
| GROUP | |
| CUSTOM | |
Definition at line 117 of file SolveAlgorithms.h.
| agx::SolveAlgorithm::Task::Task | ( | ) |
Default constructor, type set to EMPTY.
|
protected |
Construct given type.
| type | - type of this task |
|
protectedvirtual |
Reference counted object - protected virtual destructor.
| void agx::SolveAlgorithm::Task::addChild | ( | agx::SolveAlgorithm::Task * | child | ) |
Add child task.
| child | - child task to add |
|
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 |
|
virtual |
|
protectedinherited |
| agx::SolveAlgorithm::Task* agx::SolveAlgorithm::Task::getChild | ( | agx::UInt | i | ) | const |
| i | - index of child |
i
|
staticprotectedinherited |
| agx::UInt agx::SolveAlgorithm::Task::getNumChildren | ( | ) | const |
| agx::SolveAlgorithm::Task* agx::SolveAlgorithm::Task::getParent | ( | ) | const |
|
inherited |
|
virtual |
Callback for solve algorithms task type SINGLE.
| solver | - solver with tasks |
|
virtual |
Callback for solve algorithms task type GROUP.
One call for each solve group.
| group | - current solve group |
|
virtual |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::Buffer::getElement(), and agx::Object::getResource().
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().
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
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 |
|
protected |
Definition at line 196 of file SolveAlgorithms.h.
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
protected |
Definition at line 197 of file SolveAlgorithms.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
|
protected |
Definition at line 198 of file SolveAlgorithms.h.