Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect handling of comment starting with //! #32

Closed
jpsacha opened this issue Aug 22, 2015 · 3 comments
Closed

Incorrect handling of comment starting with //! #32

jpsacha opened this issue Aug 22, 2015 · 3 comments
Labels

Comments

@jpsacha
Copy link
Member

jpsacha commented Aug 22, 2015

When C++ has a comment starting with //!, like:

//! Interface to instant camera parameters
class CInstantCameraParams_Params
{ ...

The generated Java code is missing initial / in the comment, so we get:

 *  Interface to instant camera parameters */
@Namespace("Basler_InstantCameraParams") @NoOffset public static class CInstantCameraParams_Params extends Pointer {

And the code does not compile.

Notice that there is space-star (*) instead of slash-star (/*).

@saudet
Copy link
Member

saudet commented Aug 23, 2015

I get the correct /**. It might have something to do with the context... Could you post the line before as well?

@jpsacha
Copy link
Member Author

jpsacha commented Aug 23, 2015

Here is all the way from the beginning of the file:

//-----------------------------------------------------------------------------
//  (c) 2004-2008 by Basler Vision Technologies
//  Section: Vision Components
//  Project: GenApi
//-----------------------------------------------------------------------------
/*!
\file
\brief Interface to instant camera parameters
  */

  //-----------------------------------------------------------------------------
  //  This file is generated automatically
  //  Do not modify!
  //-----------------------------------------------------------------------------

  #ifdef __GNUC__
  #define GENAPI_DEPRECATED_FEATURE __attribute__((deprecated))
  #elif defined(_MSC_VER) 
  #define GENAPI_DEPRECATED_FEATURE __declspec(deprecated)
  #else
  #define GENAPI_DEPRECATED_FEATURE
  #endif




#ifndef Basler_InstantCameraParams_PARAMS_H
#define Basler_InstantCameraParams_PARAMS_H

#include <GenApi/IEnumerationT.h>
#include <GenApi/NodeMapRef.h>
#include <GenApi/DLLLoad.h>

//! The namespace containing the device's control interface and related enumeration types
namespace Basler_InstantCameraParams
{

    //**************************************************************************************************
    // Enumerations
    //**************************************************************************************************


    //**************************************************************************************************
    // Parameter class
    //**************************************************************************************************


    //! Interface to instant camera parameters
    class CInstantCameraParams_Params
    {
    //----------------------------------------------------------------------------------------------------------------
    // Implementation
    //----------------------------------------------------------------------------------------------------------------
    protected:
        // If you want to show the following methods in the help file
        // add the string HIDE_CLASS_METHODS to the ENABLED_SECTIONS tag in the doxygen file
        //! \cond HIDE_CLASS_METHODS

            //! Constructor
            CInstantCameraParams_Params(void);

            //! Destructor
            ~CInstantCameraParams_Params(void);

            //! Initializes the references
            void _Initialize(GenApi::INodeMap*);

            //! Return the vendor of the camera
            const char* _GetVendorName(void);

            //! Returns the camera model name
            const char* _GetModelName(void);

        //! \endcond

    //----------------------------------------------------------------------------------------------------------------
    // References to features
    //----------------------------------------------------------------------------------------------------------------
    public:

    //! \name Root - Instant camera parameters.
    //@{
    /*! 
        \brief The maximum number of buffers that are allocated and used for grabbing.



        \b Visibility = Beginner


    */
    GenApi::IInteger &MaxNumBuffer;

    //@}


    //! \name Root - Instant camera parameters.
    //@{
    /*! 
        \brief The maximum number of buffers that are queued in the stream grabber input queue.



        \b Visibility = Beginner


    */
    GenApi::IInteger &MaxNumQueuedBuffer;

    //@}
...

This turns into generated code:

// Parsed from <pylon/_InstantCameraParams.h>







//-----------------------------------------------------------------------------
//  (c) 2004-2008 by Basler Vision Technologies
//  Section: Vision Components
//  Project: GenApi
//-----------------------------------------------------------------------------
/**
\file
\brief Interface to instant camera parameters
  */

  //-----------------------------------------------------------------------------
  //  This file is generated automatically
  //  Do not modify!
  //-----------------------------------------------------------------------------

//   #ifdef __GNUC__
  public static native @MemberGetter int GENAPI_DEPRECATED_FEATURE();
  public static final int GENAPI_DEPRECATED_FEATURE = GENAPI_DEPRECATED_FEATURE();
//   #elif defined(_MSC_VER)
//   #else
//   #define GENAPI_DEPRECATED_FEATURE
//   #endif




// #ifndef Basler_InstantCameraParams_PARAMS_H
// #define Basler_InstantCameraParams_PARAMS_H

// #include <GenApi/IEnumerationT.h>
// #include <GenApi/NodeMapRef.h>
// #include <GenApi/DLLLoad.h>

/** The namespace containing the device's control interface and related enumeration types */

    //**************************************************************************************************
    // Enumerations
    //**************************************************************************************************


    //**************************************************************************************************
    // Parameter class
    //**************************************************************************************************


     *  Interface to instant camera parameters */
    @Namespace("Basler_InstantCameraParams") @NoOffset public static class CInstantCameraParams_Params extends Pointer {
        static { Loader.load(); }
        /** Empty constructor. */
        public CInstantCameraParams_Params() { }
        /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
        public CInstantCameraParams_Params(Pointer p) { super(p); }


    /** \name Root - Instant camera parameters. */
    //@{
    /** 
        \brief The maximum number of buffers that are allocated and used for grabbing.



        \b Visibility = Beginner


    */
    public native @ByRef IInteger MaxNumBuffer(); public native CInstantCameraParams_Params MaxNumBuffer(IInteger MaxNumBuffer);

    //@}

@jpsacha
Copy link
Member Author

jpsacha commented Aug 25, 2015

The recent fix b94b057 resolved the issue. Thanks.

@jpsacha jpsacha closed this as completed Aug 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants