5 #include <QDomDocument>
36 Q_INVOKABLE
explicit VFS_thread(QDomElement nodeConfig, QVariantMap env,
bool printConfig=
false);
39 static VFS_thread *
fromConfig(QString configString, QVariantMap env=QVariantMap(),
bool printConfig=
false);
VFS_node is the base class from which all other VFS_node classes derive.
The base class for all requests between nodes.
A thread interface for creating multithreaded applications.
virtual void subtreeRequest(VFS_request *t)
Subclass implementation of VFS_node::subtreeRequest()
static int _threadcount
The internal thread count, useful for debug and logging messages.
virtual void executeRequest(VFS_request *t)
Execute the VFS_request.
void defunct()
When a thread is complete, it will emit finished(), which will trigger this slot.
virtual bool isContainer()
The container-ness of the thread node.
virtual VFS_node * mount()
Mount the node, and mount the thread node if it exists.
VFS_node * _node
The root VFS_node running in the new thread.
static VFS_thread * fromConfig(QString configString, QVariantMap env=QVariantMap(), bool printConfig=false)
A convenience method for creating threads.
virtual VFS_node * unmount()
Unmount the node and the thread node if it exists.
static int threadcount()
Return the current thread count, mostly only useful for logging output.
VFS_threadthread _thread
The subclassed QThread, which will provide the event loop and actually run the thread.
bool hasNode()
When a thread is created, it must construct its root node to become operational.
virtual ~VFS_thread()
VFS_thread destructor.
virtual VFS_node * append(QString name, VFS_node *node, bool containerCheck=true, QString user="unknown")
A dummy entry used to warn a developer of illegal use.
void setNode(VFS_node *node)
Once the node is created in the new thread, this VFS_thread will keep a reference to it.
virtual VFS_node * find(VFS_request *r)
Subclass implementation of VFS_node::find(), which is the path lookup mechanism.
A subclass of QThread, which provides an event loop in a different thread.
void run()
Run the QThread event loop.
void nodeCreated(VFS_node *node)
Once the _node has been created, this signals back to the owning VFS_thread of its existence.
VFS_node * _node
The root VFS_node running in the new thread.
QVariantMap _env
The environment.
VFS_threadthread(VFS_node *p, QDomElement nodeConfig, QVariantMap env, bool printConfig)
QDomElement _nodeConfig
XML config node.
void creationFailed()
If _node creation was not possible, this signal is emitted.
bool _printConfig
A debug setting, used to make sure contexts are correct.