About the plugin desing : one host and other slaved.

Dear Openflipper developer, Suppose we have built up a plugin, but we want to split it into a classes and other slaved ones. Every inherits from QObject, BaseInterface, LoggingInterface, StatusbarInterface, RPCInterface such that they can call other plugin functions, like log, rpc::callFunction, by themselves. This setup is fine. Usually we also split the functionality into basic
Dear Jan Möbius, Thanks for your helpful answers. Concerning to topic: About the plugin desing : one host and other slaved. We still have our different view. Firstly, We do not want to put the host class and the slave classes into different folders, instead, we prefer to keeping them together in the same project, because they focus on the same 'business'. We split them because we want to make the 'business' looks clear; We make them inherit by LogInterface, RPCInterface and others because we need to call external functions, like log, rpc, within them. Secondly, let me state the problems with our current design. For example, we have a subclass named :GeometricSignature.cpp. We put Q_EXPORT_PLUGIN2( lmgcgeometricsignature , LMGCGeometricSignature); at the bottom of it. however, we got the following building eorrs 2>Linking... 2>LMGCPlugin.obj : error LNK2005: _qt_plugin_query_verification_data already defined in GeometricSignature.obj 2>LMGCPlugin.obj : error LNK2005: _qt_plugin_instance already defined in GeometricSignature.obj if we remvoved Q_EXPORT_PLUGIN2( lmgcgeometricsignature , LMGCGeometricSignature); out of it, Building is fine, but calls to those external functions do not work; that is say, no errors, no feedbacks; From the log window, we can see only the main class is loaded; other subclasses do not loaded as plugins even they have the same inheritance as the main class. We are looking forward to hearing suggestions from you. Best Regards, Xianyong Liu Shanghai JiaoTong University Office: +86 021 34204586 E-mail: xyliu80@gmail.com Address: 504 Room, SEIEE buiding 3#, 800 Dongchuan Rd,Min Hang,Shanghai,200240,China From: openflipper-request Date: 2012-10-18 18:00 To: openflipper Subject: Openflipper Digest, Vol 32, Issue 2 Send Openflipper mailing list submissions to openflipper@lists.rwth-aachen.de To subscribe or unsubscribe via the World Wide Web, visit http://mailman.rwth-aachen.de/mailman/listinfo/openflipper or, via email, send a message with subject or body 'help' to openflipper-request@lists.rwth-aachen.de You can reach the person managing the list at openflipper-owner@lists.rwth-aachen.de When replying, please edit your Subject line so it is more specific than "Re: Contents of Openflipper digest..." Today's Topics: 1. About Gaussian curvature computation (xyliu80@gmail.com) 2. About the plugin desing : one host and other slaved. (xyliu80@gmail.com) 3. Re: About the plugin desing : one host and other slaved. (Jan Möbius) 4. Re: About Gaussian curvature computation (Jan Möbius) ---------------------------------------------------------------------- Message: 1 Date: Wed, 17 Oct 2012 23:01:20 +0800 From: "xyliu80@gmail.com" <xyliu80@gmail.com> To: openflipper <openflipper@lists.rwth-aachen.de> Subject: [Openflipper] About Gaussian curvature computation Message-ID: <201210172301158434251@gmail.com> Content-Type: text/plain; charset="gb2312" Dear Openflipper developer, We saw that, in openflipper, the initial Guassian curvature for each vetex is : double gauss_curv( 2.0*M_PI); However, in lots of papers, they set the initial value to M_PI, if it is a boundary vertex. Could you please explain such difference? Thank you for your great work in graphics community! Best Regards, Xianyong Liu Shanghai JiaoTong University Office: +86 021 34204586 E-mail: xyliu80@gmail.com Address: 504 Room, SEIEE buiding 3#, 800 Dongchuan Rd,Min Hang,Shanghai,200240,China -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mailman.rwth-aachen.de/pipermail/openflipper/attachments/20121017/73155e60/attachment-0001.html> ------------------------------ Message: 2 Date: Thu, 18 Oct 2012 12:15:01 +0800 From: "xyliu80@gmail.com" <xyliu80@gmail.com> To: openflipper <openflipper@lists.rwth-aachen.de> Subject: [Openflipper] About the plugin desing : one host and other slaved. Message-ID: <201210181214589375012@gmail.com> Content-Type: text/plain; charset="gb2312" Dear Openflipper developer, Suppose we have built up a plugin, but we want to split it into a classes and other slaved ones. Every inherits from QObject, BaseInterface, LoggingInterface, StatusbarInterface, RPCInterface such that they can call other plugin functions, like log, rpc::callFunction, by themselves. The problem is that we found such design does not work, because they can not work as we imagine; Only the primary one works fine. Therefore, we want to ask for suggestions for the support team! Best Regards, Xianyong Liu Shanghai JiaoTong University Office: +86 021 34204586 E-mail: xyliu80@gmail.com Address: 504 Room, SEIEE buiding 3#, 800 Dongchuan Rd,Min Hang,Shanghai,200240,China -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mailman.rwth-aachen.de/pipermail/openflipper/attachments/20121018/61f9da5c/attachment-0001.html> ------------------------------ Message: 3 Date: Thu, 18 Oct 2012 09:19:02 +0200 From: Jan Möbius <moebius@cs.rwth-aachen.de> To: openflipper@lists.rwth-aachen.de Subject: Re: [Openflipper] About the plugin desing : one host and other slaved. Message-ID: <507FAD66.10801@cs.rwth-aachen.de> Content-Type: text/plain; charset=ISO-8859-1 Hi, On 18.10.2012 06:15, xyliu80@gmail.com wrote: plugins. You have to put the plugins into separate folders at OpenFlippers top level directory. Additionally you have to make sure, that they have different names (especially the plugin name returned has to be different). You can only have one class handling the interfaces in your plugin. All other classes can be derived from QObject but have to communicate to the core via the main plugin class (But you can connect the signals of your subclass directly to the signals of your ain class).
The problem is that we found such design does not work, because they can not work as we imagine; Do you get any error message?
Only the primary one works fine. Take a look at the log window. When OpenFlipper starts, it shows which plugins get loaded in the log window. Check for messages regarding plugins that are not loaded. If you use linux, you can start OpenFlipper with the command line option "-c" which will print the full log to your console.
Best, Jan Möbius -- Dipl.Inform. Jan Möbius Department of Computer Science VIII Aachen University of Technology (RWTH) Ahornstrasse 55, 52074 Aachen, Germany Phone ++49 (0)241 80-21817 Fax ++49 (0)241 80-22899 mailto:moebius@cs.rwth-aachen.de http://www.rwth-graphics.de ------------------------------ Message: 4 Date: Thu, 18 Oct 2012 09:28:32 +0200 From: Jan Möbius <moebius@cs.rwth-aachen.de> To: openflipper@lists.rwth-aachen.de Subject: Re: [Openflipper] About Gaussian curvature computation Message-ID: <507FAFA0.1020203@cs.rwth-aachen.de> Content-Type: text/plain; charset=ISO-8859-1 On 17.10.2012 17:01, xyliu80@gmail.com wrote:
Dear Openflipper developer,
We saw that, in openflipper, the initial Guassian curvature for each vetex is : double gauss_curv( 2.0*M_PI); However, in lots of papers, they set the initial value to M_PI, if it is a boundary vertex.
Could you please explain such difference?
Was a bug. Boundary vertices where not handled at all. -> Fixed in svn. Best, Jan Möbius -- Dipl.Inform. Jan Möbius Department of Computer Science VIII Aachen University of Technology (RWTH) Ahornstrasse 55, 52074 Aachen, Germany Phone ++49 (0)241 80-21817 Fax ++49 (0)241 80-22899 mailto:moebius@cs.rwth-aachen.de http://www.rwth-graphics.de ------------------------------ _______________________________________________ Openflipper mailing list Openflipper@lists.rwth-aachen.de http://mailman.rwth-aachen.de/mailman/listinfo/openflipper End of Openflipper Digest, Vol 32, Issue 2 ******************************************

Hi, basically there are two problems. The OpenFlipper make system is based on cmake. Currently it assumes, that there is only one plugin per Plugin-x folder. So only one build target is added for each folder, resulting in one plugin library that is generated (The makefile code for this is in OpenFlipper/cmake/plugin.cmake). The second problem is that qt creates the interfaces and runtime plugin linking parts via the Q_EXPORT_PLUGIN2 macros which generate fo example the _qt_plugin_instance functions, which are only allowed ones per created binary (in this case the plugin.lib file). As all of your files are compiled into one plugin, you will get symbol redefinitions which result in your linker errors. The only way to solve this would be to modify the cmake files of OpenFlipper. One possibility would be to introduce some kind of plugin collection. Which would than require that you create one Folder at the top level directory and for each of the sub plugins an additional folder below that: PluginCollection-BuisenessA -> Plugin-A -> Plugin-B -> Plugin-C Currently that is not implemented yet, but it should not be very complicated, as it would only require some changes to: OpenFlipper/cmake/common.cmake and there especially the "of_add_plugins" function such that it recognizes Plugin collections. Best, Jan Möbius On 18.10.2012 15:44, xyliu80@gmail.com wrote:
Dear Jan Möbius, Thanks for your helpful answers. Concerning to topic: About the plugin desing : one host and other slaved.
We still have our different view. Firstly, We do not want to put the host class and the slave classes into different folders, instead, we prefer to keeping them together in the same project, because they focus on the same 'business'. We split them because we want to make the 'business' looks clear; We make them inherit by LogInterface, RPCInterface and others because we need to call external functions, like log, rpc, within them.
Secondly, let me state the problems with our current design. For example, we have a subclass named :GeometricSignature.cpp. We put Q_EXPORT_PLUGIN2( lmgcgeometricsignature , LMGCGeometricSignature); at the bottom of it. however, we got the following building eorrs 2>Linking... 2>LMGCPlugin.obj : error LNK2005: _qt_plugin_query_verification_data already defined in GeometricSignature.obj 2>LMGCPlugin.obj : error LNK2005: _qt_plugin_instance already defined in GeometricSignature.obj
if we remvoved Q_EXPORT_PLUGIN2( lmgcgeometricsignature , LMGCGeometricSignature); out of it, Building is fine, but calls to those external functions do not work; that is say, no errors, no feedbacks; From the log window, we can see only the main class is loaded; other subclasses do not loaded as plugins even they have the same inheritance as the main class.
We are looking forward to hearing suggestions from you. Best Regards, ------------------------------------------------------------------------ *Xianyong Liu Shanghai JiaoTong University* *Office: +86 021 34204586 E-mail: **xyliu80@gmail.com* <mailto:xyliu80@gmail.com>
*Address: 504 Room, SEIEE buiding 3#, 800 Dongchuan Rd,Min Hang,Shanghai,200240,China*
*From:* openflipper-request <mailto:openflipper-request@lists.rwth-aachen.de> *Date:* 2012-10-18 18:00 *To:* openflipper <mailto:openflipper@lists.rwth-aachen.de> *Subject:* Openflipper Digest, Vol 32, Issue 2 Send Openflipper mailing list submissions to openflipper@lists.rwth-aachen.de
To subscribe or unsubscribe via the World Wide Web, visit http://mailman.rwth-aachen.de/mailman/listinfo/openflipper or, via email, send a message with subject or body 'help' to openflipper-request@lists.rwth-aachen.de
You can reach the person managing the list at openflipper-owner@lists.rwth-aachen.de
When replying, please edit your Subject line so it is more specific than "Re: Contents of Openflipper digest..."
Today's Topics:
1. About Gaussian curvature computation (xyliu80@gmail.com) 2. About the plugin desing : one host and other slaved. (xyliu80@gmail.com) 3. Re: About the plugin desing : one host and other slaved. (Jan Möbius) 4. Re: About Gaussian curvature computation (Jan Möbius)
----------------------------------------------------------------------
Message: 1 Date: Wed, 17 Oct 2012 23:01:20 +0800 From: "xyliu80@gmail.com" <xyliu80@gmail.com> To: openflipper <openflipper@lists.rwth-aachen.de> Subject: [Openflipper] About Gaussian curvature computation Message-ID: <201210172301158434251@gmail.com> Content-Type: text/plain; charset="gb2312"
Dear Openflipper developer,
We saw that, in openflipper, the initial Guassian curvature for each vetex is : double gauss_curv( 2.0*M_PI); However, in lots of papers, they set the initial value to M_PI, if it is a boundary vertex.
Could you please explain such difference? Thank you for your great work in graphics community!
Best Regards,
Xianyong Liu Shanghai JiaoTong University Office: +86 021 34204586 E-mail: xyliu80@gmail.com Address: 504 Room, SEIEE buiding 3#, 800 Dongchuan Rd,Min Hang,Shanghai,200240,China

Dear Jan Möbius, Our experiments show that in a single plugin project, we can not have both the main and sub classes inherited by LogInterance and others. ALTERNATIVE: Sub classes expose SIGNALs, which are booked in the main with SLOTs. PROBLEM: The alternative leads to writing more code lines. HOPE: We hope all classes in a single project to directly communicate with external interfaces in the future??? Best Regards, ------------------------------ *Xianyong Liu Shanghai JiaoTong University* *Office: +86 021 34204586 E-mail: **xyliu80@gmail.com* <xyliu80@gmail.com> *Address: 504 Room, SEIEE buiding 3#, 800 Dongchuan Rd,Min Hang,Shanghai,200240,China* * * * * 12/10/18 xyliu80@gmail.com <xyliu80@gmail.com>
** Dear Jan Möbius, Thanks for your helpful answers. Concerning to topic: About the plugin desing : one host and other slaved.
We still have our different view. Firstly, We do not want to put the host class and the slave classes into different folders, instead, we prefer to keeping them together in the same project, because they focus on the same 'business'. We split them because we want to make the 'business' looks clear; We make them inherit by LogInterface, RPCInterface and others because we need to call external functions, like log, rpc, within them.
Secondly, let me state the problems with our current design. For example, we have a subclass named :GeometricSignature.cpp. We put Q_EXPORT_PLUGIN2( lmgcgeometricsignature , LMGCGeometricSignature); at the bottom of it. however, we got the following building eorrs 2>Linking...
2>LMGCPlugin.obj : error LNK2005: _qt_plugin_query_verification_data already defined in GeometricSignature.obj
2>LMGCPlugin.obj : error LNK2005: _qt_plugin_instance already defined in GeometricSignature.obj
if we remvoved Q_EXPORT_PLUGIN2( lmgcgeometricsignature , LMGCGeometricSignature); out of it, Building is fine, but calls to those external functions do not work; that is say, no errors, no feedbacks; From the log window, we can see only the main class is loaded; other subclasses do not loaded as plugins even they have the same inheritance as the main class.
We are looking forward to hearing suggestions from you. Best Regards, ------------------------------ *Xianyong Liu Shanghai JiaoTong University* *Office: +86 021 34204586 E-mail: **xyliu80@gmail.com* <xyliu80@gmail.com>
*Address: 504 Room, SEIEE buiding 3#, 800 Dongchuan Rd,Min Hang,Shanghai,200240,China*
*From:* openflipper-request <openflipper-request@lists.rwth-aachen.de> *Date:* 2012-10-18 18:00 *To:* openflipper <openflipper@lists.rwth-aachen.de> *Subject:* Openflipper Digest, Vol 32, Issue 2 Send Openflipper mailing list submissions to openflipper@lists.rwth-aachen.de
To subscribe or unsubscribe via the World Wide Web, visit http://mailman.rwth-aachen.de/mailman/listinfo/openflipper or, via email, send a message with subject or body 'help' to openflipper-request@lists.rwth-aachen.de
You can reach the person managing the list at openflipper-owner@lists.rwth-aachen.de
When replying, please edit your Subject line so it is more specific than "Re: Contents of Openflipper digest..."
Today's Topics:
1. About Gaussian curvature computation (xyliu80@gmail.com) 2. About the plugin desing : one host and other slaved. (xyliu80@gmail.com) 3. Re: About the plugin desing : one host and other slaved. (Jan Möbius) 4. Re: About Gaussian curvature computation (Jan Möbius)
----------------------------------------------------------------------
Message: 1 Date: Wed, 17 Oct 2012 23:01:20 +0800 From: "xyliu80@gmail.com" <xyliu80@gmail.com> To: openflipper <openflipper@lists.rwth-aachen.de> Subject: [Openflipper] About Gaussian curvature computation Message-ID: <201210172301158434251@gmail.com> Content-Type: text/plain; charset="gb2312"
Dear Openflipper developer,
We saw that, in openflipper, the initial Guassian curvature for each vetex is : double gauss_curv( 2.0*M_PI);
However, in lots of papers, they set the initial value to M_PI, if it is a boundary vertex.
Could you please explain such difference? Thank you for your great work in graphics community!
Best Regards,
Xianyong Liu Shanghai JiaoTong University Office: +86 021 34204586 E-mail: xyliu80@gmail.com
Address: 504 Room, SEIEE buiding 3#, 800 Dongchuan Rd,Min Hang,Shanghai,200240,China -------------- next part -------------- An HTML attachment was scrubbed... URL: < http://mailman.rwth-aachen.de/pipermail/openflipper/attachments/20121017/731...
------------------------------
Message: 2 Date: Thu, 18 Oct 2012 12:15:01 +0800 From: "xyliu80@gmail.com" <xyliu80@gmail.com> To: openflipper <openflipper@lists.rwth-aachen.de> Subject: [Openflipper] About the plugin desing : one host and other slaved. Message-ID: <201210181214589375012@gmail.com> Content-Type: text/plain; charset="gb2312"
Dear Openflipper developer,
Suppose we have built up a plugin, but we want to split it into a classes and other slaved ones.
Every inherits from QObject, BaseInterface, LoggingInterface, StatusbarInterface, RPCInterface
such that they can call other plugin functions, like log, rpc::callFunction, by themselves.
The problem is that we found such design does not work, because they can not work as we imagine; Only the primary one works fine.
Therefore, we want to ask for suggestions for the support team!
Best Regards,
Xianyong Liu Shanghai JiaoTong University Office: +86 021 34204586 E-mail: xyliu80@gmail.com
Address: 504 Room, SEIEE buiding 3#, 800 Dongchuan Rd,Min Hang,Shanghai,200240,China -------------- next part -------------- An HTML attachment was scrubbed... URL: < http://mailman.rwth-aachen.de/pipermail/openflipper/attachments/20121018/61f...
------------------------------
Message: 3 Date: Thu, 18 Oct 2012 09:19:02 +0200 From: Jan Möbius <moebius@cs.rwth-aachen.de> To: openflipper@lists.rwth-aachen.de Subject: Re: [Openflipper] About the plugin desing : one host and other slaved. Message-ID: <507FAD66.10801@cs.rwth-aachen.de> Content-Type: text/plain; charset=ISO-8859-1
Hi,
On 18.10.2012 06:15, xyliu80@gmail.com wrote:
Dear Openflipper developer, Suppose we have built up a plugin, but we want to split it into a classes and other slaved ones. Every inherits from
QObject, BaseInterface, LoggingInterface, StatusbarInterface, RPCInterface such that they can call other plugin functions, like log, rpc::callFunction, by themselves. This setup is fine. Usually we also split the functionality into basic plugins. You have to put the plugins into separate folders at OpenFlippers top level directory. Additionally you have to make sure, that they have different names (especially the plugin name returned has to be different).
You can only have one class handling the interfaces in your plugin. All other classes can be derived from QObject but have to communicate to the core via the main plugin class (But you can connect the signals of your subclass directly to the signals of your ain class).
The problem is that we found such design does not work, because they can not work as we imagine; Do you get any error message?
Only the primary one works fine. Take a look at the log window. When OpenFlipper starts, it shows which plugins get loaded in the log window. Check for messages regarding plugins that are not loaded. If you use linux, you can start OpenFlipper with the command line option "-c" which will print the full log to your console.
Best, Jan Möbius
-- Dipl.Inform. Jan Möbius Department of Computer Science VIII Aachen University of Technology (RWTH) Ahornstrasse 55, 52074 Aachen, Germany
Phone ++49 (0)241 80-21817 Fax ++49 (0)241 80-22899 mailto:moebius@cs.rwth-aachen.de http://www.rwth-graphics.de
------------------------------
Message: 4 Date: Thu, 18 Oct 2012 09:28:32 +0200 From: Jan Möbius <moebius@cs.rwth-aachen.de> To: openflipper@lists.rwth-aachen.de Subject: Re: [Openflipper] About Gaussian curvature computation Message-ID: <507FAFA0.1020203@cs.rwth-aachen.de> Content-Type: text/plain; charset=ISO-8859-1
On 17.10.2012 17:01, xyliu80@gmail.com wrote:
Dear Openflipper developer,
We saw that, in openflipper, the initial Guassian curvature for each vetex is : double gauss_curv( 2.0*M_PI); However, in lots of papers, they set the initial value to M_PI, if it is a boundary vertex.
Could you please explain such difference?
Was a bug. Boundary vertices where not handled at all. -> Fixed in svn.
Best, Jan Möbius
-- Dipl.Inform. Jan Möbius Department of Computer Science VIII Aachen University of Technology (RWTH) Ahornstrasse 55, 52074 Aachen, Germany
Phone ++49 (0)241 80-21817 Fax ++49 (0)241 80-22899 mailto:moebius@cs.rwth-aachen.de http://www.rwth-graphics.de
------------------------------
_______________________________________________ Openflipper mailing list Openflipper@lists.rwth-aachen.de http://mailman.rwth-aachen.de/mailman/listinfo/openflipper
End of Openflipper Digest, Vol 32, Issue 2 ******************************************
participants (3)
-
Jan Möbius
-
xyliu80@gmail.com
-
刘先勇