17 #ifndef AGX_TASKMANAGER_H
18 #define AGX_TASKMANAGER_H
30 # pragma warning(push)
31 # pragma warning( disable : 4275 )
32 # pragma warning( disable : 4251 )
37 class TaskPluginImplementation;
43 TaskLoadError(
const String& path,
const String& implementation,
const ParameterTable& parameterList,
Device *device,
const char* message) : std::runtime_error(message), m_path(path), m_implementation(implementation), m_parameterList(parameterList), m_device(device) {}
82 size_t m_numImplementations;
111 template <
typename T>
138 SINGLETON_CLASSNAME_METHOD();
152 void loadCallback(TiXmlElement *eKernel);
156 void scan(
const String& path, ScanCallback callback);
157 void load(
const String& path);
158 void scanComponents(
const String& baseDir);
170 Name m_loadImplementation;
180 # pragma warning(pop)
Templated callback with one argument.
An agx::Device is an abstract representation of a device on which data can be stored and processed.
Type
Explicit list of device types.
Inheritance with partial specialization due to bug with ref_ptr containers.
Representation of a name string.
Representation of a path, a list of name components.
Base class for Singletons that should have its shutdown called explicitly before exit of the applicat...
const String & getImplementation() const
TaskLoadError(const String &path, const String &implementation, const ParameterTable ¶meterList, Device *device, const char *message)
const String & getPath() const
const ParameterTable & getParameterList()
const Device * getDevice() const
Task * create(const Path &path, Device *device, const Name &implementation)
Task * create(const Path &path, const Name &implementation, agx::ParameterBindingVector ¶meterList, bool allowFormatPromotions, Device *device)
virtual void shutdown() override
Implement this method to cleanup your Singleton class.
Task * create(const Path &path, Device *device, const ParameterTable ¶meterList, const Name &implementation=Name())
static TaskManager * instance()
virtual ~TaskPluginImplementationT()
TaskPluginImplementationT(TaskPlugin *plugin, const char *name="")
virtual void destroy(Task *task)
virtual Task * create(Device *device)
virtual void destroy(Task *task)=0
virtual Task * create(Device *device)=0
TaskPluginImplementation(TaskPlugin *plugin, const char *name="")
const char * getName() const
virtual ~TaskPluginImplementation()
const char * getPath() const
Task * create(Device *device, const ParameterTable ¶meterList, const Name &implementation=Name())
Task * create(Device *device, const Name &implementation)
size_t getNumImplementations() const
Device::Type getDeviceType() const
TaskPlugin(const char *modelPath, Device::Type deviceType)
A representation of a generic task.
Vector containing 'raw' data.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
HashTable< const char *, TaskPlugin * > TaskPluginTable
std::recursive_mutex ReentrantMutex