Subject: mailing-list for TeXmacs Users
List archive
From : Nicola Mingotti <address@hidden>- To: Massimiliano Gubinelli <address@hidden>
- Cc: texmacs-users <address@hidden>
- Subject: Re: [TeXmacs] Is SIGINT sent to plugins ?
- Date: Thu, 13 Dec 2018 10:27:30 -0800
Thank you a lot Max ! bye n. On 12/12/18 1:45 PM, Massimiliano
Gubinelli wrote:
Hi Nicola,
TeXmacs programming is quite uniform. Usually there
are various (more or less) abstract classes which delegate the
actual implementation to classes defined depending on the
backend.
In this case the connection_rep class uses
tm_link_rep which is an abstract class (it derives
from abstract_struct). This is the signal that this class is
meant as an abstract interface which TeXmacs can use to
abstract the concept of “link”.
So it will come with various functions which are
supposed to instantiate the relevant concrete subclass. In this
case functions like:
tm_link make_pipe_link (string cmd);
tm_link make_dynamic_link (string lib, string symb, string init, string ses); tm_link make_socket_link (string h, int p, int t= SOCKET_DEFAULT, int fd= -1); tm_link make_socket_server (int port); tm_link find_socket_link (int fd); as defined in tm_link.hpp.
These functions’ implementation depends on the
backend. For QT they are implemented in qt_pipe_link in such a
way that they returns objects instatiated from qt_pipe_link_rep
and implementing the connection with child processes using the
Qt library abstraction. See e.g.
tm_link
make_pipe_link (string cmd) { return tm_new<qt_pipe_link_rep> (cmd); } in qt_pipe_link.cpp
So in general if you are looking for behaviours
which depends on the underlying system (like pipes, UI, image
conversion, etc…) then they are likely to be implemented in one
of the files in src/Plugins/Qt
all the rest of the sources are independent of the
Qt library and thus mostly independent of the operating system
functoning (apart from file handling which is always assumed to
be UNIX, that is why we need min_gw under windows).
HTH for the future. :)
Max
|
- [TeXmacs] Is SIGINT sent to plugins ?, Nicola Mingotti, 12/11/2018
- Re: [TeXmacs] Is SIGINT sent to plugins ?, Massimiliano Gubinelli, 12/12/2018
- Re: [TeXmacs] Is SIGINT sent to plugins ?, Massimiliano Gubinelli, 12/12/2018
- Re: [TeXmacs] Is SIGINT sent to plugins ?, Nicola Mingotti, 12/12/2018
- Re: [TeXmacs] Is SIGINT sent to plugins ?, Massimiliano Gubinelli, 12/12/2018
- Re: [TeXmacs] Is SIGINT sent to plugins ?, Nicola Mingotti, 12/13/2018
- Re: [TeXmacs] Is SIGINT sent to plugins ?, Massimiliano Gubinelli, 12/12/2018
- Re: [TeXmacs] Is SIGINT sent to plugins ?, Nicola Mingotti, 12/12/2018
Archive powered by MHonArc 2.6.19.