Discussion:
[omniORB] Custom backend - problem capturing comments on attributes
Randall Britten
2014-08-21 04:37:35 UTC
Permalink
Hi

I?m using the backend code at https://github.com/codecurve/cellml-api/blob/7f093eaedde907a8291fae84b7ace247882f6609/simple_interface_generators/omniidl_be/simple_cpp/cxxheadergen.py to generate a C++ header.

For some reason, comments on attributes aren?t encountered when traversing the AST. It?s working fine for operations.

To generate, I?m using:

omniidl -bsimple_cpp -K -Iinterfaces -p/somepath/Now/cellmlapi/simple_interface_generators/omniidl_be /somepath/cellmlapi/interfaces/libcellmlStarter.idl

Sample input:
// Comment 1
interface J {
//Comment 4
boolean contains(in boolean x);
//Comment 5

//Comment 2
attribute boolean the_I;
//Comment 3
};

Sample output:

/* This file is automatically generated from test.idl

* DO NOT EDIT DIRECTLY OR CHANGES WILL BE LOST!

*/

#ifndef _GUARD_test

#define _GUARD_test

#include "cda_compiler_support.h"

class J

{

public:

static const char* INTERFACE_NAME() { return "J"; }

virtual ~J() {}




//Comment 4


virtual bool contains(bool x) throw(std::exception&) = 0;




virtual bool the_I() throw(std::exception&) = 0;

virtual void the_I(bool attr) throw(std::exception&) = 0;

};

#endif // guard




Platform: Mac OS X 10.9.4

Version: omniidl -V

omniidl version 1.0

Installed using ?brew install omniorb?.

Thanks in advance for any help.

Regards,
Randall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20140821/b1e3c364/attachment.html>
Loading...