Open ghost opened 6 years ago
Ahhhh yes interface
, the forgotten child. To be honest I never expected Exhale to be able to support anything but C++, but apparently you've had some potential success with PHP as well as another user with Verilog.
Adding support for .. doxygeninterface::
shouldn't be super difficult, I just need to treat it like "class"
and "struct"
. I was avoiding some pesky issues with Exhale because I thought I would be able to finish a more hefty rewrite of something but I'm fixing the pesky issues first now, so I'll throw this one in there. I'll want to fix #28 first though.
I know zero PHP, do you have some brief sample code that demonstrates an interface
? If not I'll add some ugly Java code for the interface
test case (ugly because it's been at least 6 years since I've done any Java...).
This is an example of an interface class in PHP:
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magento.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category Mage
* @package Mage_Api
* @copyright Copyright (c) 2006-2017 X.commerce, Inc. and affiliates (http://www.magento.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
/**
* Web service api server interface
*
* @category Mage
* @package Mage_Api
* @author Magento Core Team <core@magentocommerce.com>
*/
interface Mage_Api_Model_Server_Adapter_Interface
{
/**
* Set handler class name for webservice
*
* @param string $handler
* @return Mage_Api_Model_Server_Adapter_Interface
*/
function setHandler($handler);
/**
* Retrive handler class name for webservice
*
* @return string
*/
function getHandler();
/**
* Set webservice api controller
*
* @param Mage_Api_Controller_Action $controller
* @return Mage_Api_Model_Server_Adapter_Interface
*/
function setController(Mage_Api_Controller_Action $controller);
/**
* Retrive webservice api controller
*
* @return Mage_Api_Controller_Action
*/
function getController();
/**
* Run webservice
*
* @return Mage_Api_Model_Server_Adapter_Interface
*/
function run();
/**
* Dispatch webservice fault
*
* @param int $code
* @param string $message
*/
function fault($code, $message);
} // Class Mage_Api_Model_Server_Adapter_Interface End
Hey @glamic-ep sorry for forgetting about this. Thank you for the example PHP snippet!
If I recall correctly, you are no longer planning on using Exhale, you intend to customize the Doxygen HTML? I was able to get some minimal Fortran support, but for PHP I'd need to actually be a lot more careful about certain things after looking more closely at the language.
If you aren't planning on using Exhale, I will solve this at a much later date. If you are, then I can add some temporary hacks in just to make it work.
Yes, correct, I have now gone down the Doxygen route. That means there is no immediate need for me to have customized/updated anything. Thanks for your help.
I fall into the same bug and created MR #84
/// @example auto render_pass_ci = make_info<VkRenderPassCreateInfo>();
Results into
(!) Exhale: could not generate reStructuredText documents :/Traceback (most recent call last):
File "c:\python39\lib\site-packages\exhale\__init__.py", line 25, in environment_ready
deploy.explode()
File "c:\python39\lib\site-packages\exhale\deploy.py", line 423, in explode
textRoot.toConsole()
File "c:\python39\lib\site-packages\exhale\graph.py", line 3823, in toConsole
self.consoleFormat(
File "c:\python39\lib\site-packages\exhale\graph.py", line 3880, in consoleFormat
l.toConsole(0, fmt_spec)
File "c:\python39\lib\site-packages\exhale\graph.py", line 543, in toConsole
c.toConsole(level + 1, fmt_spec)
File "c:\python39\lib\site-packages\exhale\graph.py", line 516, in toConsole
kind=utils._use_color(self.kind, fmt_spec[self.kind], sys.stderr),
KeyError: 'example'
Not 100% sure if thats the same issue. Ignore that its a wrong doxygen usage too
When having the verbose output enabled I ran into an issue in https://github.com/svenevs/exhale/blob/master/exhale/graph.py#L458.
self.kind
wasinterface
but this wasn't present infmt_spec
sofmt_spec[self.kind]
was giving aKeyError
. Better check for that since it's "only" a debug message.